obiwantuxedo
MIS
I'm new to VBScript and am looking for a way to read the regisitry to determine if the spooler service is set to manual or disabled. My code looks like this:
Dim WshShell, bKey
Set WshShell = WScript.CreateObject("WScript.Shell"
bKey = WshShell.RegRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Spooler\"
WScript.Echo WshShell.RegRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Spooler\Start"
I get an error message saying the key can't be opened for reading. How can I get this to work?
Thanks
Dim WshShell, bKey
Set WshShell = WScript.CreateObject("WScript.Shell"
bKey = WshShell.RegRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Spooler\"
WScript.Echo WshShell.RegRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Spooler\Start"
I get an error message saying the key can't be opened for reading. How can I get this to work?
Thanks