IAG's Local Drive Mapping feature is useful for creating a work environment for your users that is similar to what they have at the office, but the default app is only good for mapping a specific share for all users. Most organizations also have a personal drive for each user, mapped from his Active-Directory profile.
It's relatively easy to create a custom application template that will achieve the same results. This is done by adding a few commands to get the connecting user's username (IAG has them from the log in credentials), and adding those to the drive mapping command.
To do this, follow these steps:
1) Close the IAG configuration console.
2) Copy the following code, and save it as SSLVPNTemplates.xml under the folder c:\whale-com\e-gap\von\conf\CustomUpdate on the IAG Server. If the CustomUpdate folder does not exist, create it.
<config><templates version="3" use-lsp="1"><!--******************************************* User-based relay to NT/AD file server *******************************************--> <!-- Auto-Sense mode --><template name="RelayUserDrive" userrights="562" repository-type="NT Domain,Active Directory" credvar-prefix="WhlDrvMap" use-with-lsp="yes" win="yes"><!--Windows--><port id="0" remoteport="139" flags="10" use-with-lsp="yes"/><config-file flags="1" path="%Temp%\DrvMain-%WhaleAppID%.bat" use-with-lsp="yes"><![CDATA[
@set Fullusername=%3@for /F "tokens=1,2 delims=\" %%%i in ('echo %Fullusername%') do set stusername=%%%j@if %1==* goto mapstar@echo Unmapping drive %1...@net use %1: /DELETE@echo Mapping drive %1 to \\%ip2relay%\%ShareName%\%stusername%, please wait...@net use %1: "\\%localip%\%ShareName%\%stusername%" %2 /USER:%3 /persistent:no@goto :EOF:mapstar@echo Mapping \\%ip2relay%\%ShareName%\%stusername% to any available drive, please wait...@net use * "\\%localip%\%ShareName%\%stusername%" %2 /USER:%3 /persistent:no]]></config-file>
<exec exe='%Temp%\DrvMain-%WhaleAppID%.bat %DrvLetter% "%WhlDrvMapPwd%" %WhlDrvMapDomain%\%WhlDrvMapUser%' flags="4" param=""/></template></templates></config>
3) Copy the following code and save it as the file WizardDefaultParam.ini under the folder c:\whale-com\e-gap\von\conf\WizardDefaults\CustomUpdate on the IAG Server. If the CustomUpdate folder does not exist, create it.
[RelayUserDrive]Name=User Home Drive MappingAppType=1WhaleApp=0Types=1,2SSLVpnTemplate=RelayUserDriveSSLVPNNumOfElements=3SSLVPNElement0ID=0SSLVPNElement1ID=ShareNameSSLVPNElement2ID=DrvLetter0Name=Server NetBIOS Name:0Type=00GuiType=00Validation=IP/DNS NotEmptyDrvLetterName=Drive Letter:DrvLetterType=2DrvLetterGuiType=3DrvLetterValue=*DrvLetterListValue=*;D;E;F;G;H;I;J;K;L;M;O;N;P;Q;R;S;T;U;V;W;X;Y;ZDrvLetterGuiWidth=35ShareNameName=Share Name:ShareNameType=2ShareNameGuiType=0ShareNameValidation=Pattern(Exclude /:*?"<>|) NotEmptyAutoLaunch=0CreateEntryLink=0ActivateSmugglingProtection=0MaxHTTPBodySize=49152ContentTypeList=application/x-www-form-urlencoded|multipart/form-data
4) Launch the IAG configuration console, and ADD a new application. The new application would appear as "User Home Drive Mapping" , the last item under the "Client/Server and Legacy Applications" container.
5) In Step 3 of the application wizard, type in the server's hostname (Netbios name), without a prefix. Enter the Share name, where all the user's folders are stored. Most organizations have a general share named "users", or something similar, and under each, the user's own folders, named after their usernames. If the individual user shares are one or more levels down, enter the double-level, with the backslash. for example, if the share format is \\fileserver\shares\userfolders\WShakespeare, the settings would be like this screenshot:
This is a more conventional setting:
6) Don't forget to have the application added to the portal by checking the V in step 4.
7) Activate the configuration.
It's common to have the application set to launch automatically when entering the portal. To do this, open the "Whale Portal" application for editing, and add a Check next to the drive mapping application in the Prerequisite Applications list:
Another thing you need to keep in mind is that this application requires some registry changes to be applied on the client machine. This needs to be done only once, and after which the client machine needs to be rebooted. This can be done by creating the "Local Drive Mapping Setup" application, and running it once on the clients. Many administrators mistakenly set the "setup" application to be a pre-requisite of the portal, or of the drive-mapping application itself, which is redundant, and confusing, because it tells the users to reboot their computer all the time.