A startup script can contain a list of programs that you want to run in a specific
order when Windows starts, such as connecting to the Internet and then
546 | Chapter 9: Scripting and Automation
checking your email. (Neither Explorer??™s Startup folder nor the Registry allow
you to choose the order in which programs are run.) But there are other, less
apparent uses for a startup script, such as for security or remote administration.
For example, say you??™ve discovered malware that has infected some or all of
the computers on a network. By writing a script that eliminates the malware
by deleting key files or running a removal utility and setting it up as a
startup script, you can effectively eliminate it from each computer.
But with scripts, you can take it even further: utilize a single script stored on
a single computer that is run, over the network, on all computers. This way,
you can make changes to the script once and have those changes propagated
to all computers effortlessly. So, if you place the script Startup.vbs on a
machine called Server in a folder called C:\scripts (drive C: would be shared
as ???C???), then each client machine should be configured to automatically
execute \\server\c\scripts\startup.vbs (using one of the previous methods).
The beauty of this is that when you don??™t want the script to do anything,
you can simply leave it intact yet empty. If you find that you need to, say,
make a Registry change or copy a group of files onto each computer, just
type the appropriate commands into the script and turn on (or reboot) all
the client computers.
Pages:
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761