Sign in to follow this  
Followers 0
chiners_68

help getting this to run

5 posts in this topic

I cant get the following to run. I think its an issue with the quotes etc. round the setup.exe and adminfile. any help appreciated

run(@ScriptDir & '"setup.exe" /adminfile ' @ScriptDir & "profilesMAK-Passive.msp")

 

 

 

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

i think the problem is in your " around the setup. as it is the command would resolve like:

C:somefolder"setup.exe" /adminfile C:somefolderprofileMAK-Passive.msp

 

try

run('"' & @ScriptDir & 'setup.exe" /adminfile' & ' "' & @ScriptDir & 'profilesMAK-Passive.msp"')

 

which should resolve to:

"C:somefoldersetup.exe" /adminfile "C:somefolderprofilesMAK-Passive.msp"

Edited by gruntydatsun

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Too much unnecessary quotes. This should be better + looks cleaner:

Run(@ScriptDir & 'setup.exe' & ' /adminfile' &  @ScriptDir & '\profiles\MAK-Passive.msp')

I am not sure if .msp will run with Run command, if it doesn't, use ShellExecute instead. ;)

i think the problem is in your " around the setup. as it is the command would resolve like:

C:somefolder"setup.exe" /adminfile C:somefolderprofileMAK-Passive.msp

 

try

run('"' & @ScriptDir & 'setup.exe" /adminfile' & ' "' & @ScriptDir & 'profilesMAK-Passive.msp"')

 

which should resolve to:

"C:somefoldersetup.exe" /adminfile "C:somefolderprofilesMAK-Passive.msp"

Edited by skysel

Share this post


Link to post
Share on other sites

Too much unnecessary quotes. This should be better + looks cleaner:

Run(@ScriptDir & 'setup.exe' & ' /adminfile' &  @ScriptDir & '\profiles\MAK-Passive.msp')

I am not sure if .msp will run with Run command, if it doesn't, use ShellExecute instead. ;)

 

Your Run statement is incorrect, as you are missing the backslash before "setup.exe"


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

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

The extra quotes are to cater for a @ScriptDir path that might have spaces in it like    "C:Program Filesmorestuffin here" :ph34r:

 

Stick with this Chiners_68

run('"' & @ScriptDir & 'setup.exe" /adminfile' & ' "' & @ScriptDir & 'profilesMAK-Passive.msp"')

Edited by gruntydatsun

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  
Followers 0