Jump to content

Passing parameter as variable in Run function


max23ed
 Share

Recommended Posts

Hi, as the title says, here is my code but its not working 

; Get the parameter from open file dialog
GUICtrlSetData($locationtxt, FileOpenDialog("Select the program", '', "Supported files (*.exe;*.msi;*.reg;*.inf)|Executable Files (*.exe)|Microsoft Installer files (*.msi)|Registry files (*.reg)|Inf files (*.inf)", 3))

; store the value in a variable 
 $abc = GUICtrlRead($locationtxt)
 ; Run the program and pass the parameter value
            Run("ussf.exe "  & $abc  )
            
  ; If i do it this way, its working but i want the parameter value from the open dialog not fixed
  Run("ussf.exe C:\Users\project\ccsetup563.exe")

Please show me how i can do it and i'm sorry if someone asked about this topic before.

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...