[DUG] registry caching?
Robert martin
rob at chreos.co.nz
Fri Aug 28 14:33:44 NZST 2009
Hi
In Vista / Win 7 there is some sort of dummy registry for apps Windows
thinks need it (i.e. apps that access private folders, registry etc
without getting permission). I suspect its something to do this this.
One of your apps might be modifying / reading a dummy registry.
I know you said you needed to have the app installed with XP compat
turned on (adn then turn it off on the first run) but wouldn't it be
better to have the installer run as admin and hve that application do
whatever it is that needs XP mode. Thats what we do.
Anyway, hope my suggestion helps. Certainly a strange problem.
Rob
Ross Levis wrote:
> Sorry, I should have mentioned it is Vista, but it'll be the same issue with
> Win7. It's not a virtualization issue. This is all done with raised
> privileges during and immediately after installation.
>
> It seems to be caching the compatibility setting somehow. Or perhaps the
> helper app is inheriting the setting and then inheriting it back to the main
> app when it restarts it. It would appear a very stupid thing for Windows to
> do if that is the case, but I'll test it to be sure.
>
> Ross.
>
> -----Original Message-----
> From: delphi-bounces at delphi.org.nz [mailto:delphi-bounces at delphi.org.nz] On
> Behalf Of Conor Boyd
> Sent: Friday, 28 August 2009 8:03 a.m.
> To: NZ Borland Developers Group - Delphi List
> Subject: Re: [DUG] registry caching?
>
> Which OS?
>
> If it's Vista (or Win 7), and your registry key is under e.g. HKLM, are
> you running into registry virtualization issues?
>
> C.
>
> -----Original Message-----
> From: delphi-bounces at delphi.org.nz [mailto:delphi-bounces at delphi.org.nz]
> On Behalf Of Ross Levis
>
> I hope someone can help.
>
> I have an app where the installer sets an XP compatibility mode registry
> entry during installation. Don't ask why but it is generally required.
>
> As the app loads after installation, it checks some hardware
> requirements to see if XP compatibility mode needs to be switched off.
> If so, the registry entry is deleted and the program then needs to be
> restarted, which I want to do automatically.
>
> I have a helper app which I load just before terminating the main app.
> The helper app then reloads the main app after a 2 second sleep.
>
> However, the result is that the program is still loading in
> compatibility mode even though the registry entry is deleted well before
> it loads.
>
> I have LazyWrite disabled on the registry change, so it is instantly
> updated. I tried a massive 15 second sleep in the helper app, so the
> main app is closed for 15 seconds before reloading, yet it still loads
> as if the registry entry is still there.
>
> If I terminate the app and load it manually, then it's always correct!
> I don't understand this. Why would loading the app manually be any
> different to loading it from another app?
>
> I'm using CreateProcess with CREATE_NEW_PROCESS_GROUP to load the helper
> app and to load the main app again. I tried ShellExecute with no
> difference.
>
> Is there some way to make this work automatically?
>
> The only method I can adopt at this stage is to popup a message to ask
> the user to load the program manually, which is not user friendly.
>
> Many thanks,
> Ross.
>
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi at delphi.org.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject:
> unsubscribe
>
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi at delphi.org.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject: unsubscribe
>
>
More information about the Delphi
mailing list