Jump to content
Sign in to follow this  

problem running external problems

Recommended Posts


Hi there,

I am suddenly having problems running externally called programs. I am trying to run taskkill from a run command and

it was working up to yesterday but now i cannot seem to get it to work anymore. It comes up with the following error

Run("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???


Here is the script from the start up to the taskkill

#include <GUIConstants.au3>

#include <IE.au3>


$ScreenHeight = (@DesktopHeight - 130) / 2

$ScreenWidth = (@DesktopWidth - 220) / 2

; Create GUI and Progress Bar

GUICreate($Heading,220,130,$ScreenWidth,$ScreenHeight,-1, $WS_EX_TOPMOST)


$progressbar1 = GUICtrlCreateProgress (10,70,200,20)


$Label = GUICtrlCreatelabel ("Starting Build Progress - please wait...",10,100,200,20)


GUISetState ()

; Map Drive


GUICtrlSetData($label,"Mapping Drive")

DriveMapAdd("X:", $MappingPath)

;Disable user input


GUICtrlSetData($label,"Blocking User Input")


; Run registry entries


GUICtrlSetData($label,"Running Registry Entries")

run("regedit /s x:\newbuild\newbuildregentries.reg","c:\windows")

; explorer


GUICtrlSetData($label,"Stopping Explorer")

Run("taskkill.exe /F /IM explorer.exe")

Share this post

Link to post
Share on other sites

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

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.