Since OsGetVersion() uses GetVersionEx(), it might break for Windows 8.1 and
newer which I think lie about being Windows 8 - you're supposed to use the
version helper API now.
http://www.osronline.com/ShowThread.cfm?link=247792
"And it continues. I was absolutely gobsmacked to learn that the GetVersionEx
API, which was specifically introduced to tell the truth about operating system
versions, has ALSO been modified to lie to us. In Windows 8.1, GetVersionEx
returns 6.2.9200, which is the version number for Windows 8.0. The explanations
offered on the forum for this were asinine. I just want my application to print
the current system version number. Microsoft has now made that impossible. I
thought the golden rule was "never introduce a change that breaks existing
applications", but that is EXACTLY what this lie does."
--
Bruce
From: Rob Mensching [mailto:r...@robmensching.com]
Sent: Sunday, November 10, 2013 7:33 AM
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/>
This e-mail (and any attachments) is confidential and may be privileged. Any
unauthorized use, copying, disclosure or dissemination of this communication is
prohibited. If you are not the intended recipient, please notify the sender
immediately and delete all copies of the message and its attachments.
------------------------------------------------------------------------------
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