rohitgarg20
Posts: 31
Joined: Thu Mar 13, 2014 6:31 am

"Programs" folder is being created Under LocalAppDataFolder

Hi,

I have been experiencing a problem where I have set Installation folder to AI_UserProgramFiles.

It is not behaving properly. If the installation mode is set for Current User only, then the application gets installed into unusual "programs" folder inside Local folder i.e.
LocalAppDataFolder\Programs\Application

But this is not what we want. We want it to be:

LocalAppDataFolder\Application

Kindly provide your suggestion as soon as possible.

Thanks & Regards,
Rohit Garg
R
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: "Programs" folder is being created Under LocalAppDataFol

Hello Rohit,
If the installation mode is set for Current User only, then the application gets installed into unusual "programs" folder inside Local folder i.e.
LocalAppDataFolder\Programs\Application
This is our default implementation. However, can you please tell us why you want to remove the related programs folder?

You can remove the related folder from the installation path through a custom action. For example, you can create your custom action as a custom action written in C# or a custom action written in C++.

Then you can go in the “Custom Actions” page and add a predefined Launch attached file custom action withot sequence. This type of custom action can execute an application (EXE or DLL) or run a script (VBScript or Java script). Also, the source file will be embedded in the MSI file but will not be deployed at install time with the other application files. You can add this custom action as a published event on the Next > control from the InstallType dialog. You can take a look on the How do I execute a custom action when a button is pushed? article with related information for hints and guidance.

Please note that you need to condition the execution of this custom action, so it only be executed when the AI_InstallPerUser = 1 when a Per-User installation is made.

Please use the attached sample for your reference.

Best regards,
Dan
Attachments
SampleApp.aip
(11.84 KiB) Downloaded 576 times
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
rohitgarg20
Posts: 31
Joined: Thu Mar 13, 2014 6:31 am

Re: "Programs" folder is being created Under LocalAppDataFol

Hi Dan,

There is no particular reason of why they don't want Programs Folder inside LocalAppData. It is a specification and looks odd, because when installing it doesn't show the programs folder but actually it does. So, some users might get confused.

Thank you for the information. I have professional version of the advanced installer and I am not able to edit the Installtyp dialog.
Also, how to remove "Programs" folders from custom action. Can you please provide content for this?

Kindly provide suggestion on this.

Thanks & Regards,
Rohit Garg
rohit.aggrawal90@gmail.com
R
rohitgarg20
Posts: 31
Joined: Thu Mar 13, 2014 6:31 am

Re: "Programs" folder is being created Under LocalAppDataFol

Hi Dan,

Kindly reply as it is urgent. Also, how can I achieve desired functionality using Professional version.

Best Regards
R
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: "Programs" folder is being created Under LocalAppDataFol

Hi Rohit,

Please find the attached .zip archive that contains this fixed .dll.
Replace the AICustAct.dll from the installation folder of Advanced Installer. (e.g. the default one is C:\Program Files (x86)\Caphyon\Advanced Installer 11.3\custact\x86) and then rebuild your installation package.

Please let me know if that worked as expected.

Best regards,
Dan
Attachments
AICustAct.zip
(41.37 KiB) Downloaded 604 times
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
rohitgarg20
Posts: 31
Joined: Thu Mar 13, 2014 6:31 am

Re: "Programs" folder is being created Under LocalAppDataFol

Hi Dan,

Thank you for providing the fixed DLL.

I tried it and it is working fine on all Virtual Machines i.e. if installer is being installed on VMs.

But i am experiencing problems on Development machines:
On Dev machine, Installer crashing for "All Users" Mode (Working fine for Current User)
And on other Dev PC, Resource required dialog coming when "Current User" mode is selected (works fine for AllUsers Mode)

Can you please help with these scenarios too?

Thanks & Regards,
Rohit Garg
R
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: "Programs" folder is being created Under LocalAppDataFol

Hi Rohit,

I'm not sure why you encountered this behavior.
In order to have a better view about this, can you please send us the .AIP (project file) and a verbose log of the installation process?

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
rohitgarg20
Posts: 31
Joined: Thu Mar 13, 2014 6:31 am

Re: "Programs" folder is being created Under LocalAppDataFol

Hey Dan,

I just checked it again on other dev PC, it is working fine there..Don't know why not working on My Dev PCs.

Anyways it is working fine on all VM's. Thank you for the required help.

