#46343 - 2003-10-11 12:48 AM
Re: read value, perfom action, del value
|
nostradamus99
Fresh Scripter
Registered: 2003-10-06
Posts: 10
|
Hi,
I tried the UDF's but was unable to get it to work..had some difficulty understanding what the specified UDF's do and how they work. The standard kix commands are better documented. I know it's more work but he who is not smart will need more code I guess.
This is what I came up with..thought I'd post it so that some other starter might have some use for it. Thanks for all good and fast responses:
:Begin ;Shell '%Comspec% /e:1024 /c "net use X: /d"' Shell '%comspec% /e:1024 /c d:\scripts\attrib.exe +R \\Server\Directory\pcchange.ini' Open (1, "\\Server\Directory\pcchange.ini") = 0
While @ERROR = 0 $PCNAME = ReadLine(1) ? $PCNAME ?"connecting to $PCNAME...." Use X: "\\$pcname\c$" Sleep 1 Shell '%comspec% /e:1024 /c d:\scripts\xcacls.exe Path /t /c /g Everyone:c SYSTEM:f administrators:f /y ' Copy "d:\scripts\file.ini" "pathname" Sleep 1 $versie = ReadProfileString ("pathname", "Version","version") If $versie <> "1.4" GoTo Writebad Else GoTo Writeini EndIf :Writeini Shell '%Comspec% /e:1024 /c "net use X: /d"' Open (3,Done.ini,5) WriteLine(3,"$PCNAME " + @TIME + " " + @DATE + Chr(13) + Chr(10)) >nul Close(3) >nul GoTo Check :Writebad Shell '%Comspec% /e:1024 /c "net use X: /d"' Open (4,Error.ini,5) WriteLine(4,"$PCNAME " + @TIME + " " + @DATE + Chr(13) + Chr(10)) Close(4) GoTo Check :Check If $PCNAME="" GoTo CloseIT EndIf Loop
:CloseIT $ = Close (1) Shell '%comspec% /e:1024 /c d:\scripts\attrib.exe -R \\Server\Directory\pcchange.ini' Del "\\Server\Directory\pcchange.ini" Sleep 1 Open (5,"\\Server\Directory\pcchange.ini",1) Sleep 1 Shell '%comspec% /e:1024 /c d:\scripts\xcacls.exe \\Server\Directory\pcchange.ini /t /c /g Everyone:rwe SYSTEM:f administrators:f /y ' Close(5) GoTo End
:End ? "End of inputscript"
|
Top
|
|
|
|
read value, perfom action, del value
|
nostradamus99
|
2003-10-06 02:54 PM
|
Re: read value, perfom action, del value
|
Lonkero
|
2003-10-06 03:01 PM
|
Re: read value, perfom action, del value
|
nostradamus99
|
2003-10-06 03:12 PM
|
Re: read value, perfom action, del value
|
Lonkero
|
2003-10-06 03:20 PM
|
Re: read value, perfom action, del value
|
Radimus
|
2003-10-06 04:02 PM
|
Re: read value, perfom action, del value
|
nostradamus99
|
2003-10-06 04:18 PM
|
Re: read value, perfom action, del value
|
Radimus
|
2003-10-06 04:19 PM
|
Re: read value, perfom action, del value
|
nostradamus99
|
2003-10-06 04:30 PM
|
Re: read value, perfom action, del value
|
Howard Bullock
|
2003-10-06 04:35 PM
|
Re: read value, perfom action, del value
|
Radimus
|
2003-10-06 06:18 PM
|
Re: read value, perfom action, del value
|
nostradamus99
|
2003-10-06 06:48 PM
|
Re: read value, perfom action, del value
|
Radimus
|
2003-10-06 06:55 PM
|
Re: read value, perfom action, del value
|
nostradamus99
|
2003-10-06 07:08 PM
|
Re: read value, perfom action, del value
|
Sealeopard
|
2003-10-06 07:12 PM
|
Re: read value, perfom action, del value
|
Lonkero
|
2003-10-06 07:14 PM
|
Re: read value, perfom action, del value
|
nostradamus99
|
2003-10-06 07:25 PM
|
Re: read value, perfom action, del value
|
nostradamus99
|
2003-10-11 12:48 AM
|
Re: read value, perfom action, del value
|
Lonkero
|
2003-10-11 12:57 AM
|
Re: read value, perfom action, del value
|
nostradamus99
|
2003-10-10 01:32 PM
|
Re: read value, perfom action, del value
|
Sealeopard
|
2003-10-10 03:14 PM
|
Re: read value, perfom action, del value
|
nostradamus99
|
2003-10-10 03:41 PM
|
Re: read value, perfom action, del value
|
Lonkero
|
2003-10-10 05:52 PM
|
Re: read value, perfom action, del value
|
Radimus
|
2003-10-10 05:55 PM
|
Re: read value, perfom action, del value
|
Lonkero
|
2003-10-10 07:05 PM
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 388 anonymous users online.
|
|
|