Windows – Prevent some startup programs from running when logging in to Windows Vista via Remote Desktop

remote desktopstartupwindowswindows-vista

Is it possible to prevent some startup programs from running when I log in to my Windows Vista desktop via Remote Dekstop.

I was hoping for a solution much like "Capster" which when added to a startup shortcut will only run the executable in it's argument if CapsLock is on. Although I want to really detect if I am logged in via remote desktop rather than looking for a key state.

The kind of apps that I would like to disable at startup are my IM client, in this case Digsby, Windows Sidebar, Samurize and UltraMon for working with multiple monitors.

Best Answer

Sure. Make a batch file that contains the commands to launch your "Console Only" programs. At the top of that file, check the variable called SESSIONNAME. If it equals "Console," run those programs. If not, don't.

Like this:

@echo off

IF %SESSIONNAME% == Console (

echo In console, executing programs.
REM List paths to programs here prefaced by "start " so they run async.

GOTO :END
) ELSE (
REM Not in console, not executing programs.
)

:END