Jump to content

Change psexec batch in au3 file


Recommended Posts

Hey Guys,

I'm new to autoIT so sorry if I missed this already in the forums...

I'm trying to change this batch:

set /p machine= Please enter the machine name or ip:

psexec \\%machine% -i 0 -c "\\fileshare\program.exe" [program install parameters]"

to an au3 script for a silent remote install of a program

So far I've worked out $machine = InputBox("Machine Name", "Please enter the machine name or ip: ") for the variable prompt however with the running of psexec I'm not sure how to do it.

I tried Run (psexec "\\" $machine & " -i 0 -c '\\fileshare\program.exe' [program install parameters]) however this didn't work. I changed the " to ' around the program patch in case that was the issue but it still won't work.

It's a silent install of Adobe Reader with the following paramters:

/sAll /rs /l /msi"/qn /norestart ALLUSERS=1 EULA_ACCEPT=YES SUPPRESS_APP_LAUNCH=YES"

Anyone got any ideas?

I'm trying to do a GUI to show a checkbox selection option for 5 scripts and each one is a silent install using psexec with silent install parameters.

Cheers

Edited by NeghVar
Link to comment
Share on other sites

Global $parameters = "/sAll /rs /l /msi /qn /norestart ALLUSERS=1 EULA_ACCEPT=YES SUPPRESS_APP_LAUNCH=YES"
Run('psexec \\' & $machine & ' -i 0 -c "\\fileshare\program.exe" ' & $parameters)
;               ^ you forgot this

Edited by omikron48
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...