• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 355
  • Last Modified:

Problems with program started in RunOnce

I have this program that is placed in RunOnce to start at Windows startup.The reason I've choosen RunOnce is that this registry entry is executed before other entries and I want my program to execute first.It seams that programs started in RunOnce that are waiting for user input blocks Windows from starting corectly.If I kill my process then Windows starts OK.How can I trick Windows to start and my process to run ?  
0
Silker
Asked:
Silker
  • 3
  • 2
1 Solution
 
gmayoCommented:
It appears that you cannot use any user input when a program is run from RunOnce. Does your program have a user interface?

Geoff M.
0
 
SilkerAuthor Commented:
 Sorry I was late with my answer but I'm new at EE.
For gmayo :
   Yes, my program does have an user interface.
0
 
gmayoCommented:
Then I believe you cannot use RunOnce, sorry. How about starting it as a service? Personally I don't know much about services, they might have the same problem though.

Geoff M.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
SilkerAuthor Commented:
I saw other programs do that so I thing it is posible in some way.I've managed to start my program from RunOnce but with a little trick.Instead of launching the real program,I call CreateProcess or ShellExecute with ParamStr(0) and my program starts.But that means that I have 2 processes (of course the first ends as soon as CreateProcess returns).I've also tried to kill explorer.exe and restart it but it seams that other startup items do not re-run and thats bad.
    If you look at PSTrayFactory from PS SoftLabs you we'll see that they manage to start their program in RunOnce.
    I've also tried to start my program from within a service but it seams that it doesn't work.
   
0
 
gmayoCommented:
Create process - sneaky! ;-)

Geoff M.
0
 
moduloCommented:
PAQed with points refunded (125)

modulo
Community Support Moderator
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now