I have not tested this so it is purely from memory but I seem to remember that
the "Run" key happens before the logon is complete i.e. no taskbar. Other than
this looking odd and the user not being able to use the OS during the install I
am not sure if it makes a difference. (This may have been only on WinXP.)
Neil
From: Rob Mensching [mailto:r...@robmensching.com]
Sent: 10 November 2013 07:33
To: WiX toolset developer mailing list
Subject: Re: [WiX-devs] Issue & possible solution: Burn Startup-Screen is shown
twice (on Windows XP) if bootstrapper contains driver-installation
Well, that's encouraging. So is there anything anyone can think of that I've
missed in this simplification?
As for the code, I would recommend using OsGetVersion() from dutil's osutil.*.
It will probably already be initialized and you can then use "prettier" enums
to say < OS_VERSION_VISTA.
From: Tobias Erichsen [mailto:i...@tobias-erichsen.de]
Sent: Saturday, November 9, 2013 6:57 PM
To: WiX toolset developer mailing list
Subject: Re: [WiX-devs] Issue & possible solution: Burn Startup-Screen is shown
twice (on Windows XP) if bootstrapper contains driver-installation
Hi everyone,
after some twiddling I got the 3.8 branch to compile on my machine and
recompiled burn.exe to test the "Run instead RunOnce" approach.
Seems to work like a charm...
There were only a few changes I needed to make in file registration.cpp:
Changed consts to refer to correct registry keys:
===================================
const LPCWSTR REGISTRY_RUN_KEY =
L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run";
const LPCWSTR REGISTRY_RUN_ONCE_KEY =
L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\RunOnce";
Added function to check whether we run on XP:
==================================
static BOOL UseRunInsteadRunOnce() {
OSVERSIONINFO versionInfo;
versionInfo.dwOSVersionInfoSize = sizeof( OSVERSIONINFO );
if ( GetVersionEx( &versionInfo ) ) {
if ( versionInfo.dwMajorVersion < 6 ) {
return TRUE;
}
}
return FALSE;
}
Changed Writing / Deleting correct keys in function UpdateResumeMode:
=====================================================
// write run key
if ( UseRunInsteadRunOnce() ) {
hr = RegCreate(pRegistration->hkRoot, REGISTRY_RUN_KEY, KEY_WRITE,
&hkRun);
} else {
hr = RegCreate(pRegistration->hkRoot, REGISTRY_RUN_ONCE_KEY,
KEY_WRITE, &hkRun);
}
// delete run key value
if ( UseRunInsteadRunOnce() ) {
hr = RegOpen(pRegistration->hkRoot, REGISTRY_RUN_KEY, KEY_WRITE,
&hkRun);
} else {
hr = RegOpen(pRegistration->hkRoot, REGISTRY_RUN_ONCE_KEY, KEY_WRITE,
&hkRun);
}
Would you guys consider this the correct way to implement this?
Best regards,
Tobias
________________________________
Von: Rob Mensching [mailto:r...@robmensching.com]
Gesendet: Freitag, 8. November 2013 16:13
An: WiX toolset developer mailing list
Betreff: Re: [WiX-devs] Issue & possible solution: Burn Startup-Screen is shown
twice (on Windows XP) if bootstrapper contains driver-installation
What if on XP Burn writes to the Run key instead? That's actually what we did
in for all OSes in the early days of Burn. We had to move to the RunOnce key to
ensure on restart the Bundle launched elevated and the user would not be
prompted for elevation post-restart. Fortunately, on XP we don't have to worry
about elevation.
This could also be the most straight forward fix if it works. I'm hoping the
"runonce.exe" just runs the runonce key. <smile/>
------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
WiX-devs mailing list
WiX-devs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-devs