Jake Churchill

… on Flex, ColdFusion, FarCry, and much more …

  • Home
  • About
  • Projects

8

May

Reboot XP PC over Remote Desktop

Posted by Jake Churchill  Published in Misc

I work from home sometimes and in the past have had to reboot my PC due to the usual random reasons. Over a Remote Desktop connection it does not give you that option by default. It just gives you the option to log off or disconnect.

Servers give you the option to reboot so I thought, why not PCs?

Well, there is a way and you don’t have to jump through any major hoops to do it. Simply open the run dialog or a command shell and type
shutdown -r

the -r is VERY important here, otherwise, you’ll just shutdown your computer.

I hope that helps someone.

EDIT: Please not this is on Windows XP Pro. I’m not sure about other Operating Systems

EDIT 5/20/2009: The easiest way yet is to hit Alt+F4 and select “Restart”

3 comments

3

Nov

VPN Network Routing Step-by-Step

Posted by Jake Churchill  Published in Misc

Here is a quick step-by-step tutorial on VPN routing. The purpose is to give you access to the VPN network and the local network at the same time (by default it locks you out of your local network and you can only access the remote network).

Step 1: Create a VPN connection

Frankly, if you can’t get this far, you should probably turn back now or seek additional help.

Step 2: Modify gateway usage

continue reading "VPN Network Routing Step-by-Step"

1 comment

3

Nov

VPN Connection Route Fix (Windows Vista)

Posted by Jake Churchill  Published in Misc

I quickly found out that my script for creating a route does not work in Windows Vista (well it sort of did). One additional piece of information is that when you are creating the connection click on the “Networking tab”, select “Internet Protocol Version 4 (TCP/IPv4)” and click “Properties.” In the new window, click “Advanced” and be sure to uncheck “Use default gateway on remote network”.

Here is an updated script for use on windows Vista. I will be modifying the original post with this information as well.

Download It

UPDATE: Here’s a step by step on how to handle the networking: http://reynacho.com/2008/11/03/vpn-network-routing-step-by-step/

no comment

15

Oct

VPN Connection Route Fix

Posted by Jake Churchill  Published in Misc

At my last job I had the option to work from home on occasion but I rarely did it because working over a VPN is a pain. When you connect to a VPN network, by default it disables your local network connection. End result, you can’t check your personal email while connected to the VPN. That was simply not an option for me so a co-worker (Ryan Stille) came up with a genious way to re-route your internet traffic so VPN traffic went through the VPN without disabling your local network. That script looks something like this:

# re-route VPN traffic
route add 10.0.0.0 MASK 255.255.255.0 192.168.1.15 metric 1

The problem with this is that you have to connect to the VPN, then open up a command prompt, find the IP address that was given to you by the VPN and use that instead of “192.168.1.15″.

Here’s some code for a more graceful VBS script that will do the job for you:

Dim ipAddy
ipAddy = GetIPAddress()

If ipAddy <> "" then
FixRouteForRDP(ipAddy)
End If


Function FixRouteForRDP(ipAddy)
set sh = createobject("wscript.shell")
set fso = createobject("scripting.filesystemobject")

Set Env = sh.Environment("PROCESS")
workfile = fso.gettempname
sh.run "%comspec% /c route add 10.0.0.0 MASK 255.255.255.0 " & ipAddy & " metric 1"
End Function


Function GetIPAddress()
set sh = createobject("wscript.shell")
set fso = createobject("scripting.filesystemobject")

Set Env = sh.Environment("PROCESS")
if Env("OS") = "Windows_NT" then
workfile = fso.gettempname
sh.run "%comspec% /c ipconfig > " & workfile,0,true
else
'winipcfg in batch mode sends output to
'filename winipcfg.out
workfile = "winipcfg.out"
sh.run "winipcfg /batch" ,0,true
end if
set sh = nothing
set ts = fso.opentextfile(workfile)
data = split(ts.readall,vbcr)
ts.close
set ts = nothing
fso.deletefile workfile
set fso = nothing
arIPAddress = ""

