Jump to content

Recommended Posts

Posted

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")

 

 

 

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
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
  • Moderators
Posted

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"

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

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

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
  • Recently Browsing   0 members

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