Kategori: Vbs & Batch

How To Check Remote And Local Server Services Script

Const strSVCName = “ServicesName” Dim objWMIService, colServices, objService, strComputer strComputer = “ServerName” Set objWMIService = GetObject(“winmgmts:” _ & “{impersonationLevel=impersonate}!\\” & strComputer & “\root\cimv2”) Set colServices = objWMIService.ExecQuery(“Select * from Win32_Service WHERE DisplayName = ‘” & strSVCName & “‘”) For Each objService in colServices if objService.State = “Running” then Set objEmail = CreateObject(“CDO.Message”) objEmail.From = “test@test.com”

Windows Taskbar Autıo Hide Scripts

Option Explicit Const HKCU = &H80000001 Dim objReg Set objReg = GetObject(“winmgmts:{impersonationLevel=impersonate}root\default:StdRegProv”) Dim objWMI Set objWMI = GetObject(“winmgmts:{impersonationLevel=impersonate}root\cimv2”) ‘ Adjust the first bit of the taskbar settings Dim arrVal() objReg.GetBinaryValue HKCU, “Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects2”, “Settings”, arrVal arrVal(8) = (arrVal(8) AND &h07) OR &h01 objReg.SetBinaryValue HKCU, “Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects2”, “Settings”, arrVal ‘ Restart Explorer for the settings to take effect.

XP Classic Start Menu Disable Script

The following VBscript forces the use of the Classic start menu for the logged on user. If you would like to also enforce the classic start menu for all users on the machine, you could apply this change on the “HKEY_LOCAL_MACHINE” entry . Requires log-off and logon to take effect. ‘————————-———-———-———-———-— Dim objShell, RegLocate Set