Guest Guest_TimBs Posted June 4, 2004 Share Posted June 4, 2004 Hi, I'm trying to display results from a Doc command to a window eg Net View. I'm using the following code which I found on your site Run(@comspec,"") winwait(@comspec) controlsend(@comspec,"","","Net view{enter}") sleep(1000) controlsend(@comspec,"","","!{space}es{enter}") --- not sure what this is doing winclose(@comspec) msgbox(1,"Info",clipget()) Problem are: 1. I want to hide the Dos window but don't seem to be able to get a result if I use @SW_HIDE in the first line ie Run(@comspec,"",@SW_HIDE) 2. This code works on a Win 2000 box but not NT Can anyone help please Link to comment Share on other sites More sharing options...
trids Posted June 4, 2004 Share Posted June 4, 2004 ;Stock standard AU3 $sResultsFile = "C:\results.txt" RunWait(@comspec & " /c net view >" & $sResultsFile,"",@SW_HIDE) $sResults = FileRead($sResultsFile, FileGetSize($sResultsFile)) Msgbox(4096 + 48,"net view >" & $sResultsFile,$sResults) ;Alternative using CB RunWait(@comspec & " /c net view|cb","",@SW_HIDE) $sResults = ClipGet() Msgbox(4096 + 48,"net view|cb",$sResults) EXITFor CB.EXE add-on utility, see here in the Scripts And Scraps ForumHTH Link to comment Share on other sites More sharing options...
Guest Guest_TimBS Posted June 5, 2004 Share Posted June 5, 2004 Hi, Thanks for that --- it's brilliant, just what I wanted 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