Uninstall: System variable PATH is not restored to its original value - Advanced Installer Community
eit
Posts: 1
Joined: Tue Apr 21, 2020 11:06 pm

Uninstall: System variable PATH is not restored to its original value

Hi

We are using the Edit Environment Variable Dialog to set the system PATH environment variable on Window 10

The Path environment variable is set OK when installing our product (it appends our product folders to the PATH)

The problem is when we uninstall the product: the system PATH is not restored to its original value (meaning our product folders are not removed from the list)

I think that choosing the Component in the Edit Environment Variable Dialogue is meaningful.
These are the available values for component - We don't know where this come ftom;

<ROW Feature_="AIOtherFiles" Component_="start.bat"/>
<ROW Feature_="MainFeature" Component_="AI_ExePath"/>
<ROW Feature_="MainFeature" Component_="ProductInformation"/>
<ROW Feature_="MainFeature" Component_="main.properties_2"/>
<ROW Feature_="MainFeature" Component_="setup.bat_1"/>
<ROW Feature_="MainFeature" Component_="APPDIR"/>



Please help.
EditSystemVariable.jpg
EditSystemVariable.jpg (36.02 KiB) Viewed 1544 times
All the best,
Eitan
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: Uninstall: System variable PATH is not restored to its original value

Hello Eitan and welcome to Advanced Installer forums,

I have tested this on my machine (Win10) and everything worked as expected - the values were removed upon uninstall.

In order for me to further investigate this, could you please forward me a copy of your .AIP file by e-mail at support at advancedinstaller dot com?

Also, one thing I've noticed from your screenshots: please keep in mind that the when the APPDIR property resolves (at install time), it automatically ends in the "\" path separator, therefore you do not need to add 1 more to it. Let's consider the default APPDIR:

Code: Select all

C:\Program Files\Your Company\Your Application\
As you can see, it already ends in a path separator, therefore if you add the path like this:

Code: Select all

[APPDIR]\YourFolder
the resolved value will be:

Code: Select all

C:\Program Files\Your Company\Your Application\\YourFolder
(notice the extra "\" before "YourFolder")

WIth that being said, when adding the above to the PATH environment variable, it should look like this:

Code: Select all

[APPDIR]YourFolder
respectively

Code: Select all

[APPDIR]YourFolder\YourSecondFolder
for multiple folders.

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

Return to “Common Problems”