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


WMI Registry

Complete Script

strcomputer = "."
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