English Deutsch Français Italiano Particle Software Buy Now


Particle Software
 
Drive Mapping
   ..::   About  •  Purchasing  •  Search  •  Contact  • Home   ::..
 
Screenshots
• Sample
Downloads
Resources
• FAQ
• Macros

 
   Below shows how IntraLaunch can be used to map & disconnect network shares. All mappings can also be controlled from Javascript and VBScript.

   If the destination share is only password protected, then the first field of the param LogPass is the password. If the share is username & password protected, then the first field of LogPass is the username, and the second field is the password. The third must always remain as 'null'. Shares are always mapped non-persistent. See below for disconnecting example.

   You can also display the Windows map a share dialog box by settings the param Run to the IntraLaunch macro 'IntraLaunch:MapDriveDialog'.


 
 
<HTML>

<SCRIPT LANGUAGE="JavaScript">
  function MapIt()
  {
    IntraLaunch_MapDriveG.ExecuteIt('Null');
  }
</SCRIPT>

<BODY>

<a href="Javascript:MapIt();">Map Network Drive G:</a>

</BODY>

<OBJECT ID="IntraLaunch_MapDriveG" STYLE="display : none"
   WIDTH=1 HEIGHT=1    CODEBASE="http://intranet.net/menu/IntraLaunch.CAB#version=5,0,0,0"
   CLASSID="CLSID:0AE533FE-B805-4FD6-8AE1-A619FBEE7A23">
   <PARAM NAME="ImageLoc" VALUE="Null">
   <PARAM NAME="ImageSrc" VALUE="Null">
   <PARAM NAME="Run" VALUE="IntraLaunch:MapDrive">
   <PARAM NAME="RunParms" VALUE="">
   <PARAM NAME="DefDir" VALUE="">
   <PARAM NAME="Display" VALUE="ACTIVATE">
   <PARAM NAME="MapDrive" VALUE="\\server\share|G:">
   <PARAM NAME="LogPass" VALUE="password|null|null">
</OBJECT>

</HTML>
 
 
       


   Below shows how to use IntraLaunch to first check if a drive is mapped and then disconnect it if it is mapped. This is done using VBScript. The second True/False parameter in DisconnectShare after the drive letter is a flag whether to hide error message boxes.

 
 
<HTML>

<SCRIPT LANGUAGE="VBScript" TYPE="text/vbscript">
  Dim sDriveAvailable

  SUB DisconnectIt()
    sDriveAvailable = IntraLaunch_DriveG.GetDriveInfo("G:")

    If sDriveAvailable <> 1 Then
       sResult = IntraLaunch_DriveG.DisconnectShare("G:,True")
    Else
       MsgBox ("Drive G: not currently mapped")
    End If
  END SUB
</SCRIPT>

<BODY>

<a href="Javascript:DisconnectIt();">Disconnect Network Drive G:</a>

</BODY>

<OBJECT ID="IntraLaunch_DriveG" STYLE="display : none" WIDTH=1 HEIGHT=1    CODEBASE="http://intranet.net/menu/IntraLaunch.CAB#version=5,0,0,0"    CLASSID="CLSID:0AE533FE-B805-4FD6-8AE1-A619FBEE7A23">
   <PARAM NAME="ImageLoc" VALUE="Null">
   <PARAM NAME="ImageSrc" VALUE="Null">
   <PARAM NAME="Run" VALUE="Null">
   <PARAM NAME="RunParms" VALUE="">
   <PARAM NAME="DefDir" VALUE="">
   <PARAM NAME="Display" VALUE="ACTIVATE">
</OBJECT>

</HTML>
 
 
       


   You can pass all information from Javascript with the example below using the MapShare function. sResult will end up with a value of 0 upon success. The True in the MapShare variables specifies whether or not to display error messages. Set user and pass to nothing or "null" if no username and password are to be used.

 
 
<HTML>

<SCRIPT LANGUAGE="Javascript" TYPE="text/javascript">
  function MapIt()
    {
       var sResult;
       sResult = IntraLaunch.MapShare("\\\\fileserver.company.com\\Share,G:,user,pass,True");
    }
</SCRIPT>

<BODY>

<a href="Javascript:MapIt();">Map Network Drive G:</a>

</BODY>

<OBJECT ID="IntraLaunch" STYLE="display : none" WIDTH=1 HEIGHT=1    CODEBASE="http://intranet.net/menu/IntraLaunch.CAB#version=5,0,0,0"    CLASSID="CLSID:0AE533FE-B805-4FD6-8AE1-A619FBEE7A23">
   <PARAM NAME="ImageLoc" VALUE="Null">
   <PARAM NAME="ImageSrc" VALUE="Null">
   <PARAM NAME="Run" VALUE="Null">
   <PARAM NAME="RunParms" VALUE="">
   <PARAM NAME="DefDir" VALUE="">
   <PARAM NAME="Display" VALUE="ACTIVATE">
</OBJECT>

</HTML>
 
 
       


   If need be you can also have IntraLaunch simply use the Windows net.exe command instead. This may be required if your share is within a WindowsNT domain. The Dispaly param of HIDE hides the command prompt box that flashes on the screen temporarily.

 
 
<HTML>

<SCRIPT LANGUAGE="JavaScript">
  function MapIt()
  {
    IntraLaunch_MapDriveG.ExecuteIt('Null');
  }
</SCRIPT>

<BODY>

<a href="Javascript:MapIt();">Map Network Drive G:</a>

</BODY>

<OBJECT ID="IntraLaunch_MapDriveG" STYLE="display : none"
   WIDTH=1 HEIGHT=1    CODEBASE="http://intranet.net/menu/IntraLaunch.CAB#version=5,0,0,0"    CLASSID="CLSID:0AE533FE-B805-4FD6-8AE1-A619FBEE7A23">
   <PARAM NAME="ImageLoc" VALUE="Null">
   <PARAM NAME="ImageSrc" VALUE="Null">
   <PARAM NAME="Run" VALUE="net.exe">
   <PARAM NAME="RunParms" VALUE="use G: \\192.168.0.1\Share /USER:domain\user pass /persistent:no">
   <PARAM NAME="DefDir" VALUE="">
   <PARAM NAME="Display" VALUE="HIDE">
</OBJECT>

</HTML>
 
 
       





Copyright © 1997-2008 Particle Software - All Rights Reserved
Web services provided by Extreme Hosting