<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:p="urn:schemas-microsoft-com:office:powerpoint" xmlns:a="urn:schemas-microsoft-com:office:access" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns:b="urn:schemas-microsoft-com:office:publisher" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:odc="urn:schemas-microsoft-com:office:odc" xmlns:oa="urn:schemas-microsoft-com:office:activation" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:q="http://schemas.xmlsoap.org/soap/envelope/" xmlns:rtc="http://microsoft.com/officenet/conferencing" xmlns:D="DAV:" xmlns:Repl="http://schemas.microsoft.com/repl/" xmlns:mt="http://schemas.microsoft.com/sharepoint/soap/meetings/" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ppda="http://www.passport.com/NameSpace.xsd" xmlns:ois="http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir="http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:udc="http://schemas.microsoft.com/data/udc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sub="http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/" xmlns:ec="http://www.w3.org/2001/04/xmlenc#" xmlns:sp="http://schemas.microsoft.com/sharepoint/" xmlns:sps="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:udcs="http://schemas.microsoft.com/data/udc/soap" xmlns:udcxf="http://schemas.microsoft.com/data/udc/xmlfile" xmlns:udcp2p="http://schemas.microsoft.com/data/udc/parttopart" xmlns:wf="http://schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:dsss="http://schemas.microsoft.com/office/2006/digsig-setup" xmlns:dssi="http://schemas.microsoft.com/office/2006/digsig" xmlns:mdssi="http://schemas.openxmlformats.org/package/2006/digital-signature" xmlns:mver="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:mrels="http://schemas.openxmlformats.org/package/2006/relationships" xmlns:spwp="http://microsoft.com/sharepoint/webpartpages" xmlns:ex12t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ex12m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:pptsl="http://schemas.microsoft.com/sharepoint/soap/SlideLibrary/" xmlns:spsl="http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService" xmlns:Z="urn:schemas-microsoft-com:" xmlns:st="" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.E-MailFormatvorlage17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.E-MailFormatvorlage18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=DE link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Hello,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>please see below an example script that I use successfully for quite some time now:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>@echo off<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>set ccmd="%ProgramFiles%\ShrewSoft\VPN Client\ipsecc.exe"<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>set cfg="test.vpn"<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>set DRVFILE=drives.txt<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>rem *****************************************<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>rem * start VPN services                    *<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>rem *****************************************<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>start /w surun Start_VPN_Services.cmd<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>start "VPN" %ccmd% -r %cfg% -u myusername<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>:WAIT1<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>sleep 2<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>Rem ping a server that is only reachable when VPN is established<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>ping -n 2 testserver.vpndomain >nul 2>&1<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>@if errorlevel 1 goto WAIT1<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>echo Wait for VPN connection to be set up (6s)<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>sleep 6<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>rem *****************************************<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>rem * map network drives                    *<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>rem *****************************************<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>call netstart.cmd<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>exit<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>And here are the other scripts:<o:p></o:p></span></p><p class=MsoNormal>Start_VPN_Services.cmd<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>@echo off<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>rem *****************************************<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>rem * Start VPN services                    *<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>rem *****************************************<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>echo.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>echo Starting VPN services...<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>net start "ShrewSoft IKE Daemon"<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>net start "ShrewSoft IPSEC Daemon"<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>netstart.cmd:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>@echo off<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>rem *****************************************<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>rem * map network drives                    *<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>rem *****************************************<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>set DOMAIN=.mydomain.com<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>set NETUSER=DOMAIN\Username<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>set PASSWD=mypassword<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>set L=<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>set P=/persistent:no<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>set DRVFILE=drives.txt<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>REM Set correct login if the computer is logged in as a different user<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>if %USERDOMAIN%\%USERNAME% NEQ %NETUSER% (<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>echo logging in as pre-defined user...<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>set L=/user:%NETUSER% %PASSWD%<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>for /f "tokens=2,3 delims= " %%i in (%DRVFILE%) do (<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>if not exist %%i (<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>echo Drive %%i is mapped...<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>net use %%i %%j %L% %P%<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>rem --- Synchronising client PC system clock<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>surun net time \\testserver.mydomain /YES /SET<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>finally, the drives.txt file needed by the netstart script:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>OK           H:        \\FS01.mydomain.com\user$ <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>OK           I:        \\FS02.mydomain.com\Prog3 <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>OK           T:        \\FS02.mydomain.com\Data1<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>All these scripts and the drives config file should be placed into one directory, and, of course, adjusted to your requirements. SuRun is a neat little program which allows several commands to be run as an administrator. See <a href="http://kay-bruns.de/wp/software/surun/">http://kay-bruns.de/wp/software/surun/</a> for more details.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>In order to avoid the disconnect problem described here in the mailing list I start the Shrew Soft VPN services only if required. After closing the VPN connection, I also shutdown these services.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Kind regards,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Gerd<o:p></o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";mso-fareast-language:DE'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";mso-fareast-language:DE'> vpn-help-bounces@lists.shrew.net [mailto:vpn-help-bounces@lists.shrew.net] <b>On Behalf Of </b>Rosaida Angulo<br><b>Sent:</b> Friday, October 18, 2013 9:41 PM<br><b>To:</b> vpn-help@lists.shrew.net<br><b>Subject:</b> [vpn-help] Domain login and network drives map<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-CA>Hi,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-CA>I downloaded the Professional version and I tried to get my network drives mapped through the VPN as we do in our office.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-CA>The tunnel was established, I was asked to enter my domain credentials, I accessed the server folders and files but it doesn’t map automatically the drives that we have configured in our Windows server 2008 R2 through GPO.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-CA>Is there a way to have my network drives mapped with my connection with Shrew Soft VPN?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-CA>Thanks,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA>Rosie<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA><o:p> </o:p></span></p></div></body></html>