[Tutor] NT/2000 Administration

alan.gauld@bt.com alan.gauld@bt.com
Wed, 29 Aug 2001 12:07:51 +0100


> trying to learn a scripting language to automate some NT 
> tasks across a domain (Installing applications, copying 
> files, registry edits, managing user accounts and such). 

I assume you've looked at WSH which is Microsofts solution 
for this and comes 'out of the box' with NT etc?

> The ability to compile these
> scripts into tamper-proof .exe's is very important.  

NT includes an encrypted script facility - not an exe but 
the WSH interpreter can execute encrypted scripts...

> VBScript, Perl, and others), 

WSH can work with VBScrip and JScript out of the box 
and Perl and Python can be added.

> take to learn any one of them,  I would like to ask whether 
> anyone uses Python in this reqard and what they think about it. 

Lots of people do although I suspect most without using the 
exe option. Do you really need that?

py2exe will do it but its not trivial and the vast majority of 
sys admins work without encrypting scripts - just remove the 
write privileges on the .py file!(*)

If you do go the Python route then you really should buy a 
copy of Mark Hammond's book on using Python on Win32 
- published by O'Reilly.

Alan G

(*) another way is to write the functionality in a module 
then the main program becomes:

import myprog
if __name__ == "__main__" : myprog.run()

That way you only distribute the two lines of source shown 
plus the precompiled myprog.pyc file. The latter is easily 
decompiled by an experienced user but at least its harder 
to tamper with.