#71339 - 2002-10-31 05:29 PM
Re: WriteValue() with a non administrative logon
|
Night Hawk
Fresh Scripter
Registered: 2002-10-09
Posts: 33
Loc: NC, USA
|
May be this can get you started i used it to change the dns settings on 50 or 60 remote computers. the dns .txt being a list of the ones i wanted to change and i used the sms.ini to verify the pc was on line..
open(1,"c:\dns.txt") $pc = readline(1) $sms = "\\$pc\c$\sms.ini" while $eof = 0 $eof = @error RedirectOutput("$logfile") IF RedirectOutput("$logfile" ) = 0
if exist("$sms") $dns =Readvalue("\\$pc\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters","Hostname") ? "$pc DNS was Set to $dns"
;writevalue("\\$pc\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters","Hostname","$pc","REG_SZ") ; $dns =Readvalue("\\$pc\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters","Hostname") ; ? "$pc DNS IS now set to $dns"
;$dns1 =Readvalue("\\$pc\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters","Hostname") ? "$pc DNS was NOW Set to $dns1"
endif endif $pc = readline(1) loop close(1)
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 1362 anonymous users online.
|
|
|