Net_MapNetworkDrive
Description
Section titled “Description”Maps a network drive. Can disconnect if an existing drive is mapped. Use Domain\UserName if you wish to map a drive using another User.
Using * as password, the CapaInstaller reads and decrypts the password if it has been encrypted using CapaInstaller.
See more about the password encryption feature Using passwords in CapaInstaller VB Scripting Library
Syntax
Section titled “Syntax”Net_MapNetworkDrive(sDrive, sServerShare, bDisconnectExisting, sUserName, sPassword) As Boolean
Parameters
Section titled “Parameters”sDrive (String)
Section titled “sDrive (String)”Drive letter to map
sServerShare (String)
Section titled “sServerShare (String)”UNC path to map
bDisconnectExisting (Boolean)
Section titled “bDisconnectExisting (Boolean)”Disconnect existing device if already mapped
sUserName (String)
Section titled “sUserName (String)”Username. Use if you must connect with another user
sPassword (String)
Section titled “sPassword (String)”Password for the user. Use * if the password is encrypted by CapaInstaller in registry
Example
Section titled “Example”If bStatus Then bStatus = Net_MapNetworkDrive("Q:", "\\CAPAINSTALLER\PRINTERSHARE", True, "", "")Related functions
Section titled “Related functions”Net_RemoveNetworkDrive Net_EnumNetworkDrives Net_EnumNetworkDrivePaths Constants Package Property Variables