Manu21 Posted June 11, 2015 Share Posted June 11, 2015 (edited) Hello All,I am new to the scripting and programming but my management has asked to perform a deployment using scripts.I have to deploy Office 2013 on to the systems but before I need to uninstall Office 2010.Now the Office 2010 uninstall is being done through setup.exe which is further using uninstall.xml file.Both the files are on a network share and I wish to call both of them from the network share using the AutoIT script. I am not sure how to achieve this.I am using the following for the same :RunWait(@WorkingDir & '\\ggnapps1\softwarecentre$\Whitelist Software\Microsoft\Office\MS Office 2010 SP1\setup.exe /uninstall Proplus /config' &@WorkingDir& '\\ggnapps1\softwarecentre$\Whitelist Software\Microsoft\Office\MS Office 2010 SP1\ProPlus.WW\uninstallconfig.xml', @WorkingDir, @SW_HIDE)Please help me with the correct syntax/command/functions to achieve the target.An urgent help will be much appreciated.Thanks Manu Edited June 11, 2015 by Manu21 missed the command line Link to comment Share on other sites More sharing options...
SadBunny Posted June 11, 2015 Share Posted June 11, 2015 (edited) The command is incorrect. Thy this to troubleshoot your command:$command = @WorkingDir & '\\ggnapps1\softwarecentre$\Whitelist Software\Microsoft\Office\MS Office 2010 SP1\setup.exe /uninstall Proplus /config' & @WorkingDir & '\\ggnapps1\softwarecentre$\Whitelist Software\Microsoft\Office\MS Office 2010 SP1\ProPlus.WW\uninstallconfig.xml' MsgBox(0, 0, "Command is: " & $command) ; <-- will show a popup with the constructed command ; RunWait($command, @WorkingDir, @SW_HIDE) <-- commented out so you don't run anything until you are sure the command is correctYou will notice a few things:Your path to the executable is not going to be a network path, because it is prefixed with your working dir. Remove that prefix.Your path to the config file has the same issue.You forgot to add a space between /config and the path to the config file you put behind it/edit: Maybe you also need to quote paths that contain spaces.Also, since it's such a long string, it's easier to program, change and troubleshoot if you break it up into a few parts. Something like this:$pathToExe = '\\ggnapps1\softwarecentre$\Whitelist Software\Microsoft\Office\MS Office 2010 SP1\setup.exe' $pathToConfigFile = '\\ggnapps1\softwarecentre$\Whitelist Software\Microsoft\Office\MS Office 2010 SP1\ProPlus.WW\uninstallconfig.xml' $uninstallParam = '/uninstall Proplus' $configParam = '/config ' & $pathToConfigFile ; <-- note the space after config! $command = $pathToExe & ' ' & $uninstallParam & ' ' & $configParam & ' ' & $pathToConfigFile MsgBox(0, 0, "Command is: " & $command)Good luck! (And welcome to the forum ) Edited June 11, 2015 by SadBunny Roses are FF0000, violets are 0000FF... All my base are belong to you. 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