Page 1 of 1 1
Topic Options
#119582 - 2004-05-14 04:29 PM Loop w/ Var
Trox Offline
Fresh Scripter

Registered: 2002-09-17
Posts: 34
Loc: St. Petersburg, FL
I am trying to setup a directory on every PC in my company with specific rights. I have figured this out on a PC by PC basis by applying the following code:

-------------------------------------------------
MD "\\spghhr02\c$\Documents and Settings\All Users\Application Data\Visionsoft"
Shell '%comspec% /c \\spghmbrsrv01\netlogon\XCACLS "\\spghhr02\c$\Documents and Settings\All Users\Application Data\Visionsoft" /Y /C /T /G Everyone:F'
----------------------------------------------------

What I would like to do is have the SPGHHR02 be a variable that I can either be prompted for OR pulled from a text file containing the PC names in my company.

Thanks for any insight you can bring my way
_________________________
Thanks ~ Trox John Wayne's not dead - he's frozen. And as soon as we find the cure for cancer we're gonna thaw out the duke and he's gonna be pretty pissed off! ~Dennis Leary~

Top
#119583 - 2004-05-14 04:41 PM Re: Loop w/ Var
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Create a file containing one PC name on each line, and try something like this:

Code:
If Not Open(1,"pclist.txt")

$sPC=ReadLine(1)
While $sPC
...Do your updates to $sPC here...
$sPC=ReadLine(1)
Loop
$=Close(1)
EndIf


Top
#119584 - 2004-05-14 04:56 PM Re: Loop w/ Var
Trox Offline
Fresh Scripter

Registered: 2002-09-17
Posts: 34
Loc: St. Petersburg, FL
This worked perfect. Much appreciated!!!
_________________________
Thanks ~ Trox John Wayne's not dead - he's frozen. And as soon as we find the cure for cancer we're gonna thaw out the duke and he's gonna be pretty pissed off! ~Dennis Leary~

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Henriques) and 2516 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.053 seconds in which 0.027 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org