1 Replies - 404 Views - Last Post: 26 February 2018 - 01:24 PM Rate Topic: -----

#1 Nigels   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 78
  • Joined: 17-May 13

Creating a prerequisites in VS2017

Posted 19 February 2018 - 12:30 PM

Hi all,

I have been playing around learning how to create my own prerequisite in Visual studio 2017. The prerequisites that I created will install Access Database Engine before it installs my software. I appreciate there are 32 & 64 bit versions but I am only toying around with it at the moment.
Anyway I created A Product.xml and a Package.xml and I can now select the prerequisites from the list as you can see in my image below.I created the 32 & 64 bit for access database engine.

Posted Image

The installer appears to work looking at these images but then then you will see I am met with an error as in the last image

Posted Image


Posted Image

Posted Image


Posted Image


Posted Image






The error points to a log file which I have included below.
The following properties have been set:
Property: [AdminUser] = true {boolean}
Property: [InstallMode] = HomeSite {string}
Property: [NTProductType] = 1 {int}
Property: [ProcessorArchitecture] = AMD64 {string}
Property: [VersionNT] = 10.0.0 {version}
Running checks for package 'Microsoft .NET Framework 4.6.1 (x86 and x64)', phase BuildList
Reading value 'Release' of registry key 'HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Full'
Read integer value 461308
Setting value '461308 {int}' for property 'DotNet461Full_Release'
Reading value 'v4' of registry key 'HKLM\SOFTWARE\Microsoft\NET Framework Setup\OS Integration'
Read integer value 1
Setting value '1 {int}' for property 'DotNet461Full_OSIntegrated'
The following properties have been set for package 'Microsoft .NET Framework 4.6.1 (x86 and x64)':
Property: [DotNet461Full_OSIntegrated] = 1 {int}
Property: [DotNet461Full_Release] = 461308 {int}
Running checks for command 'DotNetFX461\NDP461-KB3102436-x86-x64-AllOS-ENU.exe'
Result of running operator 'ValueEqualTo' on property 'InstallMode' and value 'HomeSite': true
Result of checks for command 'DotNetFX461\NDP461-KB3102436-x86-x64-AllOS-ENU.exe' is 'Bypass'
Running checks for command 'DotNetFX461\NDP461-KB3102438-Web.exe'
Result of running operator 'ValueNotEqualTo' on property 'InstallMode' and value 'HomeSite': false
Result of running operator 'ValueGreaterThanEqualTo' on property 'DotNet461Full_Release' and value '394254': true
Result of checks for command 'DotNetFX461\NDP461-KB3102438-Web.exe' is 'Bypass'
'Microsoft .NET Framework 4.6.1 (x86 and x64)' RunCheck result: No Install Needed
Running checks for package 'AccessDatabaseEngine64', phase BuildList
The following properties have been set for package 'AccessDatabaseEngine64':
Running checks for command 'AccessDatabase64\AccessDatabaseEngine_X64.exe'
Result of checks for command 'AccessDatabase64\AccessDatabaseEngine_X64.exe' is 'Install'
'AccessDatabaseEngine64' RunCheck result: Install Needed
Installation of components 'AccessDatabaseEngine64' was accepted.
Copying files to temporary directory "C:\Users\nigel\AppData\Local\Temp\VSD3244.tmp\"
Downloading files to "C:\Users\nigel\AppData\Local\Temp\VSD3244.tmp\"
(19/02/2018 18:52:17) Downloading 'AccessDatabase64\AccessDatabaseEngine_X64.exe' from 'https://download.microsoft.com/download/3/5/C/35C84C36-661A-44E6-9324-8786B8DBE231/AccessDatabaseEngine_X64.exe' to 'C:\Users\nigel\AppData\Local\Temp\VSD3244.tmp\'
Download completed at 19/02/2018 18:52:36
Verifying file integrity of C:\Users\nigel\AppData\Local\Temp\VSD3244.tmp\AccessDatabase64\AccessDatabaseEngine_X64.exe
WinVerifyTrust returned 0
File trusted
Running checks for package 'AccessDatabaseEngine64', phase BeforePackage
The following properties have been set for package 'AccessDatabaseEngine64':
Running checks for command 'AccessDatabase64\AccessDatabaseEngine_X64.exe'
Result of checks for command 'AccessDatabase64\AccessDatabaseEngine_X64.exe' is 'Install'
'AccessDatabaseEngine64' RunCheck result: Install Needed
Verifying file integrity of C:\Users\nigel\AppData\Local\Temp\VSD3244.tmp\AccessDatabase64\AccessDatabaseEngine_X64.exe
WinVerifyTrust returned 0
File trusted
Installing using command 'C:\Users\nigel\AppData\Local\Temp\VSD3244.tmp\AccessDatabase64\AccessDatabaseEngine_X64.exe' and parameters ''
Process exited with code 0
Status of package 'AccessDatabaseEngine64' after install is 'InstallFailed'



