Windows Scripting BLOG

Due to limited time working on this project this place is not intended to people who are new to scripting but much more for people who are already familiar with the VBS/WMI syntax.

Samstag, 19. Juli 2008

Learn Windows Scripting Act 5 - Class material

Class material for ACT 5

References

WMI Registry
http://msdn2.microsoft.com/en-us/library/aa393664(VS.85).aspx


Complete Script

strcomputer = "."
HKEY_CURRENT_USER = &H80000001
Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
comppath = "Software\Microsoft\Windows\CurrentVersion\Policies\System"
strEntryName = "DisableTaskMgr"
dwValue = "00000001"
retval = objReg.SetDWordValue(HKEY_CURRENT_USER, comppath, strEntryName, dwValue)
Wscript.echo retval