Tag

OS Detecting VBS Script

1 story
OS Dependent Logoff/Logon Script run via GPO

OS Dependent Logoff/Logon Script run via GPO

Use following VBS script Startup or Shutdown script. Option Explicit Dim objItem, colItems, objWMIService, strComputer, objShell strComputer = "." Set objShell = CreateObject("WScript.Shell") Set objWMIService = GetObject("winmgmts:\" & strComputer & "rootcimv2") Set colItems = objWMIService.ExecQuery("Select * from Win32_OperatingSystem",,48) For Each objItem in colItems If InStr(objItem.Caption,"2000") Then 'Add your line here for 2000 objShell.Run "regedit", 1, True End If If InStr(LCase(objItem.Caption),Lcase("XP")) Then 'Add your command line here for 2000 objShell.Run "calc",…

Saugata Datta1 min read7.1K
🧰

Free Tools: IP, DNS, SSL

20+ free network and other tools in one place. No signup. Click explore or visit https://technochat.in/tools

Explore