472,118 Members | 1,140 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,118 software developers and data experts.

Help with Scripting Needed Desperately

Hi everyone,

I'm in a bit of a bind... I have some batch scripting ability but next
to no skill in VBS. I had a set of scripts that would:

Query the registry key
HKLM\SOFTWARE\Microsoft\SMS\Client\Configuration\C lient Application
Launchers\Hardware Inventory Agent

If the value returned is 0x79726f74 then it would stop the SMS Client
Service (clisvc), wait for this to complete, and then delete two
registry keys:

HKLM\SOFTWARE\Microsoft\SMS\Client\Configuration\C lient Application
Launchers\Hardware Inventory Agent

HKLM\SOFTWARE\Microsoft\SMS\Client\Client Components\Hardware
Inventory Agent

5. Report back to a file on \\hostserver\MSKB\28552\

We also had a VBS that ran great, but required WMI 1.5. Thus comes the
caveat... the targets are our legacy desktops running NT4 Workstation,
WMI v1, and IE5. The script needs to run at logon (we use psexec to
get elevated rights), and definately has to report back for auditing
purposes.

Does anyone know how to do this? I am completely tapped.
TIA!

Joe Foran
Jul 17 '05 #1
1 2395
You don't need WMI to read a key/value and/or delete
a key/value. You can use WScript.Shell object's RegRead
and RegDelete.
If you want sample code:

WScript.Shell samples:
http://www.jsware.net/jsware/scripts.html#shell

A package of VBS classes, one of which is for Registry functions:
http://www.jsware.net/jsware/scripts.html#classpk

I don't know about "reporting back" to a remote file.
If you mean write to a file you can use the FileSystemObject's
Textstream object, but I don't know the syntax for that in
dealing with a remote file.

This is a VB group, though, not VBS. You might try
microsoft.public.scripting.vbscript
microsoft.public.scripting.wsh
if you need more help.
--

I'm in a bit of a bind... I have some batch scripting ability but next
to no skill in VBS. I had a set of scripts that would:

Query the registry key
HKLM\SOFTWARE\Microsoft\SMS\Client\Configuration\C lient Application
Launchers\Hardware Inventory Agent

If the value returned is 0x79726f74 then it would stop the SMS Client
Service (clisvc), wait for this to complete, and then delete two
registry keys:

HKLM\SOFTWARE\Microsoft\SMS\Client\Configuration\C lient Application
Launchers\Hardware Inventory Agent

HKLM\SOFTWARE\Microsoft\SMS\Client\Client Components\Hardware
Inventory Agent

5. Report back to a file on \\hostserver\MSKB\28552\

We also had a VBS that ran great, but required WMI 1.5. Thus comes the
caveat... the targets are our legacy desktops running NT4 Workstation,
WMI v1, and IE5. The script needs to run at logon (we use psexec to
get elevated rights), and definately has to report back for auditing
purposes.

Does anyone know how to do this? I am completely tapped.
TIA!

Joe Foran

Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Erich Trowbridge | last post: by
reply views Thread by Joe Foran | last post: by
17 posts views Thread by EkteGjetost | last post: by
37 posts views Thread by John Salerno | last post: by
4 posts views Thread by kaosyeti | last post: by
8 posts views Thread by Artemio | last post: by
9 posts views Thread by i | last post: by
53 posts views Thread by souporpower | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.