[wix-users] detect windows build in bundle

Adnan Shaheen shaheen4qau at gmail.com
Fri Mar 15 19:39:25 PDT 2019


I need the build number to detect if the bundle is running on windows 2019
or not. Because on windows 2019, if wix bundle is not run as admin, the
reboot button doesn't do anything on a clean install, unless the bundle is
run as admin.
So I have to check if the bundle is not run as admin, and it is windows
2019, so fail the install with message to elevate the bundle.exe
If someone has other better solution, like we can elevate MSI or something
else, please do share.

Regards:
Adnan Shaheen.


On Fri, 15 Mar 2019 at 18:40, Edwin Castro <egcastr at gmail.com> wrote:

> Why would the CurrentBuildNumber tell you if you were executed as admin?
>
> --
> Edwin G. Castro
>
>
> On Fri, Mar 15, 2019 at 11:20 AM Adnan Shaheen via wix-users <
> wix-users at lists.wixtoolset.org> wrote:
>
>> I need the build number to check if bundle is executed as admin or not. As
>> in windows 2019, the reboot button doesn't work, unless bundle is opened
>> as
>> admin.
>> The solution, I found in order to fetch the build number is as follows
>>
>> <util:RegistrySearch Id="CurrentBuild" Variable="CurrentBuildNum"
>> Result="value" Root="HKLM" Key="SOFTWARE\Microsoft\Windows
>> NT\CurrentVersion" Value="CurrentBuildNumber" />
>>
>> This should fetch the build number from registry.
>>
>> Regards:
>> Adnan Shaheen.
>>
>>
>> On Fri, 15 Mar 2019 at 13:04, Blair Murri via wix-users <
>> wix-users at lists.wixtoolset.org> wrote:
>>
>> > What are you needing the build number for? Microsoft keeps telling us to
>> > check for the feature's existence instead of using system version
>> > information.
>> >
>> > Get Outlook for Android<https://aka.ms/ghei36>
>> >
>> > ________________________________
>> > From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of
>> > Adnan Shaheen via wix-users <wix-users at lists.wixtoolset.org>
>> > Sent: Friday, March 15, 2019 6:58:48 AM
>> > To: wix-users at lists.wixtoolset.org
>> > Cc: Adnan Shaheen
>> > Subject: [wix-users] detect windows build in bundle
>> >
>> > How to detect windows build number in the bundle?
>> > I tried CBNumber but it seems not work for me.
>> >
>> > Regards:
>> > Adnan Shaheen.
>> >
>> > ____________________________________________________________________
>> > WiX Toolset Users Mailing List provided by FireGiant
>> > http://www.firegiant.com/
>> >
>> > ____________________________________________________________________
>> > WiX Toolset Users Mailing List provided by FireGiant
>> > http://www.firegiant.com/
>> >
>>
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant
>> http://www.firegiant.com/
>>
>



More information about the wix-users mailing list