cpaunescu
Technical User
- Jul 24, 2013
- 10
Hello,
Im trying to put together a script that would allow our users to execute it, IF, they login to a specific server, otherwise, do not run.
Example:
User A logon to P-Web-Server01
DO NOT run script
User A logon to P-RDS-Sessionshostfarm
Run script and map network drive.
I have this so far, and will not work:
strDriveLetter = "X:"
strRemotePath = "serverA"
set objNetwork=CreateObject("wscript.network")
if objNetwork.computername="P-RDS-sessionhostfarm" then
objNetwork.MapNetworkDrive strDriveLetter, strRemotePath, false, gt, pass
end if
Where is my script wrong? What am I doing wrong?
Thanks...
Im trying to put together a script that would allow our users to execute it, IF, they login to a specific server, otherwise, do not run.
Example:
User A logon to P-Web-Server01
DO NOT run script
User A logon to P-RDS-Sessionshostfarm
Run script and map network drive.
I have this so far, and will not work:
strDriveLetter = "X:"
strRemotePath = "serverA"
set objNetwork=CreateObject("wscript.network")
if objNetwork.computername="P-RDS-sessionhostfarm" then
objNetwork.MapNetworkDrive strDriveLetter, strRemotePath, false, gt, pass
end if
Where is my script wrong? What am I doing wrong?
Thanks...