Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Detailed logon script question... a bit long

Status
Not open for further replies.

geekchik

Technical User
Feb 28, 2002
7
US
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

 
First, why do something so expensive as checking if the client has installed the software by comparing it against an IP list? Why not just run a local machine check to see if a registry key exists for the software that is in question? We implemented something similar for Outlook. It checks to see if a user has an Outlook profile in existence on the PC, if not it prompts the user to create the profile, and we do it automatically based upon the grabbed user login information. Likewise, we also check the users' current version of DAT files for anti-virus software. If they are more than 3 versions behind, they get added to a list, and are notified.

The login script does run under the permissions of the user that is currently logged in (NT/2000/XP). Kind of an unfortunate situation since many installs require more than "Users" security level to make registry modifications. Like you we have users across the entire state, about 3,500 of them.
 
Thanks for your reply, b5passat. :eek:)

First, why do something so expensive as checking if the client has installed the software by comparing it against an IP list?

Because not all machines will be audited. For instance, one client has approximately 300 machines but we only expect them to purchase 100 audit licenses at first.


Why not just run a local machine check to see if a registry key exists for the software that is in question?

;o) Actually, you partly answered this when you said:
Kind of an unfortunate situation since many installs require more than "Users" security level to make registry modifications. Again, though adding a registry key would be a nice way to control this, because of the permissions issue it would require administrators manually setting keys; precisely the type of thing I'm trying to avoid by automating.

Thanks,

geekchik

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top