Jump to content
Sign in to follow this  
Akton

RunWait with capture but no window?

Recommended Posts

Akton

Hi,

I'm doing a RunWait(@ComSpec & " /c " & "commandName >output.txt")

Which works fine, except a dos window opens - and since i need to call this several times it becomes annoying (and you can't work with the compute meaniwhile) that this window pops up and closes up and closes etc.

Is there someway i can run the command above, and capture the output but don't have the DOS window flash open?

(Windows 7 )

Share this post


Link to post
Share on other sites
Akton

@SW_HIDE should do it.

I tried that but it didn't work.. *sigh*

I wonder if that is because the command opens its own window?

Share this post


Link to post
Share on other sites
andygo

I tried that but it didn't work.. *sigh*

I wonder if that is because the command opens its own window?

mabye you forgot the working dir or 2 "" between your command and the @SW_HIDE:

RunWait(@ComSpec & " /c " & "commandName >output.txt", "", @SW_HIDE )

if you dont want to set workingdir, you anyway have to write like this.

Share this post


Link to post
Share on other sites
Akton

mabye you forgot the working dir or 2 "" between your command and the @SW_HIDE:

RunWait(@ComSpec & " /c " & "commandName >output.txt", "", @SW_HIDE )

if you dont want to set workingdir, you anyway have to write like this.

You were right, I forgot the "" - indeed it works.

Thanks for your help :)

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.