Jump to content

Autoit-invoked cmd.exe


cag8f
 Share

Go to solution Solved by Jos,

Recommended Posts

I'm experiencing some unexpected behavior from an Autoit-invoked command prompt.  I can open a command prompt using:

Run("C:\WINDOWS\SYSTEM32\CMD.EXE")

After the Autoit script has finished, and the command prompt window still exists, I can run some commands like ipconfig and cd.. without issue.  However if I try to ping ('ping www.google.com'), a 2nd command prompt appears to try to open, then is immediately closed. Furthermore, this repeats itself infinitely to the point where I have to reset/logoff Windows (Win 7 32 bit) in order to kill those processes (task manager will not do it).  Anyone know why this is happening?

FYI this issue also occurs if I open the command prompt using 

Run(@ComSpec & " /K " & 'commandName', "", @SW_MAXIMIZE)

.

 
Link to comment
Share on other sites

  • Developers
  • Solution

let me guess: You compiled your script and it is called "Ping.au3" ?

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

Thanks JOS.  Yes I named my file Ping.au3, which obviously conflicts with an Autoit function.  I renamed mine and the issue was resolved.

It conflicts with the dos command Ping.exe and basically start shelling itself indefinitely. ;)

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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