for n = 0 to ubound(data)
if instr(data(n), "PPP adapter") then
for m = n to ubound(data)
if instr(data(m),"IP Address") then
parts = split(data(m),":")
if trim(parts(1)) <> "0.0.0.0" then
arIPAddress = trim(cstr(parts(1)))
end if
end if
next
end if
next

If (arIPAddress <> "") then
GetIPAddress = arIPAddress
Else
MsgBox "The VPN does not appear to be connected", vbExclamation, "Error"
GetIPAddress = ""
End IF
End Function

Download It

This basically looks up the IP address and runs the route command for you. Note, that in the for loop toward the bottom (if instr(data(n), “PPP adapter”) then), the text “PPP adapter” might need to be replaced by whatever your VPN connection is called. For a basic VPN connection, this should work.

UPDATE: Here’s a step by step on how to handle the networking: http://reynacho.com/2008/11/03/vpn-network-routing-step-by-step/

3 comments

Search

Blog Feed

  • Add blog to any reader
  • Comments Rss
February 2012
M T W T F S S
« Feb    
 12345
6789101112
13141516171819
20212223242526
272829  

 

February 2012
M T W T F S S
« Feb    
 12345
6789101112
13141516171819
20212223242526
272829  

Subscribe to Blog

Your email:

Subscribe   Unsubscribe

Archives

Categories

  • Browsers (3)
  • CFEclipse (2)
  • ColdFusion (7)
  • CSS (9)
  • Farcry (33)
    • Farcry Examples (2)
    • Farcry Users (1)
  • Flash (1)
  • Flex (14)
  • Javascript (5)
  • Life & Fun (3)
  • Microsoft Office (1)
  • Misc (4)
  • Random Posts (1)
  • SQL (2)
  • Uncategorized (2)

Blogroll

  • Axel Jensen
  • Ben Forta
  • Coldfusion Muse
  • Fullasagoog
  • Nicole Rutter
  • Ray Camden
  • Sandy Clark
  • Stillnet Studios

Recent Posts

  • FCKEditor Firefox 3.6 Bug (Year 2010 Bug)
  • ColdFusion using Java for regex replace
  • ColdFusion VirtualMerchant CFC
  • Farcry Navigation Move Permissions
  • Delete Mail via POP Script

Recent Comments

  • James Moberg on FCKEditor Firefox 3.6 Bug (Year 2010 Bug)
  • Jake Churchill on ColdFusion using Java for regex replace
  • Ben Nadel on ColdFusion using Java for regex replace
  • Peter Boughton on ColdFusion using Java for regex replace
  • Peter Boughton on ColdFusion using Java for regex replace

Recent Post

  • FCKEditor Firefox 3.6 Bug (Year 2010 Bug)
  • ColdFusion using Java for regex replace
  • ColdFusion VirtualMerchant CFC
  • Farcry Navigation Move Permissions
  • Delete Mail via POP Script
  • Flex 2 Datagrid not highlighting row (UPDATE)
  • Flex 2 Datagrid not highlighting row
  • Flex Dynamic casting of data
  • Reboot XP PC over Remote Desktop
  • Dynamically instantiate a class

Recent Comments

  • James Moberg in FCKEditor Firefox 3.6 Bug (Year 2010 Bug)
  • Jake Churchill in ColdFusion using Java for regex replace
  • Ben Nadel in ColdFusion using Java for regex replace
  • Peter Boughton in ColdFusion using Java for regex replace
  • Peter Boughton in ColdFusion using Java for regex replace
  • Matthew in ColdFusion using Java for regex replace
  • Matthew in ColdFusion using Java for regex replace
  • Jake Churchill in Flex Channel.Connect.Failed error NetConnection.Ca…
  • Flex Guy in Flex Channel.Connect.Failed error NetConnection.Ca…
  • Dexter in Flex Custom Preloader without SWF
© 2008 Jake Churchill is proudly powered by WordPress
Theme designed by Roam2Rome