Jump to content

Passing A Variable To ShellExecute


Hirvesh
 Share

Recommended Posts

Hello, I've got a simple application which stores a path to an application like this:

$captureAppPath = "D:\Program Files Portable\FSCapture53\FSCapture53\FSCapture.exe"

I have been trying to execute the above application using ShellExecute as follows:

ShellExecute(FileGetShortName($captureAppPath))

However, the programs throws an error everytime like the one below:

ShellExecute($captureAppPath)
ShellExecute(^ ERROR
->14:17:50 AutoIT3.exe ended.rc:1
>Exit code: 1    Time: 2.156

Can anybody help me in understanding what I am doing wrong?

Link to comment
Share on other sites

First you say you are running it like this

ShellExecute(FileGetShortName($captureAppPath))

then the error says it has been ran like this

ShellExecute($captureAppPath)

Which is it, pick one.

And for the record both ways work just fine for me.

I suggest you post a whole reproducer code.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

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...