Set order of prerequisites installation

tellblom

Member
Joined
Jul 3, 2022
Messages
16
Programming Experience
10+
How can I change the order of the prerequisites in a setup project?

Access 2016 seems to need VC Redist 14 but the Setup tries to install Access first. How can I change the order of the prerequisites so it install VCredist flrst?
 
This page says this:
The Prerequisites dialog box specifies which prerequisite components are installed, how they are installed, and which order the packages are installed.
That seems to suggest that the packages will be installed in whatever order they appear in that dialogue - the dialogue apparently provides no way to specify an order at that stage - so you probably need to how you added the packages to that dialogue in the first place and look at setting the order there.
 
One other option might be to modify the VDPROJ file by hand, although I'm not sure whether that would be overwritten if you then make further changes through the UI. I just threw together a Setup project, added some prerequisites, built the project and then opened the project file in Notepad and saw this section:
JSON:
"InstallerBootstrapper" = "3:2"
    "BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}"
    {
        "Enabled" = "11:TRUE"
        "PromptEnabled" = "11:TRUE"
        "PrerequisitesLocation" = "2:1"
        "Url" = "8:"
        "ComponentsUrl" = "8:"
        "Items"
        {
            "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:.NETFramework,Version=v4.7.2"
            {
                "Name" = "8:Microsoft .NET Framework 4.7.2 (x86 and x64)"
                "ProductCode" = "8:.NETFramework,Version=v4.7.2"
            }
            "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.EdgeRuntime"
            {
                "Name" = "8:Edge WebView runtime"
                "ProductCode" = "8:Microsoft.EdgeRuntime"
            }
            "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.NetCore.CoreRuntime.3.1.x64"
            {
                "Name" = "8:.NET Core Runtime 3.1.32 (x64)"
                "ProductCode" = "8:Microsoft.NetCore.CoreRuntime.3.1.x64"
            }
            "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.SqlServer.SqlLocalDB.15.0"
            {
                "Name" = "8:SQL Server 2019 Express LocalDB"
                "ProductCode" = "8:Microsoft.SqlServer.SqlLocalDB.15.0"
            }
            "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.Visual.C++.14.0.x86"
            {
                "Name" = "8:Visual C++ \"14\" Runtime Libraries (x86)"
                "ProductCode" = "8:Microsoft.Visual.C++.14.0.x86"
            }
        }
    }
If you reorder that Items list then that might change the order of installation.
 
One other option might be to modify the VDPROJ file by hand, although I'm not sure whether that would be overwritten if you then make further changes through the UI. I just threw together a Setup project, added some prerequisites, built the project and then opened the project file in Notepad and saw this section:
JSON:
"InstallerBootstrapper" = "3:2"
    "BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}"
    {
        "Enabled" = "11:TRUE"
        "PromptEnabled" = "11:TRUE"
        "PrerequisitesLocation" = "2:1"
        "Url" = "8:"
        "ComponentsUrl" = "8:"
        "Items"
        {
            "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:.NETFramework,Version=v4.7.2"
            {
                "Name" = "8:Microsoft .NET Framework 4.7.2 (x86 and x64)"
                "ProductCode" = "8:.NETFramework,Version=v4.7.2"
            }
            "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.EdgeRuntime"
            {
                "Name" = "8:Edge WebView runtime"
                "ProductCode" = "8:Microsoft.EdgeRuntime"
            }
            "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.NetCore.CoreRuntime.3.1.x64"
            {
                "Name" = "8:.NET Core Runtime 3.1.32 (x64)"
                "ProductCode" = "8:Microsoft.NetCore.CoreRuntime.3.1.x64"
            }
            "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.SqlServer.SqlLocalDB.15.0"
            {
                "Name" = "8:SQL Server 2019 Express LocalDB"
                "ProductCode" = "8:Microsoft.SqlServer.SqlLocalDB.15.0"
            }
            "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.Visual.C++.14.0.x86"
            {
                "Name" = "8:Visual C++ \"14\" Runtime Libraries (x86)"
                "ProductCode" = "8:Microsoft.Visual.C++.14.0.x86"
            }
        }
    }
If you reorder that Items list then that might change the order of installation.

Tried this, does not work unfortionally, it resets when building the setup
 
The page you linked to in your other thread here also includes that same element mentioned above. Seems like maybe you didn't read that carefully enough.

The problem is if you run the Access 2016 database engine standalone it will install VCredist 14 as part of its installation, but if you include it as a prerequisite it will throw an error message box when it starts installing but will continue to install after you press OK
 
Back
Top Bottom