Archive for June, 2010

Starting programs with administrator rights at login

Posted in Windows 7 on June 25th, 2010 by Mr. Bungle – Be the first to comment

With the introduction of UAC in Vista, launching a program that requires administrative rights on Windows startup (when you first log in) has become more difficult. One solution that has been doing the rounds is to use the Task Scheduler as a workaround. What a mess!

Provided you are not running a ‘home’ edition of Windows Vista/7, I have found what I believe is the cleanest and easiest way to achieve this:

1. Start->Run-> “gpedit.msc”
2. User Configuration->Windows Settings->Scripts (Logon/Logoff)
3. Double-click ‘Logon’, and add entries for each of the applications you want launched.

Group Policy Logon

The applications you define in here will be launched with administrator rights when you logon without any UAC dialogs being displayed.

Remote Desktop via VPN

Posted in Networking, Software on June 17th, 2010 by Mr. Bungle – Be the first to comment

For many programmers and IT professionals, remote access via VPN to machines in their corporate network is a routine activity. This activity usually involves launching a VPN client (e.g. ShrewSoft VPN Client), entering a password, waiting for the VPN to be connected, then launching the remote desktop client. I have written a small executable to help automate that process, called DirectToDesktop.

The program launches your VPN client with the specified arguments and then starts a remote desktop session to a specified computer as soon as that machine can be pinged.

Usage

DirectToDesktop.exe <pathToVpnClient> <vpnClientArgs> <hostName> [pathToLookAlive]

<pathToVpnClient> – E.g. “C:\Program Files\ShrewSoft\VPN Client\ipsecc.exe”
<vpnClientArgs> – Args to pass to the VPN client.  E.g. “-r \”Your Company.pcf\”"
<hostName> – The name/IP of the computer inside the VPN to remote desktop to.
[pathToLookAlive] – (optional) Install Look Alive to view connectivity status of the remote computer in the system tray.  E.g. “C:\Program Files (x86)\Zorn Software\Look Alive v1.24\LookAlive.exe”

Note: I’ve only tested the program with ShrewSoft VPN Client, but in theory it should work with any VPN client that accepts command line arguments.

Installation
Just save DirectToDesktop.exe to any location on your hard disk, and add a shortcut to it using the above command line arguments. Run the executable without passing any arguments to view a help/about window.