Sign in to follow this  
Followers 0
DickG

Using Run(@ComSpec ...) closes GUI

9 posts in this topic

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

Share this post


Link to post
Share on other sites



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


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

No, I don't. Should I?

Do you have AutoItSetOption("RunErrorsFatal", 0) in the script ?

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

We can not guess what your problem is, if you want help POST CODE...

or, if you dont want anyone here to see your code, go see rent-a-coder.com

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

No, I don't. Should I?

Last Seen: 35 minutes ago

***

This guy really wants help..lol

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
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)

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  
Followers 0