Solved

Problems with program started in RunOnce

Posted on 2003-11-16
7
351 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
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…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

696 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