Hello, i am trying to run a .vbs script as a post install task in a winxp scripted installation, our company like to remove windows messenger and also the in built games, i have found the following scripts to do this:

remove games.vbs:
Dim Fso : Set Fso = CreateObject("Scripting.FileSystemObject")
Set WshShell = WScript.CreateObject("WScript.Shell")
sPrograms = WshShell.SpecialFolders("AllUsersPrograms")
If (Fso.FolderExists(sPrograms & "\Games")) Then
' Create file for uninstalling games
Set f = Fso.CreateTextFile("c:\windows\inf\wmdtocm.txt", True)
WshShell.Run "sysocmgr.exe /i:c:\windows\inf\sysoc.inf /u:""c:\windows\inf\wmdtocm.txt"" /q", 1, True
Fso.DeleteFolder(sPrograms & "\Games"), True
End If


Remove messenger.vbs:
'xp_messsenger_remove.vbs - Removes Windows Messenger from Windows XP
'© Doug Knox - 3/30/02
'Downloaded from www.dougknox.com

Option Explicit
On Error Resume Next

'Dimension variables
Dim WSHShell, MyBox, p1, q1, rcmd
Dim jobfunc

'Set the Windows Script Host Shell and assign values to variables
Set WSHShell = WScript.CreateObject("WScript.Shell")
p1 = "HKEY_LOCAL_MACHINE\Software\Microsoft\Outlook Express\Hide Messenger"
q1 = 2
rcmd = "RunDll32 advpack.dll,LaunchINFSection %windir%\inf\msmsgs.inf,BLC.Remove"

'Create or change the Hide Messenger value
WSHShell.RegWrite p1, q1

'Run the uninstall command


both run fine from a command prompt on a clean machine and also when double clicked, but when uploaded to the kbox with the command line: remove messenger.vbs / remove games.vbs respectively they do not run. i have tried this uploading the single files and also as a zip of the files.

would anyone be able to shed any light on this?

also is there a log of post installation failures? if so where would it be as this would help greatly.
0 Comments   [ + ] Show Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.


Most of my installs are just vb scripts. I usually set up a shutdown monitor so the user will find it difficult to shut down the machine while the install is running, then kick off any install sequence using a run statement with appropriate switches and then any 'clean up' statements. I started this because I needed to run something after the install just as you describe above; I kept doing it because I like consistency in my work. I can perform silent upgrades this way or a visible install with or without user interaction, vb is very flexible.

It's an art, not a science.
Answered 09/17/2010 by: riversidekid
Senior Yellow Belt

Please log in to comment
figured it out, i needed to put the command line in quotation marks to install, all working ok now.
Answered 09/20/2010 by: trentderby
Blue Belt

Please log in to comment
Answer this question or Comment on this question for clarity