RE: Query to test the existence of a folder
- From: Marco <Marco@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 1 Nov 2007 04:27:00 -0700
Thank you for that answer.
"Sherry Kissinger [MVP-SMS]" wrote:
I could see using [...] inventorying *.exe;
I fear this wouldn't solve the problem, I'll explain later on why not.
(still would require a modification to
sms_def.mof;
Oops. This was excactly what I tried to avoid.
but to default classes, not new stuff requiring a mofcomp),
would be to have the script create a new Environment Variable, something like
CDATAFOLDER, and the value would be either True or False, as applicable.
Then of course edit sms_def.mof to enable the gathering of win32_environment
variables.
Interesting idea. I will think about it.
If you aren't comfortable with editing sms_def.mof; I'd go with the fake
.exe file. Of course, you could go the route of a custom WMI class or
regkey, then extending sms_def.mof/mini.mof ...
I thought about extending the sms_def.mof including the appropriate WMI
query "SELECT * FROM Win32_Directory WHERE Name='C:\\data'" which works fine
in CIM Studio. Unfortunately the query "SELECT * FROM Win32_Directory" ends
up in a disastrous slow down of the client computer.
but for something like this I
don't know if I would bother with a customization to that level.
The sms_def.mof already hasn't been modified to achieve this goal.
would depend upon who is going to be seeing the raw data returned. If just
me or my immediate team; I'd use the easiest method possible. If the raw
data will be used by another team or boss' a few levels up--I'd probably
professionalize it a bit more.
I think I should tell you a little more about the background: There's a lot
of software installed throughout the domain which should be removed.
Unfortunately I have little information about it. In some cases this means
just a fragment of the installation path. "Installation" means it has beeen
installed via setup.exe or a *.msi or by simply copying folders. SMS just
reported folders if an *.exe was included as you just mentioned. If the path
was e.g. "c:\Program Files\Companyname\Softwarename\System\program.exe" SMS
didn't find the path of the software product if I only told the fragment
"c:\Program Files\Companyname\Softwarename" and there were no *.exe files
included directly inside of this folder.
I'd like to have a chance to detect whether a folder exists or existed on a
client machine no matter whether it belongs to a software and no matter
whether *.exe (or any other type of) files are directly included. SMS reports
even software once installed on a client machine so it seemes the correct way
to me to do this.
Standarize. Simplify. Automate.
Of course.
"Matthew Hudson" wrote:.
You would need to do this through a VBSCript since your asking to check the
entire HD for a folder by name.
I don't know how you would get the information backup to the SMS server.
create a MIF file to be inventoried with the necessary data or have it append
to a network share the information. How many systems are you looking at
doing it to ?
--
-----------------------
http://sms-hints-tricks.blogspot.com/
"Marco" wrote:
Does anyone know the SMS query to test the existence of a folder (e.g.
C:\Data) no matter whether it has subfolders or not, no matter whether files
are included or not and no matter whether if this folder is part of a
software product?
I'm sorry if this is a stupid question. I'm no SMS admin.
- Next by Date: RE: Query to test the existence of a folder
- Next by thread: RE: Query to test the existence of a folder
- Index(es):
Relevant Pages
|