We administer a network with several domains and over a thousand machines altogether between our various clients, some of which are a five hour drive away. We are about to start selling our clients hardware/software auditing services for their PCs on our network, and don't want to have to walk around to each machine and load the software manually.
I've worked with VBscript in ASP sites, but have never written a logon script, and what I want to do is create a script to sit on a domain controller and:
1. check the IP of the user logging in against a list of audit-licensed IPs (I'm thinking of an .ini with two sections, one for the IP and one to tell whether it's downloaded and run the audit software yet)
2. if found, check a corresponding value to see if that IP has run the initial download of the audit software yet
3. if so, halt, if not, have the machine download and run the audit software from the domain controller and write to the .ini to indicate it's been done.
4. find an available drive letter, map a drive, write any errors to a logfile on the remote drive, and unmap the drive
Things it's good to know:
The DCs are NT and 2k, and the computers run the gamut of Windows OSs, all the way back to 3.11 in one case.
I'm not concerned about network traffic as far as the initial download of the software goes... it's small and we won't add several hundred IPs all on the same day or anything like that.
The reason I only need the script to run the audit software once on any given IP is that once it's been run, it self-schedules for the future on that machine.
Main questions I have:
When the login script is run, is it run on the machine logging in, with the permissions of the user logging in? And therefore are commands executed locally, rather than on the domain controller?
I remember having read at one point about a Wscript.Network or some similar class... what's the VBscript equivalent, and does it have a property that gives the local machine's IP?
Do any of the things I've mentioned have different answers depending on the local machine's OS version?
Can anyone point me to good info on how to do the tasks needed for this script? (Read from/write to an .ini, determine IP, download and run software, the drive mapping/unmapping tasks, etc.)
And of course, if anyone has a simpler way to do all this, by all means please let me know!! ;o)
Thanks very much for any help.
geekchik
I've worked with VBscript in ASP sites, but have never written a logon script, and what I want to do is create a script to sit on a domain controller and:
1. check the IP of the user logging in against a list of audit-licensed IPs (I'm thinking of an .ini with two sections, one for the IP and one to tell whether it's downloaded and run the audit software yet)
2. if found, check a corresponding value to see if that IP has run the initial download of the audit software yet
3. if so, halt, if not, have the machine download and run the audit software from the domain controller and write to the .ini to indicate it's been done.
4. find an available drive letter, map a drive, write any errors to a logfile on the remote drive, and unmap the drive
Things it's good to know:
The DCs are NT and 2k, and the computers run the gamut of Windows OSs, all the way back to 3.11 in one case.
I'm not concerned about network traffic as far as the initial download of the software goes... it's small and we won't add several hundred IPs all on the same day or anything like that.
The reason I only need the script to run the audit software once on any given IP is that once it's been run, it self-schedules for the future on that machine.
Main questions I have:
When the login script is run, is it run on the machine logging in, with the permissions of the user logging in? And therefore are commands executed locally, rather than on the domain controller?
I remember having read at one point about a Wscript.Network or some similar class... what's the VBscript equivalent, and does it have a property that gives the local machine's IP?
Do any of the things I've mentioned have different answers depending on the local machine's OS version?
Can anyone point me to good info on how to do the tasks needed for this script? (Read from/write to an .ini, determine IP, download and run software, the drive mapping/unmapping tasks, etc.)
And of course, if anyone has a simpler way to do all this, by all means please let me know!! ;o)
Thanks very much for any help.
geekchik