Sign in to follow this  
Followers 0
ChrisL

Strange

6 posts in this topic

This If FileExists(@scriptDir & "\LastWeekLog.exe") and Not ProcessExists("LastWeekLog.exe") then Run (@scriptdir & "\LastWeekLog.exe",@scriptdir) fails with Unable to execute the external program.:

This If FileExists(@scriptDir & "\LastWeekLog.exe") and Not ProcessExists("LastWeekLog.exe") then Run ("LastWeekLog.exe",@scriptdir) runs fine

Now surely this can't be so :whistle: its using autoitversion 3.2.4.9

Share this post


Link to post
Share on other sites



I think you already specified the working dir as ScriptDir so yeh.

Share this post


Link to post
Share on other sites

I think you already specified the working dir as ScriptDir so yeh.

Why? I'm pretty sure it used to work like that if I go run (@scriptDir & "\LastWeekLog.exe") that fails too, yet it has already established that the file exists so why not run it when the full path is specified?

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

OK this works (Edit :Thanks Val you posted as I was constructing this)

If FileExists(@scriptDir & "\LastWeekLog.exe") and Not ProcessExists("LastWeekLog.exe") then Run (FileGetShortName(@scriptDir & "\LastWeekLog.exe"),@scriptdir)

The full path is "C:\Documents and Settings\ChrisL\Desktop\ASK 2000 SDK\Drivers\Fujifilm\InstantClient\LastWeekLog.exe"

This also works Run ('"' & @scriptDir & '\LastWeekLog.exe"',@scriptdir) by putting speach marks around it

Have I just never come accross this, I have spaces in the path but it's Windows XP it should be able to cope with it, has anything changed with the run command in the latest releases?

Edit2: Typing C:\Documents and Settings\ChrisL\Desktop\ASK 2000 SDK\Drivers\Fujifilm\InstantClient\LastWeekLog.exe in to Start/Run box works no speach marks

Edited by ChrisL

Share this post


Link to post
Share on other sites

This also works Run ('"' & @scriptDir & '\LastWeekLog.exe"',@scriptdir) by putting speach marks around it

Have I just never come accross this, I have spaces in the path but it's Windows XP it should be able to cope with it, has anything changed with the run command in the latest releases?

This is not new... both ways can work... its even a bit more complicated when you want to use Run() with arguments.

8)


NEWHeader1.png

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