Jaan Posted January 9, 2019 Posted January 9, 2019 This is for a off domain 3rd party machine. We normally use GPO to do this. I have a .vbs script that i copy to the machine to map the drive..... it works fine, but i just want to have it hidden when mapped. I've had a Google, and for the life of me can't find a way to map it hidden. Can anybody help please? Cheers 'args = WScript.Arguments.Count Option Explicit Dim objNetwork Dim strDriveLetter, strRemotePath, strUser, strPassword, strProfile ' Values of variables set strDriveLetter = "R:" strRemotePath = "\\computer-name\shared_folder" strUser = "computer-name\username" strPassword = "password" strProfile = "false" ' This section creates a network object. (objNetwork) ' Then apply MapNetworkDrive method. Result R: drive ' Note, this script features 5 arguments on lines 21/22. on error resume next Set objNetwork = WScript.CreateObject("WScript.Network") objNetwork.MapNetworkDrive strDriveLetter, strRemotePath, _ strProfile, strUser, strPassword 'if args > 0 then 'msgbox wscript.arguments(0) & wscript.arguments(1) 'end if
Bertie_Dellend Posted January 9, 2019 Posted January 9, 2019 You could hide the drive via the registry - something like this https://skillforge.com/hide-drives-in-windows-explorer-via-registry-setting/
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now