rajeshontheweb Posted May 4, 2009 Share Posted May 4, 2009 (edited) i wasted half an hour trying to work on getting this to work, Domain ------------------------------------------------------------------------------- MSHOME The command completed successfully. this is the output from Local $s_Buf = '', $a_Buf, $i_Pid = Run(@ComSpec & ' /c net view /domain', '', @SW_HIDE, 2 + 4) While Not @error $s_Buf &= StdoutRead($i_Pid) WEnd ConsoleWrite(@CRLF & $s_Buf) I need to Extract the <MSHOME> part only (it comes with a few spaces behind it. of course i do have a solution with string mid , etc but itlooks ridiculous. please help. Edited May 4, 2009 by rajeshontheweb Started late is much better than having never started it!!!!Failure is another step towards success. I've been messing around with: Adding Entry to 'Hosts'File Information Lister (Logger)Yet Another AutoIT Error Handler Yet Another AutoIT Error Handler & Debugger Control your App's TaskBar Button YCurrency Ticker (Latest Release : 16 Apr 2009)_WinInetInternetCheckConnection UDF Symantec Definitions Lister UDF _GetLocalIPAddresses UDF UDF to get Special Folder Information WMI_NetworkAdapterConfiguration2Array WMI_CDRomDriveCapabilities _ScriptExists - Check if your au3 script is running!! Uninstaller UDF Get Version for your application (at script level or compiled stage) Uninstaller Pro - faster alternative to windows application removal applet Link to comment Share on other sites More sharing options...
rajeshontheweb Posted May 4, 2009 Author Share Posted May 4, 2009 just an update noobie trial will this work on all cases? $a_Buf = StringRegExp($s_Buf, "\n([0-9a-zA-Z-]*)", 3) i will be using $a_Buf[2] which contains the WorkGroup name in most cases i have tried! Started late is much better than having never started it!!!!Failure is another step towards success. I've been messing around with: Adding Entry to 'Hosts'File Information Lister (Logger)Yet Another AutoIT Error Handler Yet Another AutoIT Error Handler & Debugger Control your App's TaskBar Button YCurrency Ticker (Latest Release : 16 Apr 2009)_WinInetInternetCheckConnection UDF Symantec Definitions Lister UDF _GetLocalIPAddresses UDF UDF to get Special Folder Information WMI_NetworkAdapterConfiguration2Array WMI_CDRomDriveCapabilities _ScriptExists - Check if your au3 script is running!! Uninstaller UDF Get Version for your application (at script level or compiled stage) Uninstaller Pro - faster alternative to windows application removal applet Link to comment Share on other sites More sharing options...
Authenticity Posted May 4, 2009 Share Posted May 4, 2009 Dim $oObj = ObjGet('WinNT:') $oObj.Filter = 'domain' For $oItem In $oObj ConsoleWrite($oItem.Name & @LF) Next Link to comment Share on other sites More sharing options...
rajeshontheweb Posted May 4, 2009 Author Share Posted May 4, 2009 i do have a WMI solution, but Net View is gonna be employed in my script any ways and btw net view is far quicker than WMI engine, and more, WinNT is new to me, i used someother object. Started late is much better than having never started it!!!!Failure is another step towards success. I've been messing around with: Adding Entry to 'Hosts'File Information Lister (Logger)Yet Another AutoIT Error Handler Yet Another AutoIT Error Handler & Debugger Control your App's TaskBar Button YCurrency Ticker (Latest Release : 16 Apr 2009)_WinInetInternetCheckConnection UDF Symantec Definitions Lister UDF _GetLocalIPAddresses UDF UDF to get Special Folder Information WMI_NetworkAdapterConfiguration2Array WMI_CDRomDriveCapabilities _ScriptExists - Check if your au3 script is running!! Uninstaller UDF Get Version for your application (at script level or compiled stage) Uninstaller Pro - faster alternative to windows application removal applet Link to comment Share on other sites More sharing options...
Authenticity Posted May 5, 2009 Share Posted May 5, 2009 (edited) If you're still interested, it's using Ward's MemoryDll.au3 library which I find to be fun and working. NTServerEnum.au3NTServerEnum.txt Edited May 6, 2009 by Authenticity Link to comment Share on other sites More sharing options...
rajeshontheweb Posted May 5, 2009 Author Share Posted May 5, 2009 thanks a lot, i might use it later, i had seen the ServerENum Function in MSDN but as always, being a nube with dllcalls, and the techinicalities of the errors, i didnt wanna try it yet. in near future, i would like to use that funtion. i do like dll call rather than net view. :-) Started late is much better than having never started it!!!!Failure is another step towards success. I've been messing around with: Adding Entry to 'Hosts'File Information Lister (Logger)Yet Another AutoIT Error Handler Yet Another AutoIT Error Handler & Debugger Control your App's TaskBar Button YCurrency Ticker (Latest Release : 16 Apr 2009)_WinInetInternetCheckConnection UDF Symantec Definitions Lister UDF _GetLocalIPAddresses UDF UDF to get Special Folder Information WMI_NetworkAdapterConfiguration2Array WMI_CDRomDriveCapabilities _ScriptExists - Check if your au3 script is running!! Uninstaller UDF Get Version for your application (at script level or compiled stage) Uninstaller Pro - faster alternative to windows application removal applet 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