Use following VBS script Startup or Shutdown script. vb 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
Category: Scripts and Coding
VBScript, Python, Shell Scripting, Bash, Bash script, shell script, API Scripting, YAML, JSON, XML, Regex, cron, scripting basics, script templates, script security, REST API, webhook, coding tutorial, Go, Golang, Rust, Ruby, Perl, batch script, batch file, .sh, automation script
