Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


uninstalling mario forever with vbscript

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,47275
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> uninstalling mario forever with vbscript
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 uninstalling mario forever with vbscript - 5/21/2007 2:47:33 AM   
  fferrel

 

Posts: 10
Score: 0
Joined: 5/21/2007
Status: offline
Hello all,

I work for a school district that has roughly 400 computers.  Lately students have been installing a game that doesn't use the Microsoft installer.  I can see the game listed in add/remove programs.  Also there is an uninstall file present in c:\windows or c:\winnt.  I would like to create a script that would uninstall this game and the toolbar associated with it.  They are separate installs.  I read a post that might apply to me however I can't get the code to work.

The game is Mario Forever, along with Mario Forever Toolbar.

My current code is

Const ALL_USERS = True

Dim oWsh:Set oWsh = CreateObject("WScript.Shell")
strCmd = """" & oWsh.ExpandEnvironmentStrings("%windir%") & "\MarioForever_Toolbar_Uninstaller_7156.exe -a -y -f"""

I have tried numerous scripts with no luck.  My experience with vbscript doesn't go far beyond adding drives and printers.  So any help is greatly appreciated.

Thank you,

_____________________________

Frank -
 
 
Post #: 1
 
 RE: uninstalling mario forever with vbscript - 5/21/2007 3:22:03 AM   
  dm_4ever


Posts: 2723
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
Can the uninstall info be found under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall ??

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to fferrel)
 
 
Post #: 2
 
 RE: uninstalling mario forever with vbscript - 5/21/2007 3:50:26 AM   
  fferrel

 

Posts: 10
Score: 0
Joined: 5/21/2007
Status: offline
Yes both are listed, not as the numeric code but as Mario Forever and Mario Forever Toolbar

_____________________________

Frank -

(in reply to dm_4ever)
 
 
Post #: 3
 
 RE: uninstalling mario forever with vbscript - 5/21/2007 7:16:17 AM  1 votes
  dm_4ever


Posts: 2723
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
See if this echo's out the uninstall strings... If it does, test to see if it removes it completely and silently without any user interaction.   If it shows you the uninstall string but requires user interaction...look for the appropriate switches to make it silent.  You can then modify the string as needed and use WScript.Shell to execute it (in this case you would need to execute strUninstall instead of using the inputbox like the example here.)


      

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to fferrel)
 
 
Post #: 4
 
 RE: uninstalling mario forever with vbscript - 5/21/2007 11:09:59 PM   
  mbouchard


Posts: 1924
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
Do you get an error when you run your script?  Or does it just not work?

What happens if you use the below command on start/Run?  Does it work?  Are those the correct switches?
c:\windows\MarioForever_Toolbar_Uninstaller_7156.exe -a -y -f

_____________________________

Mike

For useful Scripting links see the Read Me First stickey!

Always remember Search is your friend.

(in reply to dm_4ever)
 
 
Post #: 5
 
 RE: uninstalling mario forever with vbscript - 5/22/2007 12:18:33 AM   
  fferrel

 

Posts: 10
Score: 0
Joined: 5/21/2007
Status: offline
The code posted by dm_4ever works.  I see the correct strings to the uninstall file.  Again my knowledge of vb is extremely limited, how would I initiate this code?

For mario forever, the switches needed are, [yes] and [ok]  For mario toolbar the switches needed are, [next], [uninstall] and [finish].

I really appreciate your help. 

_____________________________

Frank -

(in reply to mbouchard)
 
 
Post #: 6
 
 RE: uninstalling mario forever with vbscript - 5/22/2007 5:20:58 AM   
  fferrel

 

Posts: 10
Score: 0
Joined: 5/21/2007
Status: offline
I added comments to the part I wasn't sure about.  Also I would have to take out the InputBox.


      

_____________________________

Frank -

(in reply to fferrel)
 
 
Post #: 7
 
 RE: uninstalling mario forever with vbscript - 5/22/2007 6:28:51 AM  1 votes
  dm_4ever


Posts: 2723
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
If the install string in the registry is exactly what you need then yes you can do something like this.


      

If you need to add switches or replace them you're going to have modify the string by adding them or use the Replace function.

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to fferrel)
 
 
Post #: 8
 
 RE: uninstalling mario forever with vbscript - 5/23/2007 12:23:03 AM   
  fferrel

 

Posts: 10
Score: 0
Joined: 5/21/2007
Status: offline
OK, that works but I played around with it alot and this code is really simple.


      

All I need to do is have if say [yes] to start the install and [ok] to finish

How do I use the switches.  -y -f -a etc

http://support.installshield.com/kb/view.asp?pcode=CLASS600PEE&articleid=Q100021

I've been looking at that site but I don't know how to use the code.  Do I even need switches or is this something completely different?

_____________________________

Frank -

(in reply to dm_4ever)
 
 
Post #: 9
 
 RE: uninstalling mario forever with vbscript - 5/23/2007 1:14:09 PM   
  sheepz


Posts: 247
Score: 2
Joined: 3/17/2006
From: Riverside the 909s
Status: offline
Not an expert, but dm_4ever showed you a way to uninstall it from the registry not to complicate things but to also show a different way of uninstalling programs.  Luckily the program your working with has an "uninstall.exe" file.  Some programs do not have this i.e. Symantec Antivirus Enterprise client, there for you would need to envoke the uninstall string in the reg.  As for the code it looks like a mistype but it has too many ""

wshshell.run """C:\Program Files\Mario Forever\uninst.exe"

Should be

wshshell.run "C:\Program Files\Mario Forever\uninst.exe -y -f -a"

I do not have this game/program to test but just add the switches to the end.  Switches in bold.

(in reply to fferrel)
 
 
Post #: 10
 
 RE: uninstalling mario forever with vbscript - 5/23/2007 2:52:41 PM   
  dm_4ever


Posts: 2723
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
Thanks sheepz...it was my intention to show of a way to get the uninstall info from the registry and execute it...works great if no switches are required...but then again adding/changing them isn't too hard either if you know what they are.

fferrel,
If the switches you posted work for the uninst.exe then you might try this...(always watch out for those spaces in paths when using .Run and add the appropriate quotes around them)


      

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to sheepz)
 
 
Post #: 11
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> uninstalling mario forever with vbscript Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts