Jump to content

Using Run(@ComSpec ...) closes GUI


DickG
 Share

Recommended Posts

When I run an AutoIt EXE that opens a GUI and runs this command on my computer:

$pid = Run(@ComSpec & " /c /d" & 'ipconfig', "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)

... it works fine. But when someone else runs the same EXE on their computer (two XP machines, one Vista), they all get the same result: it starts to run, then stops and closes the GUI.

I tried all sorts of things: Using #requireadmin, disabling UPX, having them disable all anti-virus apps, etc. But the problem persists on their computers.

They can manually open a Command Prompt and run an ipconfig command on their computer.

I can't figure out why it works on my system but not on theirs.

Any ideas?

Dick

Link to comment
Share on other sites

  • Developers

We probably need a script to be able to have a look, but is the problem that the script stops execting ?

The shown line has an error in it too. It is missing a space after /d.

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

Yes, the EXE (not the script) stops running. The script runs fine on my system. When I compile the script into an EXE, it still runs fine on MY system. But not on anyone else's system.

The code before and after that line shouldn't have any effect, since I've boiled it down to that one line.

Hey, good eye. I used to have a space after "/c ", but then added " /d" to see if that would help. I forget to add the space after it. But the result was the same anyway. As soon as that line tries to run, something stops if from running, and then the GUI window gets closed. I have no idea what is doing that.

We probably need a script to be able to have a look, but is the problem that the script stops execting ?

The shown line has an error in it too. It is missing a space after /d.

Jos

Link to comment
Share on other sites

I have been working on it. I managed to get it to work. Not sure what it was, but guessing it was a problem with no space after "/c" or using "/c /d ", which caused it to fail.

Thanks for all your help.

Last Seen: 35 minutes ago

***

This guy really wants help..lol

8)

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