davidjhomer
Posts: 55
Joined: Wed Jun 08, 2016 3:58 pm
Contact: Website Facebook Skype Twitter

Prerequisites can't be uninstalled: "The feature you are trying to use is on a network resource that is unavailable."

Hello,

We are installing the Microsoft ODBC Driver for SQL Server as a prerequisite however we have a problem.

If the user then tries to uninstall the ODBC driver (or upgrades SQL Server on that machine) the system tries to uninstall the ODBC driver - however because the prerequisites in AdvancedInstaller are deployed from with the AdvancedInstaller package the source files are no longer available and you get the error:

"The feature you are trying to use is on a network resource that is unavailable"

How do we get AdvancedInstaller to install the pre-requisite and make the source files available for uninstall?

Image
CENTREL Solutions Ltd
Server audit and documentation tools.
http://www.centrel-solutions.com
Catalin
Posts: 6623
Joined: Wed Jun 13, 2018 7:49 am

Re: Prerequisites can't be uninstalled: "The feature you are trying to use is on a network resource that is unavailable.

Hello David,

Not quite sure I fully understand this scenario.

If possible, could you please give me a test-case which I can follow in order to reproduce this on my end?

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
davidjhomer
Posts: 55
Joined: Wed Jun 08, 2016 3:58 pm
Contact: Website Facebook Skype Twitter

Re: Prerequisites can't be uninstalled: "The feature you are trying to use is on a network resource that is unavailable.

Hello,

I have created a sample project:
https://www.centrel-solutions.com/temp/project.zip

1. It doesn't matter whether you use Project A (pre-install) or Project B (Feature-based) they both install the SQL Server 17 ODBC driver.

2. Check that the ODBC driver is installed
Image

3. Run the SQL Server 2022 installer and just install the SQL Server" Database Engine Services" keeping the rest of the settings as defaults - it crashes as it can't replace (or maybe update or modify?) the ODBC driver AdvancedInstaller installed.
Image

When you look in the registry the MSI file used to do the installation is in a temporary directory that AdvancedInstaller deletes.
C:\Users\Administrator\AppData\Roaming\Your Company\Project A - PreInstall\prerequisites\Microsoft ODBC Driver 17 for SQL Server\

HOWEVER... I can right click on the ODBC driver in Add/Remove programs and modify it and uninstall it (so it has installed correctly).

It looks like the problem is with the Microsoft SQL Server ODBC Driver - because if you Modify > Repair (no problems) if you right click it and goto Repair then it fails - it looks like the bug is with Microsoft. It must be that SQL Server is also trying to run a Repair directly on this MSI and the bug persists into v18 too.

(Admittedly having the MSI file copied to our install directory and then running it from them would also solve the problem).

Image

Image


Thanks,


Dave
CENTREL Solutions Ltd
Server audit and documentation tools.
http://www.centrel-solutions.com
Catalin
Posts: 6623
Joined: Wed Jun 13, 2018 7:49 am

Re: Prerequisites can't be uninstalled: "The feature you are trying to use is on a network resource that is unavailable.

Hello David,

Thank you very much for this detailed explanation, it is much appreciated!

I do indeed unerstand what you meant now.

Before I go any further into testing this, could you please try the following option and let me know if it helps?

"Prerequisites" page --> "Packages" --> under "Global Prerequisite Options" --> "Do not remove prerequisite files" option
Screenshot_37.png
Screenshot_37.png (7.71 KiB) Viewed 10411 times
Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
davidjhomer
Posts: 55
Joined: Wed Jun 08, 2016 3:58 pm
Contact: Website Facebook Skype Twitter

Re: Prerequisites can't be uninstalled: "The feature you are trying to use is on a network resource that is unavailable.

Hello,

So I think that would solve the issue... BUT... only if they install SQL or run the repair as the same user because your prerequisites are copied and run from:

[AppDataFolder][|Manufacturer]\[|ProductName]\prerequisites

You can specify another folder but you can't specify APPDIR - I suppose you could hard code a folder such as
[ProgramFiles64Folder]\YourApp\Prereqs


Thanks,


Dave
CENTREL Solutions Ltd
Server audit and documentation tools.
http://www.centrel-solutions.com
Catalin
Posts: 6623
Joined: Wed Jun 13, 2018 7:49 am

Re: Prerequisites can't be uninstalled: "The feature you are trying to use is on a network resource that is unavailable.

Hello Dave,

You're always welcome!

Regarding your concern, I think that such cases would be rare and also yes, the extract location can be changed to a per-machine location such as "ProgramData" folder.

If we try to extract the prerequisites in another location, e.g. Program Files folder, we would need to launch the entire setup elevated from the start so it has enough privileges to extract the files in such location.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”