rudi Posted November 7, 2008 Share Posted November 7, 2008 Hi.PsaltyDS posted a very nice code to READ what I want to set, it's hereI'm not sure if it is possible using NETSH, who knows?At this Technet document there is a VB example. Well, all this WMI stuff is quite Greek to me...Any suggestions appreciated, Rudi. Earth is flat, pigs can fly, and Nuclear Power is SAFE! Link to comment Share on other sites More sharing options...
Airwolf Posted November 10, 2008 Share Posted November 10, 2008 Here is a translation of that example to AutoIt: $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") $Computer = "." $WMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\" & $Computer & "\root\cimv2") $NetCards = $WMIService.ExecQuery("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True") For $NetCard in $NetCards $NetCard.SetDNSDomain("fabrikam.com") Next Func MyErrFunc() ;Resume EndFunc Certifications: A+, Network+, Security+, Linux+, LPIC-1, MCSA | Languages: AutoIt, C, SQL, .NETBooks: AutoIt v3: Your Quick Guide - $7.99 - O'Reilly Media - September 2007-------->[u]AutoIt v3 Development - newbie to g33k[/u] - Coming Soon - Fate Publishing - Spring 2013UDF Libraries: SkypeCOM UDF Library | ADUC Computers OU Cleanup | Find PixelChecksumExamples: Skype COM Examples - Skype4COMLib Examples converted from VBS to AutoIt Link to comment Share on other sites More sharing options...
rudi Posted November 11, 2008 Author Share Posted November 11, 2008 Here is a translation of that example to AutoIt.Thanks a lot to you!Regards, Rudi. Earth is flat, pigs can fly, and Nuclear Power is SAFE! 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