Category Archives: Troubleshooting

Troubleshooting including spyware issues

Set Static IP Remotely

Because I rule, I decided to be able to change people’s IP addresses remotely. This usually requires a Domain Administrator account (which I have/am). Here’s the code for my remote script:

intValue = InputBox("Please enter a computer name:")
intValue2 = InputBox("Please enter an IP address:")
strComputer = intValue
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colNetAdapters = objWMIService.ExecQuery _
("Select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")
strGateway = Array("10.1.3.1")
strIPAddress = Array(intValue2)
strSubnetMask = Array("255.255.255.0")
strGatewayMetric = Array(1)
For Each objNetAdapter in colNetAdapters
arrDNSServers = Array("10.1.1.124", "10.1.1.241")
objNetAdapter.SetDNSServerSearchOrder(arrDNSServers)
errGateways = objNetAdapter.SetGateways(strGateway, strGatewaymetric)
errEnable = objNetAdapter.EnableStatic(strIPAddress, strSubnetMask)
If errEnable = 0 Then
WScript.Echo "The IP address has been changed."
Else
WScript.Echo "The IP address could not be changed."
End If
Next

Basically this script asks for the current computername (or IP address) and then the future IP address. I hardcoded the netmask and the DNS server IPs (as well as the default gateway) already because those never change for my needs. Obviously you should change the above numbers to what you require.

But then, after installing a new version of windows, I realized I was getting errors. The exact error is VBScript runtime error: 800A0046 Permission Denied: ‘GetObject’. Somehow I was being denied the ability to impersonate the local administrator using my script. I thought maybe it was a “new system” issue, so I tried it on an older machine (from my machine though) and it still failed. That narrowed it down to an issue on my machine.

It all boils down to DCOM not being enabled on the computer. DCOM, if disabled, makes for a more secure system (I’m basing that on all the trojans and viruses written to overflow the DCOM stack and take over systems – as well as all the patches written specifically to fix DCOM errors). However, DCOM is required by impersonation scripts like the one above.

Fix:
Open Control panels
Open Administrative Tools
Open Component Services
Navigate to Console Root >> Component Services >> Computers
Right Click My Computer and select Properties
Click on the Default Properties Tab
Click on Enable Distributed COM on this computer

Some people will require a reboot, but my script works just fine after clicking OK.

[EDIT]

It has come to my attention that a lot of people would like to do this remotely. And by a “lot of people” I mainly mean me.
Here’s how:
Open up regedit (start >> run >> regedit)
Navigate to HKEY_LOCAL_MACHINE\Software\Microsoft\OLE
You will see a REG_SZ key with the name EnableDCOM
Change the value of the key to Y for yes, or N for no. Then reboot the remote system.

Mapi32.dll Is Corrupt Or The Wrong Version

The error of “Cannot start Microsoft Office Outlook. Mapi32.dll is corrupt or the wrong version. This could have been caused by installing other messaging software. Please re-install office.” is a painful reminder that not all software pieces work well together. Quick fix:

1.) Close outlook
2.) Navigate to C:\Program Files\Common Files\System\MSMAPI\1033
3.) Rename MSMAPI32.DLL to MSMAPI32.DLL.OLD
4.) Reopen outlook – outlook should then “fix” this dll file

Unmountable_boot_volume

Usually when you receive this error it means your HD is going bad. If your computer keeps rebooting and then asks to start in safe mode, that’s a good sign. Keep hitting the usual F8 button at startup to deselect the option of reboot on system failure. We don’t like that option anyway. Endless loops of reboots help no one.

If then on the giant blue screen of death you see this message:
“STOP 0x000000ED UNMOUNTABLE_BOOT_VOLUME”, then try this simple repair step before calling it a day.

1.) Put in your Windows XP CD
2.) Boot off your Windows XP CD (usually hit F12 to bring up the boot menu)
3.) When the Welcome to Setup screen appears, press the “R” key to start the recovery console
4.) If you’re prompted, enter the administrator password (on Home edition it’s usually blank)
5.) At the command prompt type “chkdsk /r” and press enter – this will find and repair most issues found
6.) After Checkdisk has finished running, you can type “exit” and hit enter to reboot the machine

Adobe Flash Crashes IE

I had a fellow employee at my work complain that every now and then his IE would crash. After several failed attempts to figure out when this was happening (and why), he finally told me it was an error with Flash. The error is as follows:
Flash Error

So I was looking around trying to figure out why this was happening. I know – the easiest way to find out how to stop it would be to have the fellow employee let me know what site he was at when it was happening. But I digress, here’s how I “fixed” it.