Can you please kindly tell me, why after selecting "All Users" mode on windows 64 bit, it still shows ProgramFiles (x86) as installation path?
I am using AI_UserProgramFiles as Installation folder.

Thanks & Regards,
Rohit Garg
R
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: "Programs" folder is being created Under LocalAppDataFol

Hi Rohit,

If your package type is set as 32-bit package then this is the default behavior.

In order to implement your scenario, you can select the Mixed 32/64-bit matching the platform option for the package type.
This package runs as a 32-bit package on 32-bit systems and as a 64-bit package on x64 systems. It allows you to have a single installation package that will install on both platform types (32-bit and 64-bit platforms) and can install files or registry in the real system paths regardless of the platform.

If the "Mixed 32/64-bit matching the platform" package type is selected in the Install Parameters page, then the wizard will launch and will guide you step by step through every stage required to organize your “Mixed 32/64-bit matching the platform” package. This way, on 64-bit platform the APPDIR would not be redirected to Program Files(x86) and the installation package will be installed by default in the Program Files.

Let us know if you have other questions.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
rohitgarg20
Posts: 31
Joined: Thu Mar 13, 2014 6:31 am

Re: "Programs" folder is being created Under LocalAppDataFol

Hi Dan,

I have already selected "Mixed 32-64" from install parameters page, it still shows Program Files(x86) as installation path. Any other idea about this?

Also, Even if the installation problem of the application in Unusual "Programs" folder is solved, but "Programs" folder is still being created under LocalAppData folder with a "Common" folder in it. It is required that these folders are not created anymore when the application is installed.

Kindly help with this.

Thanks & Regards,
Rohit Garg
R
rohitgarg20
Posts: 31
Joined: Thu Mar 13, 2014 6:31 am

Re: "Programs" folder is being created Under LocalAppDataFol

Hi Dan,

I hope you are doing well.

Kindly help so that no extra folders like common inside programs folders are created under localappData folder. It is urgent requirement as client bothers about these extra created folders. It would be beneficial if you could provide modified dll or any suggestion to fix it.

Thanks & Regards,
Rohit Garg
R
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: "Programs" folder is being created Under LocalAppDataFol

Hi Rohit,

I'm afraid that removing the Programs folder from the install location when the Installation Type is Mixed and a Per-User installation is made, involves more changes so it cannot be in a single fixed .dll. Initial design was based on the Windows Installer best practices.
I'll keep you posted on this thread once the dev team gets a chance to investigate this possible fix(improvement).

However, I've created a sample project where the value of APPDIR is changed (e.g. remove the Programs folder) when a Per-User installation is made. During installation UI sequence, if the user do not change the default path (e.g. "C:\Users\<user name>\AppData\Local\Programs\Your Company\Your Application\") then I change the installation folder by removing the Programs folder. So, the final installation folder will be:
C:\Users\<user name>\AppData\Local\Your Company\Your Application\

The sample project is attached to this thread, so if you are interested to take a look directly at my project, you are more than welcome to download the ZIP file.

Best regards,
Dan
Attachments
SampleAppPro.zip
(2.76 KiB) Downloaded 678 times
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
rohitgarg20
Posts: 31
Joined: Thu Mar 13, 2014 6:31 am

Re: "Programs" folder is being created Under LocalAppDataFol

Hi Dan,

This is not possibly window installer best practices, but only suggestions from Microsoft. Most programs are not installed in any extra folder if we have a close look.

So, it would be great if you guys can correct it/provide us a fix because this minor thing alone dominates over the flexibility that AI offers.

Also, my question regarding ProgramFiles(x86) path when OS is 64 is still not addressed. Kindly suggest for it as well.

Thanks & Regards,
Rohit Garg
R
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: "Programs" folder is being created Under LocalAppDataFol

Hi Rohit,
Also, my question regarding ProgramFiles(x86) path when OS is 64 is still not addressed. Kindly suggest for it as well.
I'm not sure why you encountered this behavior.
In order to have a better view about this, can you please send us the .AIP (project file) and a verbose log of the installation process to support at advancedinstaller dot com so we can investigate this? If it contains confidential information you can send us a small test project which reproduce this behavior.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
rohitgarg20
Posts: 31
Joined: Thu Mar 13, 2014 6:31 am

Re: "Programs" folder is being created Under LocalAppDataFol

Hi Dan,

Have just mailed you a sample project file which shows the scenario.

Kindly have a look and provide suggestions asap. Please.

Thanks & Regards,
Rohit Garg
R

Return to “Building Installers”