Sign in to follow this  
Followers 0
fly

Odd issue with Windows 2000 and comspec

3 posts in this topic

okay, i have designed a GUI that will display all the machines on our network. To do this, I run:

$iRunWaitCW1 = RunWait(@ComSpec & " /c " & 'net view > %temp%\pclist.txt', "", @SW_HIDE)

On Windows 2000, it fails with a return code of 2, but only the first time. If I hit my 'scan' button a 2nd time, things work as planned. If I run the same command from a command prompt, it works the first time and every time.

What am I doing wrong?

Share this post


Link to post
Share on other sites



try this

$iRunWaitCW1 = RunWait(@ComSpec & ' /c net view > pclist.txt', @TempDir, @SW_HIDE)

If it still seems faulty, then use a /k instead of /c and remove the @SW_HIDE to see the error.

Share this post


Link to post
Share on other sites

try this

$iRunWaitCW1 = RunWait(@ComSpec & ' /c net view > pclist.txt', @TempDir, @SW_HIDE)

If it still seems faulty, then use a /k instead of /c and remove the @SW_HIDE to see the error.

Well sweet! I think that fixed it. Damn I love you guys in a totally hetro way.

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