Wednesday, April 23, 2008

Fix Broken Windows Scripting Host

Recently during an SMS application deployment we had an application installation remove the .vbs, .wsf and .js file associations.

I used the following command coupled with psexec.exe to restore functionality to the affected machines remotely.

Rundll32.exe setupapi,InstallHinfSection DefaultInstall 128 C:\Windows\inf\Wsh.inf

Using this method restores the files associations for .wsh, .vbs, .vbe, .js, .jse, .wsf, .wsc and also ensures that all WSH files are installed. This is the same command that XP Setup uses to install WSH.

No comments: