Jump to content
Sign in to follow this  

ShellExecute with Parameters

Recommended Posts

I have a OpenDs.vbs script (VBScript) that I'm running from the command windows as

OpenDs "Crumble Adoc (admin)\Initial Top Level Collection A"

If I use

ShellExecute("C:\AutoIt Scripts\OpenDs.vbs","Crumble Adoc (admin)\Initial Top Level Collection A")

it displays the message box with the word "Crumble" meaning that it terminates the parameter at the first space.

If I use

ShellExecute("C:\AutoIt Scripts\OpenDs.vbs")

it runs VBScript but without the parameter.

How to run the script with one parameter that has spaces?

I appreciate any help on this subject.



Share this post

Link to post
Share on other sites

HI All,

Appreciate its been a while since any activity on this topic.. However I am experiencing a similar issue as described 

The parameter doesn't seem to be recognized, This throws up the Windows Installer menu,, implying the switch is invalid

I have tried using a variety of combinations using '"/x"' "/x" ""/x"" '/x'

ShellExecute($source & "\APP\" & $APPMSI,'"/x"')

Any help would be most appreciated.

Share this post

Link to post
Share on other sites

Looking at your posted code it seems you are running an MSI?

How does the working commandline  look when shelled from the CMD prompt? 


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
Live for the present,
Dream of the future,
Learn from the past.

Share this post

Link to post
Share on other sites

Hi Jos

Thanks for getting back to me, 

Yes this is installing an MSI

This is how it looks in the command windows

app.msi, /x,E:\Temp\apppath\" /qn

Just to add the MSI works fine manually, it also works if I use Runwait


Many thanks

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...