The usual IT babble
Posts tagged Windows Server 2003
Windows Server 2003: taskmgr giving “Logon failure”
Feb 25th
I had myself a lot of fun today. I ended up patching a Windows Server 2003 x64 SP1, where the Task Manager wouldn’t start anymore. It simply failed (or in case of right clicking on the task bar wouldn’t even appear), so I went downstairs and pulled a hard disk out of the RAID1 array, just to be sure.
I went ahead, installed SP2 (as you can see on the above picture) while having the jitters. Also installed the VirusScan I was scheduled to install, and the system came back online. Phewww.
After my maintainance window was over, I looked into this issue a bit deeper. First tried copying over a taskmgr.exe (both 32bit and 64bit) from another Windows Server 2003 x64 SP2 system with no luck. The next step, was looking at PATH. As it turns out it has something to do with that ….
C:\>echo %PATH% C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem C:\>taskmgr The system cannot execute the specified program. C:\>set PATH=C:\WINDOWS\SysWOW64;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem C:\>taskmgr C:\>
As you can see, after fixing up the PATH environment variable, it works apparently .. Weirdly though, this issue doesn’t come up on another (identical) system, same PATH modifications, main difference: calling taskmgr.exe from the Run dialog works .. while it doesn’t on this particular system.
*Shrug* Gonna have to talk to my SAP guys tommorrow …
VBscript: Query remote OS and SP info (continued)
Feb 15th
After some more crunching on my VBscript, I think I finally have a working script that runs through a csv-list I point it to and walk onto each system (by ip-address only sadly) and query the os and the Service Pack that is installed. The CSV may look like this:
Hostname;IP;Model;Description;OS;Service-Pack;BL;Priority epimetheus;10.0.0.2;VMware guest;File-Server hades;10.0.0.1;VMware guest;Core-Router
After saving that one, and running a cscript //NoLogo win_sp_level.vbs you should find a completed list like this:
Hostname;IP;Model;Description;OS;Service-Pack;BL;Priority epimetheus;10.0.0.2;VMware guest;File-Server;Windows Server 2003 Standard x64 Edition; SP1;; hades;10.0.0.1;VMware guest;Core-Router;Windows Server 2003 Enterprise Edition; SP0;;
The final script looks like this:
On Error Resume Next Set objFSO = CreateObject("Scripting.FileSystemOBject") If objFSO.FileExists("Rollout_SP2.csv") = 0 Then CleanUp() Wscript.Quit End If Set CSVin = objFSO.OpenTextFile("Rollout_SP2.csv", 1) CSVin_read = CSVin.ReadLine Set objFile = objFSO.CreateTextFile("Rollout_SP2_result.csv") Set objFile = nothing Set CSVout = objFSO.OpenTextFile("Rollout_SP2_result.csv", 8) CSVout.WriteLine("Hostname;IP;Model;Description;OS;Service-Pack;BL;Priority") Do While CSVin.AtEndofStream <> True Dim os, servicepack Dim user, password os = nothing servicepack = nothing user = vars(1) & "\chrischie" password = "hah-this-password-is-easy" current_line = CSVin.ReadLine vars = Split(current_line, ";") Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator") Set objSWbemServices = objSWbemLocator.ConnectServer _ (vars(1), "root\cimv2", user, password, "MS_409",, 128) objSWbemServices.Security_.ImpersonationLevel = 3 Set colOperatingSystems = objSWbemServices.ExecQuery _ ("Select * from Win32_OperatingSystem") ' The set returns an Err.Number of 91 on success ' Don't ask me why though. If Err.Number <> 91 Then CSVout.WriteLine(vars(0) & ";" & vars(1) & ";" & vars(2) & ";" & vars(3) & ";NA;SP?;;") Else For Each objOperatingSystem in colOperatingSystems os = objOperatingSystem.Caption servicepack = objOperatingSystem.ServicePackMajorVersion Next CSVout.WriteLine(vars(0) & ";" & vars(1) & ";" & vars(2) & ";" & vars(3) _ & ";" & os & "; SP" & servicepack & ";;") End If Loop
The only thing I still need to improve is the error handling (as in notify when a system is being skipped due to RPC being unavailable).