We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Upgrading from per-user to per-machine installation

Hi,

I need a help in understanding the per-user to per machine upgrade

Following is the scenario
v2.3:-
- We have DC setup which had the "installation type" as "per user"
- So this used to get installed in C:\Documents and Settings\%user%\Application Data\TELES AG\DesktopControl
- We used to store the user data in C:\Documents and Settings\%user%\Application Data\TELES AG\DesktopControl\data

v2.4:-
- We are supposed to support "installation type" as "per machine"
- During the upgrade, move the user data to a different folder
(i.e C:\Documents and Settings\%user%\Application Data\TELES AG\DesktopControl\data to C:\Documents and Settings\%user%\Application Data\fmcc\DesktopControl\data
Note: This needs to be done for all users who had installed per-user DC. And the per-user DC should be uninstalled for all the users.

Regards,
Rohan
shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Re: Upgrading from per-user to per-machine installation

If the above difficult, can you please help us with following implementation
- User has installed v2.3 as "per user"
- Now he wants to upgrade the same with v2.4 "per machine".
In this case, we would like to do the following
- v2.4 installer need to know the installation path of 2.3
- Copy one of the data folder(from 2.3 installation directory) to some other directory
- Uninstall v2.3
- Install v2.4
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Upgrading from per-user to per-machine installation

Hi Rohan,
Note: This needs to be done for all users who had installed per-user DC. And the per-user DC should be uninstalled for all the users.
I'm afraid that this cannot be achieved because a package cannot detect if a previous version of the application was installed for another user on the same machine (maybe you can do this through some complex custom actions). A similar problem was discussed on the Preserve install type when upgrading from per-user thread.
In this case, we would like to do the following
- v2.4 installer need to know the installation path of 2.3
- Copy one of the data folder(from 2.3 installation directory) to some other directory
- Uninstall v2.3
- Install v2.4
- the installation path can be taken from the registry (i.e. HKCU\Software\[Manufacturer]\[ProductName]\Path)
- you can use a "File Copy" operation in order to copy the data folder to another folder as described in the Change and Move folder contents on reinstall thread
- the old version can be uninstalled using the Uninstall previous version custom action

Let us know if this helped, otherwise give us more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Re: Upgrading from per-user to per-machine installation

Thank you.

Code: Select all

the installation path can be taken from the registry (i.e. HKCU\Software\[Manufacturer]\[ProductName]\Path)
We could not find this registry key.

But we could see the path in following locations
1)HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-21-166491754-1280741230-2432789392-1493\Products\A334052F458614B4AA48B4EDF4B8F6CF\InstallProperties
2)HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{F250433A-6854-4B41-AA84-4BDE4F8B6FFC}
3)HKEY_USERS\S-1-5-21-166491754-1280741230-2432789392-1493\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\MuiCache

Any help is appreciated.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Upgrading from per-user to per-machine installation

Hi Rohan,

Any Advanced Installer project contains in the "Registry" page, by default, the "HKCU\Software\[Manufacturer]\[ProductName]\Path" value, which stores the installation path of the package.

So, after the installation you can find that path as it is mentioned above, or under the "Wow6432Node" if it is a 32-bit application on a 64-bit machine. Please keep in mind that [Manufacturer] and [ProductName] are properties resolved at build time.

You can also take the path of your application from the registry paths you mentioned, if you can't find it at the path I specified.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Re: Upgrading from per-user to per-machine installation

In the aip file, I have no value for the path.
screenshot.JPG
screenshot.JPG (26 KiB) Viewed 14225 times
Do you think, I have deleted this by mistake, Should I add this for the next version??
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Upgrading from per-user to per-machine installation

Indeed, it may be that those values ​​have been deleted by mistake. You can add them again if you want, but this is not mandatory. You can use the other registry entry (that you mentioned above) to take that path of your application.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Re: Upgrading from per-user to per-machine installation

Thanks.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Upgrading from per-user to per-machine installation

My pleasure.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Re: Upgrading from per-user to per-machine installation

- you can use a "File Copy" operation in order to copy the data folder to another folder as described in the Change and Move folder contents on reinstall thread
Need a help from you in achieving this
- I have added a search condition, which searches the registry and stores the "folder path" in one property
say RESULT_PROPERTY = C:\Documents and Settings\rohs\Application Data\TELES AG\DesktopControl\PalService
- Now, if I am copying some files from this folder to some other folder, it works fine.
i.e as mentioned in http://www.advancedinstaller.com/forums ... 367#p65975

I was not able to copy from C:\Documents and Settings\rohs\Application Data\TELES AG\DesktopControl\Softphone\Data(i.e. [|RESULT_PROPERTY]..\Softphone\Data

I tried to use a new property "[|RESULT_PROPERTY]..\Softphone\Data" which always returns ..\Softphone\Data, and fails to copy

Can you please help with this.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Upgrading from per-user to per-machine installation

Hi Rohan,

I'm afraid that a "File Copy" operation does not support as the destination folder the parameters that you tried to use. To achieve this you can create a custom action that computes the path to the destination folder and stores it in a property, then you create a property-based folder using that property and use that folder as the destination folder for the copy operation.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Re: Upgrading from per-user to per-machine installation

Thanks, Understood. Also wrote a sample script which works fine.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Upgrading from per-user to per-machine installation

You're welcome.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Re: Upgrading from per-user to per-machine installation

Hi Eusebiu,

In the per-machine setup, we tried running the custom action to remove the previous per-user installation(which just calls the msiexec). But this does not get executed because two setups can not be running at the same time.

Are there any workarounds for this??

Regards,
Rohan
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Upgrading from per-user to per-machine installation

Hi Rohan,

Indeed, two MSI packages cannot run at the same time. That is why we mention that the Uninstall previous versions custom action should be placed on the "Wizard Dialogs Stage" or without sequence on a dialog button.

I'm afraid that there is no workaround for running that custom action on the "Install Execution Stage". A solution would be to create a wrapper that first uninstalls the old version and then launches the installation of the new version.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”