Author

Saugata Datta

I’m an IT/DevOps professional with many years of hands-on experience across Windows, Linux, Automation, Backup and Cloud. I love building real-world automations to make infrastructure reliable, secure, and self-healing. Through this blog, I share practical learnings from enterprise projects and my home-lab experiments on Cloudflare, Self-Hosting and everything in between. Always tinkering, always improving.
Page 35
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.2K
Hello world!

Hello world!

Welcome to Technochat.in, a place for all of us... Have fun.. :)

Saugata Datta1 min read5.6K
🧰

Free Tools: IP, DNS, SSL

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

Explore