wsus installs failing-Relating to XP

Can be caused by WSUS not downloading the updates properly and sending you the failed downloads. You may have to uninstall those updates.

Go to services and stop the Automatic Updates service

Go to the C:\WINDOWS\ and delete the SoftwareDistribution folder.

Restart the automatic updates service.

Then in the Run box type

wuauclt.exe /detectnow

To force a check with WSUS.

Shrink a VMware .VMDK virtual disk

Ran into an issue recently with one of my VMs. Wanted to back it up but was 200GB. I knew there wasn’t that much data on it anymore, it had just grown to that. But in Windows when you delete a file you don’t delete it really, Windows just flags it to be overwritten.

You can use this tool first but don’t think it’s needed. CCleaner and Fileshredder can do the same. That is, wipe the free space while in Windows.

SDelete Sysinternals as MS

In Windows go to a CMD and to the location of sdelete and type

sdelete -c

That cleans the free space. Then shut down the VM.

Once shut down go to a CMD and go to where VMWARE is installed. Mine is

D:\Program Files (x86)\VMware\VMware Workstation

Then run vmware-vdiskmanager.exe to shrink the VM. This is done with the -k switch.

My VM was in a different location to the diskmanager tool so ended up like this

vmware-vdiskmanager.exe -k “f:\vm\test lab\xp.vmdk”

Once you hit enter you should see a Shrink: 0% meaning it’s started. Could take a while. I just left mine running while at work so don’t know how long it took.

The ” are needed it appears.

It works great. Mine went from 200GB to 26GB.

This site helped with this discovery.

http://www.itstuff.ca/2009/06/how-to-shrink-vmware-virtual-disk-files.html

Disable XP firewall using batch file

Created this as was forever doing it on machine where it was decided not to roll it out over AD. So I did it on an individual bases. Annoying having to go to gpedit.msc all the time to set these settings. So created a batch file to put it directly into the registry, just when gpedit puts it.

Stick the following in a cmd window or in a batch file.

REG ADD HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile /v EnableFirewall /t REG_DWORD /d 0
REG ADD HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile /v EnableFirewall /t REG_DWORD /d 0

What it’s doing:

REG ADD = Adds an entry to the registry.
/v is the Value name that appears under the selected key (In the above example it’s EnableFirewall. This will appear under DomainProfile and StandardProfile as in the image)

Firewall

/t is the RegKey type in this case it’s a DWORD so you put REG_DWORD

/d is the data you want in it. In this case we want it set to 0. Because it’s set to 0 this bit isn’t actually needed. As adding EnableFirewall as a DWORD it appears to automatically default it to no value, 0. I just included it in the batch file so I knew what the batch file was doing.

And that’s it. Disadvantage I’ve found using the batch file instead of gpedit.msc is that after you run it, it won’t take effect until you reboot. Also if you then check gpedit, it will just said Not Configured. If you then want to use gpedit to config it. You have to set the gpedit entry to disabled, maybe doing gpupdate /force (you can get away with not having to do that most times) and then set it back to Not Configured. Then it will remove the reg entries.

Other than that, appears to work fine.

Info on the REG command can be found here. This helped me create the batch.

http://www.petri.co.il/reg_command_in_windows_xp.htm