flyonthewall Posted September 4, 2007 Share Posted September 4, 2007 I already have an uninstall.vbs script. Is there an easy way to put this in a .au3 script?I've tried the following below:RunWait (@ComSpec & "\\server\folder1\vbscripts\testuninstall.vbs", @SW_HIDE)Should I try ShellExecute, or is there an better way? I will be running this script remotely, whichis why I need to hit the server.Thank you for any help.testuninstall.vbs below:on error resume nextSet WshShell = CreateObject("WScript.Shell")WshShell.Run "msiexec /x {0B1774B2-3A08-4780-B13A-D401D2945208} /q",1,true WshShell.Run "msiexec /x {9EADC6BD-33BB-4E38-9607-998FB0788751} /q",1,trueWshShell.Run "msiexec /x {E58F01AD-B636-4960-8827-266AD991AFCD} /q",1,trueWshShell.Run "msiexec /x {57F2EB35-AC12-42C6-AEE8-F3DC33F2C2D4} /q",1,trueWshShell.Run "msiexec /x {C1CCECCC-22D8-4542-B54A-D193BE81A0F3} /q",1,trueWshShell.Run "msiexec /x {0CD9E86D-5D7D-4614-961C-AA44ADA45A82} /q",1,trueWshShell.Run "msiexec /x {C1CCECCC-22D8-4542-B54A-D193BE81A0F3} /q",1,trueWshShell.Run "msiexec /x {CF592260-4681-4DD2-ACC9-853CF02D5E34} /q",1,true Link to comment Share on other sites More sharing options...
flyonthewall Posted September 4, 2007 Author Share Posted September 4, 2007 I will use the following to start the .vbs: RunWait ('\\server\folder1\vbscripts\starttestuninstall.bat', "", @SW_HIDE) w/the .bat kicking off the .vbs @echo off \\server\folder1\vbscripts\testuninstall.vbs Exit maybe something better out there, but this works well enough. Thanks Link to comment Share on other sites More sharing options...
Gondus Posted September 4, 2007 Share Posted September 4, 2007 why dont you just include it and make it run inside your program. making that long folder path is tedious -----------Current Programming Language Status:Beginner: J#, Ruby Intermediate: Autoit, Java, C#, C++Advanced: Basic, Visual Basic, Fortran Link to comment Share on other sites More sharing options...
flyonthewall Posted September 4, 2007 Author Share Posted September 4, 2007 why dont you just include it and make it run inside your program.making that long folder path is tediousThanks for the reply, but from my understanding you cannot start a .vbs from Run. Link to comment Share on other sites More sharing options...
Danny35d Posted September 4, 2007 Share Posted September 4, 2007 Yes you can, but you forgot to add /c switch after @ComSpec. Which it mean carries out the command specified and then terminates. You can use any of the following combinations:RunWait (@ComSpec & " /c \\server\folder1\vbscripts\testuninstall.vbs", @SW_HIDE)RunWait (@ComSpec & " /c start \\server\folder1\vbscripts\testuninstall.vbs", @SW_HIDE)RunWait (@ComSpec & " /c wscript.exe \\server\folder1\vbscripts\testuninstall.vbs", @SW_HIDE)In my case I will use ShellExecute. AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line Link to comment Share on other sites More sharing options...
Developers Jos Posted September 4, 2007 Developers Share Posted September 4, 2007 Should also work without the BAtch and VBS file with something like these for each uninstall: RunWait(@ComSpec & ' /c msiexec /x {0B1774B2-3A08-4780-B13A-D401D2945208} /q',@TempDir,@SW_HIDE) - or - RunWait(@ComSpec & ' /c "msiexec /x {0B1774B2-3A08-4780-B13A-D401D2945208} /q"',@TempDir,@SW_HIDE) SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
flyonthewall Posted September 4, 2007 Author Share Posted September 4, 2007 Thank you very much for the replies all. I will give these a try. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now