We deploy an app at our company as a per-user install. The binary files go to C:\Users\username\AppData\Local\OurCompany, but the shortcuts are created sometimes in the roaming profile, sometimes to the local profile (Windows 7). I have not been able to determine any reason for the variation.
The problem is that as users roam from machine to machine, sometimes Windows creates their local profile directory with ".DOMAIN" at the end, sometimes not (where DOMAIN is our Active Directory short domain name). So the path to the binary files for our app may vary depending on the machine. That's fine if you don't roam, but if you do move around, with shortcuts in the Roaming profile, sometimes the shortcuts are not pointing to the correct AppData path.
In Advanced Installer, I create my shortcuts in the "Application Shortcut Folder" area. Under Install Parameters, my Application Shortcut folder is defined as [ProgramMenuFolder][ProductName]. Yet the final shortcut location is inconsistent. Usually the base path is AppData\Roaming\Microsoft\Windows\Start Menu\Programs, but occasionally the shortcuts are in AppData\Local.
For the record, this is a Java app and the path to our binary files is needed in the "Working Directory" part of the shortcut. Currently I have the working directory property in the shortcuts set to "APPDIR".
I can think of two ways to fix this, but I don't know how to implement either in Advanced Installer:
1. Make the Working Directory property of the shortcuts be "%LOCALAPPDATA%\OurCompany" so that the environment variable is expanded at run-time and always points to the correct folder regardless of the user profile path on any particular machine.
2. Force the shortcuts to be per-machine, stored in AppData\Local, not AppData\Roaming.
I tried making a user defined property with the content of "%LOCALAPPDATA%\[ProductName]" but when running the installer I get an error "Could not access network location %LOCALAPPDATA%\OurCompany".
I'm using the free version of AI. Would I have more options with the paid version?
FOLLOW US
Get the latest news in Application Packaging