fly Posted August 15, 2006 Share Posted August 15, 2006 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? Link to comment Share on other sites More sharing options...
MHz Posted August 15, 2006 Share Posted August 15, 2006 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. Link to comment Share on other sites More sharing options...
fly Posted August 15, 2006 Author Share Posted August 15, 2006 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now