1.) Go to \windows\system32\macromed\flash\
2.) Duplicate flash9b.ocx (Copy/Paste)
3.) Rename the file flash9b.ocx to flash9b.ocx.old
4.) Rename the file Copy of flash9b.ocx to flash9b.ocx
5.) Duplicate flash9b.ocx (Copy/Paste)
6.) Rename flash.ocx to flash.ocx.old
7.) Rename the file Copy of flash9b.ocx to flash.ocx
8.) Duplicate flash9b.ocx (Copy/Paste)
9.) Rename the file Copy of flash9b.ocx to flash9.ocx

You will need to close out of all active IE windows to make the changes stick. You may also need to reboot just to be sure. This seems to only affect flash 9b.ocx files when the system also has ATI video drivers.

Windows Updates

Windows updates were failing to install on a computer. Here’s the steps I did to correct the issue:

1.) Reboot. This didn’t do anything but waste 4 minutes of time.
2.) Erase C:\WINDOWS\system32\SoftwareDistribution folder. Redownloaded Update Files but didn’t help.
3.) Download the Windows WGA and try to install. Failed on installation.
4.) Start off the Windows Disk and do a repair. Ended up in the same boat as before, but the computer starts up quicker now.
5.) Re-Register DLL files for windows update. This ended up working.

How to register DLL files:
1.) Open the command line (Start >> Run >> CMD)
2.) regsvr32 wuapi.dll, regsrv32 wuaueng.dll, regsrv32 wuaueng1.dll, regsrv32 wucltui.dll, regsrv32 wups.dll, regsrv32 wups2.dll, regsvr32 wuweb.dll
3.) Reopen the Windows Update window and try to update again

[edit: I had “regsrv32” instead of “regsvr32”. This has been fixed.]

Vista Slow Network

I recently installed Vista on my main rig (long story short: old rig died, bought new rig). Everything was installing peachy, it might even be considered “fast”. No SATA drivers were needed, no other drivers were needed either. I’m still using on board video, but there’s a spot for a x16 PCI Express card.

Well anyway, installed the Vista, did all the Vista updates and installed all my 2007 software. Everything was moving along at a quick pace until I tried to load up Office over the network. Even navigating to the shared directory “Microsoft” was painfully slow. I attempted to copy the ISO over. I say Attempted because I didn’t even let it finish. It was moving at a snail’s pace: 16KB/sec. I can freakin DOWNLOAD it faster than I can grab it off a network share! WTF mate!

So I figured it was a problem with the network settings. I changed them from autonegotiate to Full Duplex. Then to Half Duplex. I even got rid of the IPv6 and VLAN settings, which did absolutely nothing. I finally hooked the system up to my Ghost Server and attempted to copy over a 3GB Ghost image. It flew by at around 21MB/sec. Twenty-one Mega Bytes versus sixteen kilobytes. Thank you network.

I narrowed it down to a couple possibilities – the Ghost Server was on it’s own unmanaged 10/100/1000 switch. The Applications server is on a managed Cisco switch with several VLANs. It only ran/runs slow on the managed network.

Here’s the fix now that I made you read all of my ramblings:
Somehow get to the administrative CMD. I edited quite a few settings on Vista already to allow me to administer the computer without that annoying popup. It used to be Start >> Run >> CMD. It’s still that in my edited version.
Then type “netsh interface tcp show global”. This will show the current netsh configuration in case you break something later.
Type “netsh interface tcp set global autotuning=high”. This will set it to a high rate of speed instead of the normal rate. Other configurations include “low” and “disabled”. I’ve heard some have had luck with disabling the autotuning completely. Be sure to repair your network connection. Oh wait, you can’t by normal means (thank you Vista again!).
In the command prompt, type “ipconfig /release” and then “ipconfig /renew”.

Server Error in ‘/’ Application

Had this issue appear when we Ghosted from a 36GB Server to a 147GB Server. Was running Sharepoint Services for internal use on the server, and none of the applications (administrative or otherwise) would run. Checked permissions, did all the Windows Updates. Notta.

Then I happened across a small Microsoft Issue when dealing with .NET1 and .NET2 on the same server.

Quick repair for .NET2:
1.) Start >> Run >> CMD
2.) cd C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
3.) aspnet_regiis -ir
4.) Reload your failing page

Quick repair for .NET1:
1.) Start >> Run >> CMD
2.) cd C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322
3.) aspnet_regiis -ir
4.) Reload your failing page

As you can see the command is the same between the two versions of .NET. This fixed the issue, but it may not work in all cases. Check the permissions and the log files from IIS to see where the problem is.

[UPDATE]
The reason that the links between the applications and .NET failed was when I did an overlay Windows repair after ghosting to a new machine. Look up Ghosting Issues for more details.