Solved

Problems with program started in RunOnce

Posted on 2003-11-16
7
348 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
ID: 9758204
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
ID: 9758407
 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
ID: 9758426
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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

Author Comment

by:Silker
ID: 9758487
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
ID: 9758508
Create process - sneaky! ;-)

Geoff M.
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 12808395
PAQed with points refunded (125)

modulo
Community Support Moderator
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

803 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