I am hoping someone can tell me why it could of failed. The Access Database Engine did install correctly its just my app that did not get installed. Now that the AccessDatabaseEngine is installed if I run the Application Manifest.Application file it will install my app just that my app wont get installed now using setup.exe.


Posted Image

The app its self is just 1 win form with a button.
Anyway if someone can tell me what I could try to make this work it would be great. Im sure I can only be missing something small now.

I have also included the xml files I am using in the download below.
The files can be downloaded in .rar from
mastersworldofcomputing.mathswhizz.org/downloads/DreanInCode1.rar

This post has been edited by Nigels: 19 February 2018 - 01:14 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Creating a prerequisites in VS2017

#2 Nigels   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 78
  • Joined: 17-May 13

Re: Creating a prerequisites in VS2017

Posted 26 February 2018 - 01:24 PM

So I have changed my Product.xml slightly and now when I run my.exe it installs the 64-bit Microsoft Access Database Engine and then installs my software which is great. The problem is if someone has already got the 64-bit Microsoft Access Database Engine installed they will have to reinstall it before it installs my software. This is no good I need it to check if someone has got it installed already and if they have bypass that part and just install my software. I just don't know how to do that. This is what my Product.xml looks like now.

<?xml version="1.0" encoding="utf-8"?>
<Product ProductCode="accessdatabase64new" xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper">
  <PackageFiles CopyAllPackageFiles="false">
    <PackageFile Name="accessdatabaseengine_x64.exe" PublicKey="3082010A0282010100DB4B8BE9036A5FC81B5D0A0539E4D50E92D0C4E18BE8A40D051958C03CD729DD89B7686E4B9F7EBC9ABD548639A9F1383516E61DACFBAE6BDC0930EFB81EDF6CF84A9A559748C82389B3592734BD9531479C0FCE40353237FEE9F34FA41AA4B379BC809B3F2498C4D16FD57FE7438DE4DCF2D2E6AE66ED043A2194A657DC03DB2CC61BFF2B39A85DBF55FEDD49DF540594AB33DFA47D31A64DBD56CF1631683F846B1C6DF3EED5308AEE651B9EB7081C297E93BDF27D42763822D47B7CF4B8B9719EC394F482863582A674BD0233FA548685A325BEAA895EE2395F2641981ADEB9E6468578BB51320247ECE4F91FBD045175E6129B76EB859714220AA113F7610203010001" />
  </PackageFiles>
  <InstallChecks>
    <RegistryCheck Property="INSTALLEDVER" Key="HKEY_CLASSES_ROOT\Microsoft.ACE.OLEDB.16.0\CLSID" Value="InstallVer" />
  </InstallChecks>
  <Commands Reboot="Defer">
    <Command PackageFile="accessdatabaseengine_x64.exe">
      <InstallConditions>
        <BypassIf Property="INSTALLEDVER" Compare="ValueExists" Value="N/A for ValueExists and ValueNotExists" />
      </InstallConditions>
      <ExitCodes>
        <ExitCode Value="1" Result="Fail" String="Installfailed" />
        <DefaultExitCode Result="Fail" String="Anunexpectedexitcodewasr" FormatMessageFromSystem="true" />
      </ExitCodes>
    </Command>
  </Commands>
</Product>

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1