Auto- running a minimized application at startup

  • Thread starter Thread starter Gereon
  • Start date Start date
G

Gereon

I have a command- line application I want to run at startup, but I want it
to be minimized. What would be the proper procedure for that?

Here's what I've tried so far:

If I add the application as a RunOnce resource, an entry is created in
HKLM\Software\Microsoft\Windows\CurrentVersion\Run, and it starts fine.

To achieve the minimization behavior, my idea was to create a shortcut
resource to the application (and set the shortcut to run minimized), then
set the RunOnce resource to run the .lnk instead of the .exe. But the
application doesn't start.

The link executes fine when I run it by itself after boot.

I am running MinLogon, with a custom application for a shell.

I can get the functionality to work the way I want in regular XP by adding
an entry to HKLM\Software\Microsoft\Windows\CurrentVersion\Run to reference
the .LNK.
 
Gereon,

LNK files are processed by Explorer Shell (actually, shell32).

You can do your own small simple application that would CreateProcess on the main app and launch it as minimized (STARTUPINFO
parameters/STARTF_USESHOWWINDOW/SW_MINIMIZE).

Or use an application that will do that for you (e.g., DUA).

You can also try to use "start /MIN" command or cmd.exe if acceptable.
 
Back
Top