﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>The VNC Manager - SmartCode Solutions Forum / General / VNC Tips &amp; Tricks  / Automatic VPN Connections Using RASDIAL / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>The VNC Manager - SmartCode Solutions Forum</description><link>http://vncmanager.com/forum/</link><webMaster>forums@s-code.com</webMaster><lastBuildDate>Wed, 17 Mar 2010 19:47:18 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Automatic VPN Connections Using RASDIAL</title><link>http://vncmanager.com/forum/Topic704-15-1.aspx</link><description>Had a type in one line of the batch file script above. It should be this:&lt;/P&gt;&lt;P&gt;if %ERRORLEVEL% == 0 goto :bye</description><pubDate>Mon, 30 Oct 2006 13:54:03 GMT</pubDate><dc:creator>ckpaulino</dc:creator></item><item><title>RE: Automatic VPN Connections Using RASDIAL</title><link>http://vncmanager.com/forum/Topic704-15-1.aspx</link><description>Thanks! That is a great tip!&lt;/P&gt;&lt;P&gt;I added something to it because I only want to automatically connect with VPN when I'm not on my office LAN.&lt;/P&gt;&lt;P&gt;So, to do this, I just check for a piece of my office IP. If it finds this string, it knows I'm on the office network already and skips the VPN connection. The text in () is just for notes:&lt;/P&gt;&lt;P&gt;ipconfig | findstr "192.168"  (this can be any part of your office IP that will always be the same)&lt;BR&gt;if not ERRORLEVEL 0 echo goto :bye  (if no IP with 192.168 in it exists, then skip the next line)&lt;BR&gt;rasdial.exe WorkVPN joeuser joepassword&lt;/P&gt;&lt;P&gt;:bye</description><pubDate>Tue, 24 Oct 2006 16:02:15 GMT</pubDate><dc:creator>ckpaulino</dc:creator></item><item><title>Automatic VPN Connections Using RASDIAL</title><link>http://vncmanager.com/forum/Topic704-15-1.aspx</link><description>&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #1f5080; FONT-FAMILY: Verdana"&gt;I thought I would as this tid bit since the section is of the forum looks too empty.&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #1f5080; FONT-FAMILY: Verdana"&gt;A simple way to auto connect your VPN's to your Registered Servers with rasdial.exe &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #1f5080; FONT-FAMILY: Verdana"&gt;1: Configure your VPN connection if you have not done so already.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #1f5080; FONT-FAMILY: Verdana"&gt;2: Create an new batch script and name it something descriptive.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #1f5080; FONT-FAMILY: Verdana"&gt;3: Edit your new batch script and use the following syntax....&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #1f5080; FONT-FAMILY: Verdana"&gt;    rasdial.exe "MYVPNNAME" "USERNAME" "PASSWORD"  (no quotes!!!)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #1f5080; FONT-FAMILY: Verdana"&gt;4: Save and Exit&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #1f5080; FONT-FAMILY: Verdana"&gt;5: Create another batch script and name it vpn_disconnect.bat, use this....&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #1f5080; FONT-FAMILY: Verdana"&gt;    rasdial.exe  /disconnect &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #1f5080; FONT-FAMILY: Verdana"&gt;6: In VNC Manager go to Tools &amp;gt; Options &amp;gt; Action Scripts &amp;gt; Add&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #1f5080; FONT-FAMILY: Verdana"&gt;7: Add your vpn_connect.bat and your vpn_disconnect.bat and exit options panel.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #1f5080; FONT-FAMILY: Verdana"&gt;8: Right click on the Registered Server you wish to autoconnect to Properties &amp;gt; RDP or VNC Options &amp;gt; Scripts&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #1f5080; FONT-FAMILY: Verdana"&gt;9: Pre-connect Scripts, Select your vpn_connect.bat&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #1f5080; FONT-FAMILY: Verdana"&gt;10: Post-disconnect Scripts, Select your vpn_disconnect.bat&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #1f5080; FONT-FAMILY: Verdana"&gt;11: You should be good to go :w00t:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #1f5080; FONT-FAMILY: Verdana"&gt;Notes: To best of my knowledge you can not used Keys with RASDIAL, you can only use Shared Passwords. Also your passwords are in plain, unencrypted veiw to the world. You may want to place the in a Secured Encrypted Folder.... &lt;STRONG&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;and lock it down!!!!&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #1f5080; FONT-FAMILY: Verdana"&gt;Take a look at rasdial.exe /? for more use of the switches. Last but not least.....This is a Quick, Dirty, Simple way to do this, it is what it is.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #1f5080; FONT-FAMILY: Verdana"&gt;Aaron&lt;/SPAN&gt;</description><pubDate>Wed, 01 Feb 2006 02:49:53 GMT</pubDate><dc:creator>lightning</dc:creator></item></channel></rss>