ChrisL Posted July 11, 2007 Share Posted July 11, 2007 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 its using autoitversion 3.2.4.9 [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
Generator Posted July 11, 2007 Share Posted July 11, 2007 I think you already specified the working dir as ScriptDir so yeh. Link to comment Share on other sites More sharing options...
ChrisL Posted July 11, 2007 Author Share Posted July 11, 2007 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? [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
Valuater Posted July 11, 2007 Share Posted July 11, 2007 (edited) Try rhis... If FileExists(@ScriptDir & "\LastWeekLog.exe") And Not ProcessExists("LastWeekLog.exe") Then Run(FileGetShortName(@ScriptDir & "\LastWeekLog.exe"), @ScriptDir) its the spaces that the CMD doesn't like 8) Edited July 11, 2007 by Valuater Link to comment Share on other sites More sharing options...
ChrisL Posted July 11, 2007 Author Share Posted July 11, 2007 (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 July 11, 2007 by ChrisL [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
Valuater Posted July 11, 2007 Share Posted July 11, 2007 This also works Run ('"' & @scriptDir & '\LastWeekLog.exe"',@scriptdir) by putting speach marks around itHave 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) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now