Re: Kicking off multiple processes at once instead of waiting....



Thanks Joe..much appreciated.

I do know Joe how to connect to a remote registry.

I spose what Im trying to do, but cant get myself on some really really
simple examples, so i can play with them, are example scripts on how to fork
a process.
Ive looked at the perldoc but I find the doco not as clear as some good
beginner fork examples so I can test them out on my systems, then gain
confidence that way.

Appreciate your help. :)

"Joe Schaefer" <joe+usenet@xxxxxxxxxxxxxx> wrote in message
news:876457m37u.fsf@xxxxxxxxxxxxxxxxxxxxxxxx
"Simon" <shmh@xxxxxxxxxxxxxx> writes:

What Id like to be able to do, because we have so many machines to
process, is to do the following...

Connect to, say 10 machines all at the same time, then return data
back to the one main console (where I executed the script in the first
place), instead of waiting for 1 machine to end, then move on to the
next.

Any help greatly appreciated. Here is the script.

================================================================= Script

use Win32;
use Win32::Registry;


[...]

system ("net use \\\\$SystemName\\ipc\$ "password"
/user:$SystemName\\useraccount > NUL");
sleep 3;
RunRegQuery();
system ("net use \\\\$SystemName\\ipc\$ /delete /y > 2NUL > NUL"); #
Delete
previous connection

What you want to do sounds fine, but personally I don't think you're
asking the right question. What you should be asking is "How do I get
rid of these system() calls in my script?", because there's no way
to parallelize your script without doing at least that.

If I were you, I'd be looking over the Win32::Registry documentation
for a way to directly connect to a remote registry. If you can figure
out how to do that, you should be able to access the repository by
calling a suitably modified version of

RunRegQuery($SystemName);

without ever needing to make those calls to system() and sleep().

If it turns out *that* script isn't fast enough, at that point people
will be able to give you advice on how to parallellize it like you
have originally asked.

--
Joe Schaefer


.



Relevant Pages

  • Re: Email Password Expire Notifications
    ... I haven't looked at Joe's tool suggestion but most command ... Co-author of "The .NET Developer's Guide to Directory Services ... Joe Richards Microsoft MVP Windows Server Directory Services ... write a script, it will probably be easier for you to use a tool like ...
    (microsoft.public.windows.server.active_directory)
  • Re: jms in toronto
    ... Shortish version of The Famous B5 Joke Script Story: ... Peter and Andreas were on stage and Joe was up next. ...
    (rec.arts.sf.tv.babylon5.moderated)
  • Re: jms in toronto
    ... > Shortish version of The Famous B5 Joke Script Story: ... Peter and Andreas were on stage and Joe was up next. ...
    (rec.arts.sf.tv.babylon5.moderated)
  • Re: Email Password Expire Notifications
    ... Co-author of "The .NET Developer's Guide to Directory Services ... Joe Richards Microsoft MVP Windows Server Directory Services ... write a script, it will probably be easier for you to use a tool like ...
    (microsoft.public.windows.server.active_directory)
  • Re: Email Password Expire Notifications
    ... For something like this I would recommend using findexpacc instead of oldcmp, I set it up specifically to be scripted for cases like this... ... Joe Richards Microsoft MVP Windows Server Directory Services ... If you don't want to write a little .NET app for this and would rather write a script, it will probably be easier for you to use a tool like Joe Richard's oldcmp tool than to try to execute the queries directly in script, as formating the queries is a little painful in VBS. ...
    (microsoft.public.windows.server.active_directory)