Solved

Problems with program started in RunOnce

Posted on 2003-11-16
7
345 Views
Last Modified: 2010-04-05
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
Comment
Question by:Silker
  • 3
  • 2
7 Comments
 
LVL 8

Expert Comment

by:gmayo
Comment Utility
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
 

Author Comment

by:Silker
Comment Utility
 Sorry I was late with my answer but I'm new at EE.
For gmayo :
   Yes, my program does have an user interface.
0
 
LVL 8

Expert Comment

by:gmayo
Comment Utility
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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

Author Comment

by:Silker
Comment Utility
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
 
LVL 8

Expert Comment

by:gmayo
Comment Utility
Create process - sneaky! ;-)

Geoff M.
0
 

Accepted Solution

by:
modulo earned 0 total points
Comment Utility
PAQed with points refunded (125)

modulo
Community Support Moderator
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now