igorm Posted September 23, 2007 Share Posted September 23, 2007 Hi again.I need to execute following command:msiexec /p MAINSP3.msp /a E:\Office\PRO11.msi SHORTFILENAMES=TRUE /qb andmsiexec /p OWC11SP3.msp /a E:\Office\OWC11.MSI SHORTFILENAMES=TRUE /qbBut I need to replace path E:\Office with user input. Can you help me to work this out?Also it would be nice to give me example how to execute command above with path from user input?Thank you in advance for help!Cheers Office 2000/XP/2003/2007 Slipstreamer Link to comment Share on other sites More sharing options...
Nahuel Posted September 23, 2007 Share Posted September 23, 2007 $path=InputBox("","Enter Office path") Run("msiexec /p OWC11SP3.msp /a "&$path&"\OWC11.MSI SHORTFILENAMES=TRUE /qb") Or.. #include <GUIConstants.au3> GUICreate("", 264, 111, 209, 119) $Input=GUICtrlCreateInput("", 8, 32, 129, 21) $Button1 = GUICtrlCreateButton("Browse", 160, 32, 97, 25, 0) GUICtrlCreateLabel("Browse to your office folder", 8, 8, 132, 17) $Button2 = GUICtrlCreateButton("Run", 176, 80, 81, 25, 0) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $folder=FileSelectFolder("Select Office folder",@HomeDrive) If not @error Then GUICtrlSetData($Input,$folder) EndIf Case $Button2 $path=GUICtrlRead($Input) Run("msiexec /p OWC11SP3.msp /a "&$path&"\OWC11.MSI SHORTFILENAMES=TRUE /qb") EndSwitch WEnd Link to comment Share on other sites More sharing options...
igorm Posted September 23, 2007 Author Share Posted September 23, 2007 Thank you very much. I really appreciate this. This thing with replacing file path made a lot of things for me easier in creating scripts. Cheers Office 2000/XP/2003/2007 Slipstreamer 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