RunOnce registry key and an http page

V

Viviana Vc

Hi all,

After my application is uninstalled I request a reboot and I would like
after the reboot to start an internet web page (the default browser of
the user) where the user if he wants, to complete some data.

For this at the end of uninstallation I thought about adding under the
registry key:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce
something like: bla http:\\www.mypage.com

The problem is that this seems to work only sometimes, like internet
explorer is started and showing the page. But sometimes internet
explorer is started with no address, so it's an empty page. (tried on a
Win2k)

Any clue why is this happening? What am I doing wrong?
If the solution I have chosen doesn't work, how else could I implement
this?

Thanks in advance,
Viv
 
G

Gary Chanson

Viviana Vc said:
Hi all,

After my application is uninstalled I request a reboot and I would like
after the reboot to start an internet web page (the default browser of
the user) where the user if he wants, to complete some data.

For this at the end of uninstallation I thought about adding under the
registry key:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce
something like: bla http:\\www.mypage.com

The problem is that this seems to work only sometimes, like internet
explorer is started and showing the page. But sometimes internet
explorer is started with no address, so it's an empty page. (tried on a
Win2k)

Any clue why is this happening? What am I doing wrong?
If the solution I have chosen doesn't work, how else could I implement
this?

If I remember correctly, I tried to use RunOnce for own of my programs
and found that it ran too early in the start-up sequence for my purposes.
You may be running into the same problem.
 
V

Viviana Vc

I thought about this being the problem, but I wasn't sure.
How can I be sure that this is the problem? And also how can I implement
this if just adding an url to RunOnce doesn't work?

Thx,
Viv
 
S

Sten Westerback

Add an .lnk or .bat into All Users\.... Startup and have it delete itself..
Or write a small tool that starts it with a delay (Sleep() +
ShellExecute()).

- Sten
 
G

Gary Chanson

Sten Westerback said:
Add an .lnk or .bat into All Users\.... Startup and have it delete itself..
Or write a small tool that starts it with a delay (Sleep() +
ShellExecute()).

Or do the same using a value under the Run key. Both this and the items
in the Startup folder get executed much later in the startup sequence.
 
G

Gary Chanson

I couldn't really tell for sure but I don't think so. It seems to start
just after the shell started but before any other programs are started. I
think it's the shell which launches all of the startup programs.

--
-GJC [MS Windows SDK MVP]
-Software Consultant (Embedded systems and Real Time Controls)
- http://www.mvps.org/ArcaneIncantations/consulting.htm
(e-mail address removed)


Alexander Grigoriev said:
Is it processed before shell starts?

Gary Chanson said:
If I remember correctly, I tried to use RunOnce for own of my programs
and found that it ran too early in the start-up sequence for my purposes.
You may be running into the same problem.

--
-GJC [MS Windows SDK MVP]
-Software Consultant (Embedded systems and Real Time Controls)
- http://www.mvps.org/ArcaneIncantations/consulting.htm
(e-mail address removed)
 
V

Viviana Vc

The weird things are:
1) Internet Explorer is opened but the link in the "address" bar is
missing (is empty), so it can not be something related with the fact
that a module was not yet initialized right? As the address bar entry is
empty obviusly the IE stays empty.
2) If I add the same entry in the
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce
it works perfectly even though in MSDNL is written:

"the keys are loaded in the following order:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices
<Logon Prompt>
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
StartUp Folder
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce"

which basically doesn't make any sense as HKLM\...\RunOnce is loaded
before HKCU\...\RunOnce and still for me first one works, but not the
2nd one.

Viv
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top