Non Domain computer needs authenication VBS script help - TechRepublic
General discussion
February 5, 2008 at 09:00 AM
al3x

Non Domain computer needs authenication VBS script help

by al3x . Updated 18 years, 4 months ago

Ok, my current job allows personal laptops to the domain resources without joining the domain. So what ever local profile is on the laptop stays like that. No 2nd profile (domain profile) will be created on the personal laptop.
so once he connects his personal laptop to our network, he’ll just click “start”, “run”, then “\\server”. It will prompt him a username and password. He will type in his domain username and password, now he has access to all domain resources.

I then created some auto network mappings for the user (sloppy vbs but it works):

on error resume next
Set objNetwork = CreateObject(“WScript.Network”)
strDriveLetter = “S:”
strRemotePath = “\\server\common”
strUser = “domainuser”
strPassword = “domainpassword”
strProfile = “False”
objNetwork.MapNetworkDrive strDriveLetter, strRemotePath, strProfile, strUser, strPassword
strDriveLetter = “F:”
strRemotePath = “\\server\DATA”
strUser = “domainuser”
strPassword = “domainpassword”
strProfile = “False”
objNetwork.MapNetworkDrive strDriveLetter, strRemotePath, strProfile, strUser, strPassword
strDriveLetter = “U:”
strRemotePath = “\\server1\USERS_snapw2k5\Domain1\username”
strUser = “domainuser”
strPassword = “domainpassword”
strProfile = “False”
objNetwork.MapNetworkDrive strDriveLetter, strRemotePath, strProfile, strUser, strPassword

So I put this script in their startup and it runs everytime they turn on their computer. Then it automatically authenicates their personal laptop to our domain.

So now I’m requested to give the user all access to the domain, not just the mappings.

So my question is how do i write a VBS script that allows and authenticate them to just “\\server” auto. So this way they have a access to the entire domain and not specific paths??

Thanks

This discussion is locked

All Comments