Re: Not so Newbie
- From: "Richard Mueller [MVP]" <rlmueller-nospam@xxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 23 Feb 2007 09:06:01 -0600
The script is designed for situations like yours. It has comments that
should give some guidance, and I certainly can answer questions about it.
Good luck.
--
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
--
"Willem" <Willem@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:629C75C8-E837-4C72-89A3-C8A2F0B8BFB8@xxxxxxxxxxxxxxxx
Hi Richard,
First of all I would like to thank you for answering my question and yes,
I
went to check out your website and I think it is very nice of you to make
al
those scripts available for free for anybody to take. Yes, this looks like
a
very difficult script and certainly not for a beginner like me. I am going
to
study it and if you do not mind come back with some more questions. The
reason I asked for this was not to start of with a script like this to
learn
but I actually have a need for something like this. I am sitting on a
network
wit 35+ computers and to go to each of those computers to individualy
install
a program is gruelling. Also I am not the network admin I programmed
together
with my boss (1 man business) a business management system for a big
company
(and are now providing support) but are sometimes requested with network
admin duties. Once again thanks a stack.
"Richard Mueller [MVP]" wrote:
Manie Verster wrote:
I have programmed in Visual Basic for Applications, VBScript and abit
little
of JavaScript but have never done server scripts before. I am lookinga
for
script to install applications to different computers on a network fromhave
my
computer or a server on the same network. But please guys, like I say I
never done these kind of scripts before, so can you please explain what
everything means. It will be much appreciated.
Thanks
Manie Verster
This is not an easy task. There are lot of issues to consider. Because it
involves running programs on remote computers, I don't think it is wise
to
take shortcuts and skip steps.
This question has come up before and I spent considerable time designing
the
scripting solution linked here:
http://www.rlmueller.net/Deploy.htm
If your goal is to learn administrative scripting, maybe this isn't the
project to start with. However, the script includes many comments that
explain each step. In brief the steps are:
1. Discover the DNS and NetBIOS names of the domain.
2. Prompt for the NetBIOS name of a group. The program will deploy to all
computers that are members of this group.
3. Determine Distinguished Name of this group and bind to the group
object.
4. Prompt for an executable to run on each remote computer in the group.
5. Prompt for any command line parameters.
6. Setup a log file to document the deployment.
7. Use WMI to bind to the specified executable file.
8. For each computer in the group:
a. Determine the NetBIOS name of the computer.
b. Ping the computer to see if it is available.
c. Connect to the remote computer with WMI.
d. Check if the executable is already running on the remote
computer.
e. Map a drive to the root of C: on the remote computer.
f. Copy the executable to the root of C: on the remote computer.
g. Run the executable.
h. Wait for the executable to finish and then delete the executable
file.
i. Remove the drive mapping
Everything is logged, so you know where the deployment failed. You
probably
will need to repeat the deployment because of computers offline, but the
log
tells you which computers need this. If the executable should not be run
twice on the remote computers, then remove computers where the deployment
was successful from the group.
The ideas for this script came from Microsoft kb article 827227 for
deploying patches:
http://support.microsoft.com/default.aspx?scid=kb;en-us;827227
Most of the techniques are explained in the text "Microsoft Windows 2000
Scripting Guide", which is available online at:
http://www.microsoft.com/technet/scriptcenter/guide/sagsas_overview.mspx?mfr=true
I hope this helps. Of course, other options include SMS and SUS. Also, I
have not yet been able to test deploying to remote Vista clients. Based
on
my experience with Vista so far, I would expect the script to fail on
Vista
computers.
--
Richard
Microsoft MVP Scripting and ADSI
Hilltop Lab web site - http://www.rlmueller.net
--
.
- References:
- Re: Not so Newbie
- From: Richard Mueller [MVP]
- Re: Not so Newbie
- From: Willem
- Re: Not so Newbie
- Prev by Date: Creating VBS to remove "._*" files from shares using recursion
- Next by Date: Run VBS on another computer, not simple call
- Previous by thread: Re: Not so Newbie
- Next by thread: Re: I need a script to make myself the NT AUTHORITY, not Dell.
- Index(es):
Relevant Pages
|