|
Should the r be there after
Microsoft - in If objOperatingSystem.Caption =
"Microsoftr Windows VistaT Ultimate" then wscript.quit ???? Mark From: I’m trying to get a script working in Dim WshShell strComputer = "." Set WshShell =
WScript.CreateObject("WScript.Shell") On Error Resume Next ' If Workstation, exit script Dim objWMIService, colOperatingSystems, objOperatingSystem,
strComputer, objFSO Set objWMIService = GetObject("winmgmts:" &
"{impersonationLevel=impersonate}!\\" & strComputer &
"\root\cimv2") Set colOperatingSystems = objWMIService.ExecQuery
("Select * from Win32_OperatingSystem") For Each objOperatingSystem in colOperatingSystems If objOperatingSystem.Caption = "Microsoft Windows 2000
Professional" then wscript.quit If objOperatingSystem.Caption = "Microsoft Windows XP
Professional" then wscript.quit If objOperatingSystem.Caption = "Microsoftr Windows
VistaT Ultimate" then wscript.quit If objOperatingSystem.Caption = "Microsoft Windows
Vista Ultimate" then wscript.quit Next ' Check / Set registry settings for screen saver.
Logoff user if settings are updated Dim isLocked, ssTimeout, ssActive, ScrnSave, wmi, objSet isLocked = WshShell.RegRead ("HKCU\Control
Panel\Desktop\ScreenSaverIsSecure") ssTimeout = WshShell.RegRead ("HKCU\Control
Panel\Desktop\ScreenSaveTimeout") ssActive = WshShell.RegRead ("HKCU\Control
Panel\Desktop\ScreenSaveActive") ScrnSave = WshShell.RegRead ("HKCU\Control
Panel\Desktop\SCRNSAVE.EXE") If (isLocked = 0) or (CInt(ssTimeout) >900) Or (ssActive
= 0) Or (ScrnSave = "") Then WshShell.RegWrite "HKCU\Control
Panel\Desktop\ScreenSaverIsSecure",1,"REG_SZ"
WshShell.RegWrite "HKCU\Control
Panel\Desktop\ScreenSaveActive",1,"REG_SZ"
WshShell.RegWrite "HKCU\Control
Panel\Desktop\ScreenSaveTimeout",900,"REG_SZ"
WshShell.RegWrite "HKCU\Control
Panel\Desktop\SCRNSAVE.EXE","%system
root%\system32\logon.scr","REG_SZ" WshShell.Popup "ScreenSaver settings
were not previously set. Settings have been updated. A logout is
required to activate new settings. Click Ok and the system will logout
you out now. Auto-logoff in 20 seconds.", 20, , 0 + 64
WshShell.Run LogonServer & "\netlogon\shutdown.exe /l
/f",0,true End If ---------------------------------------------------------------------------
|
- [ActiveDir] Vista & WMI Harding, Devon
- RE: [ActiveDir] Vista ... Akomolafe, Deji
- RE: [ActiveDir] Vista ... Mark Parris
- RE: [ActiveDir] Vista ... joe
- RE: [ActiveDir] Vista ... Alain Lissoir
- Re: [ActiveDir] Vi... Susan Bradley, CPA aka Ebitz - SBS Rocks [MVP]
- Re: [ActiveDir] Vi... Mark Parris
- RE: [ActiveDir] Vista ... Almeida Pinto, Jorge de
- RE: [ActiveDir] Vista ... Harding, Devon
- [ActiveDir] sharep... Ramon Linan
- RE: [ActiveDir... Aaron Steele
- RE: [Activ... Ramon Linan
