I have a pretty basic logon script that executes when a user logs onto the domain. It is a simple .bat file to map some drives. But at the end of the script I call a computer audit program to inventory installed software, and hardware. My problem is that we have a VPN and I will occasionally have a user sit at a machine in another child domain and log onto my domain from this other domain machine. Works great when people are on travle to our other offices. But what happens is my audit program ends up auditing this other domain computer.
What I really need is a conditional statement that lets the audit run if the computer is ONLY a member of my domain. Is this possible? I don't know the correct syntax or if it can be done in a simple .bat script. i would think it would be like:
if COMPUTER is Member of Domain X
then run Audit
Maybe VB? thanks.