Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 111617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T02:24:51+00:00 2026-05-11T02:24:51+00:00

I need to add the Run when Windows starts option to my program CintaNotes,

  • 0

I need to add the ‘Run when Windows starts’ option to my program CintaNotes, but do not want to sacrifice the ‘cleanness’ of it: it is a 100% portable freeware and should not leave traces in the system. I’ve come up with the idea to autodetect running from the Startup shortcut and automatically minimizing to the system tray. Is there a way to do it? I’m using C++ and raw Winapi.

So: – No writing to the registry – No command line parameters

Thanks!

UPD: The question is NOT how to minimize to the system tray! The question is how can a program differentiate between being run normally and being run from a startup-folder shortcut without using registry and command-line parameters.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T02:24:52+00:00Added an answer on May 11, 2026 at 2:24 am

    Your ‘cleanness’ appears to be an artificial construct at best. If you’re telling the user to create a shortcut in the start-up folder, you’re already leaving a footprint (and, to be honest, there’s little difference between ‘myprog.exe’ and ‘myprog.exe -m’). In that case, there are some easier approaches than automagically trying to detect where you’re running from.

    I would simply provide a menu option in your program (‘Install’) which would then install the software to a fixed-disk location (as opposed to the flash drive), including the requisite Programs entry (Start, All Programs, CintaNotes).

    As part of that process (or even after install), you can let them specify ‘Start with Windows’ and then you create the start-up folder shortcut for the user with a command line option so your program can tell if it’s running that way. There’s no point in allowing ‘Start with Windows’ unless the program’s available (i.e., on the fixed disk, not the flash drive).

    Your user need never have to worry about creating shortcuts at all, let alone ones with parameters. And this gives your program the control over how it’s run – two modes, ‘installed’ (and start minimized) or ‘running without installing first’ (and start normal).

    Something like finding the directory of the executable won’t work simply because the start-up folder item that starts your program is likely to be a shortcut to it, so you won’t have that path.

    I think this is a classic case of asking the wrong question. In answer to your specific question, I say: no, there is no way to tell that you’ve been launched from a start up folder entry without some command-line parameters. But, I’ve been wrong before, just ask my wife :-). Some-one else may well know a way.

    Adding this an an edit since comments don’t allow enough space:

    You ask:

    What do you think of just disabling the ‘Start when Windows starts’ option when program detects it is being run from the flash drive? I guess there’s a way to detect this.

    That’s a good idea since it doesn’t make sense to allow automatic running until it’s installed (since the flash drive may not be there). One possibility:

    1/ Running from flash, you start with ‘myprog.exe’ since you just double-clicked the executable and you run in a normal window. This presents the option to ‘Install to fixed disk’ but not ‘Start with Windows’. As part of the install process, you may allow them to set up the installed copy to ‘Start with Windows’ but not the current running copy.

    2/ Your installed program can be set up to run as ‘myprog.exe -i’, since you create the item in Start/AllPrograms. This would disable ‘Install to fixed disk’ but allow you to toggle ‘Start with Windows’. You can choose whether you want explicit running (by the user) to start normal or minimized (see (3)).

    3/ The shortcut in StartUp can be ‘myprog.exe -s’ (again, you control this because you created it). This is identical to (2) but starts minimized (if (2) started minimized anyway, there’s no distinction between (2) and (3) and no reason for different command-line options).

    That way, each option can have different behavior as you see fit.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to add a specific column if it does not exist. I have
I need to write a program that will take a existing local windows user,
I have a long-time task implemented in Windows batch script need to be add
I want my batch file to only run elevated. If not elevated, provide an
I need to add a web part zone to a wiki page. I'm opening
I need to add DVD writing functionality to an application I'm working on. However
I need to add role based permissions to my Rails application, and am wondering
I need to add full web search to my site. I need something like
I need to add functionality to my J2EE-based wep application: 1) Take some page,
I need to add a tooltip/alt to a td element inside of my tables

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.