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

Ask A Question

Stats

  • Questions 238k
  • Answers 238k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The important thing about get is "get what?" When you… May 13, 2026 at 6:50 am
  • Editorial Team
    Editorial Team added an answer With Grails you have a few options to validate the… May 13, 2026 at 6:50 am
  • Editorial Team
    Editorial Team added an answer doesn't that work: if (isset($part->disposition) and (($part->disposition=='attachment') or ($part->disposition=='inline'))) May 13, 2026 at 6:50 am

Related Questions

I'm working on an application that runs on Windows Mobile 6 that needs to
I'm trying to create a web user interface for a Java application. The user
I have written a WiX installer that works perfectly with Windows XP, but when
Silverlight 3 allows you to run your application out of the browser , which

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.