ScriptNovice Posted May 11, 2007 Share Posted May 11, 2007 Hi there,I am suddenly having problems running externally called programs. I am trying to run taskkill from a run command andit was working up to yesterday but now i cannot seem to get it to work anymore. It comes up with the following errorRun("taskkill.exe /F /IM explorer.exe")Unable to execute the external program.The directory name is invalid.If i try and replace this with another run command calling e.g notepad it comes up with exactly the same error. I am not sure if it's something higher up in the script that is causing this.Any suggestions???ThanksHere is the script from the start up to the taskkill#include <GUIConstants.au3>#include <IE.au3>dim $USERNAME $ScreenHeight = (@DesktopHeight - 130) / 2$ScreenWidth = (@DesktopWidth - 220) / 2; Create GUI and Progress BarGUICreate($Heading,220,130,$ScreenWidth,$ScreenHeight,-1, $WS_EX_TOPMOST)$n=GUICtrlCreatePic($ImagePath,50,0,100,70)$progressbar1 = GUICtrlCreateProgress (10,70,200,20)GUICtrlSetColor(-1,32250)$Label = GUICtrlCreatelabel ("Starting Build Progress - please wait...",10,100,200,20)GUISetBkColor(0xFFFFFF)GUISetState (); Map DriveGUICtrlSetData($progressbar1,1)GUICtrlSetData($label,"Mapping Drive")DriveMapAdd("X:", $MappingPath);Disable user inputGUICtrlSetData($progressbar1,5)GUICtrlSetData($label,"Blocking User Input")BlockInput(1); Run registry entriesGUICtrlSetData($progressbar1,10)GUICtrlSetData($label,"Running Registry Entries")run("regedit /s x:\newbuild\newbuildregentries.reg","c:\windows"); explorerGUICtrlSetData($progressbar1,10)GUICtrlSetData($label,"Stopping Explorer")Run("taskkill.exe /F /IM explorer.exe") Link to comment Share on other sites More sharing options...
PsaltyDS Posted May 11, 2007 Share Posted May 11, 2007 Do TaskKill.exe and notepad.exe run for you from a regular command line? I'm wondering if your PATH environment variable may have become invalid. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law 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