Jump to content
Sign in to follow this  
gingerpantman

Calling an Exe with switches

Recommended Posts

gingerpantman

Hi all,

Im trying to run and exe with commands

run (@ProgramFilesDir & "\LANDesk\LDClient\sdmcache\ldms\Packages\3M\Software\setup.exe" /s /f1"C:\temp\3M\Software\RFIDResponse.iss")

The below works but the above fails

run (@ProgramFilesDir & "\LANDesk\LDClient\sdmcache\ldms\Packages\3M\Software\setup.exe"

 

I know the setup command and switches work fine as i can do them in CMD, any ideas?

 

Also i would like to change the C:\temp\3M\Software\RFIDResponse.iss path to the same path as the exe @ProgramFilesDir & "\LANDesk\LDClient\sdmcache\ldms\Packages\3M\Software\setup.exe Is there an easier way to do this or do i just have to repeat the @programfilesdir  ?

 

Edited by gingerpantman

Share this post


Link to post
Share on other sites
UEZ

Try ShellExecute

 

 


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites
ViciousXUSMC

Run it as a CMD with @ComSpec 

Just an example not probably the right combination of quotes to pass the cmd properly.

Run(@ComSpec & " /k " & @ProgramFilesDir & "\LanDesk\LDClient\sdmcache\....")

 

Share this post


Link to post
Share on other sites
AdamUL

Watch your quotes.  Give this a try.

Run('"' & @ProgramFilesDir & '\LANDesk\LDClient\sdmcache\ldms\Packages\3M\Software\setup.exe" /s /f1"C:\temp\3M\Software\RFIDResponse.iss"')

 

Adam

Share this post


Link to post
Share on other sites
JLogan3o13

gingerpantman, as I mentioned in your previous thread (really wasn't a need to open a new thread, since this is the same install), ShellExecute or ShellExecuteWait is your best bet for these kinds of installs. Certainly no need to run it from command prompt. I would do something like this:

 

ShellExecuteWait(@ProgramFilesDir & "\LANDesk\LDClient\sdmcache\ldms\Packages\3M\Software\setup.exe", '/s /f1 "C:\temp\3M\Software\RFIDResponse.iss"')

 

Edited by JLogan3o13

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
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
Sign in to follow this  

×