Jump to content

Help with using FolderPath


igorm
 Share

Recommended Posts

Hi again.

I need to execute following command:

msiexec /p MAINSP3.msp /a E:\Office\PRO11.msi SHORTFILENAMES=TRUE /qb
and

msiexec /p OWC11SP3.msp /a E:\Office\OWC11.MSI SHORTFILENAMES=TRUE /qb

But 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 :)

Link to comment
Share on other sites

$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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...