Installation creates folders in the wrong place
I've created a simple installation that creates a folder under the users profile and copies some files into it. When I run the MSI logged on to the computer everything works correctly. When I try to push the package via GPO's the folder is created in the root of C:\
Any ideas why it would create the folder in the wrong location?
Any ideas why it would create the folder in the wrong location?
0 Comments
[ + ] Show comments
Answers (4)
Please log in to answer
Posted by:
brenthunter2005
18 years ago
Posted by:
bcameron
18 years ago
Assigned User based Install. The app path is [userprofile]ini. Also in the install I set some app paths in the registry.
Basically I have an application that runs from a server (the actual EXE files reside on the Server along with the DLL's). The computers need to have the INI files and shortcuts. Before my company would put the INI files into the windows directory and every person that uses that computer would share the same INI file. I'm trying to get away from shared INI's and move them to the user's profile.
Thanks for the help,
Bill
Basically I have an application that runs from a server (the actual EXE files reside on the Server along with the DLL's). The computers need to have the INI files and shortcuts. Before my company would put the INI files into the windows directory and every person that uses that computer would share the same INI file. I'm trying to get away from shared INI's and move them to the user's profile.
Thanks for the help,
Bill
Posted by:
brenthunter2005
18 years ago
The first thing you need to do in your MSI package is create a feature that contains the registry key that points to the users's specific INI file, the INI file itself, and an advertised shortcut (the targets at the exe).
The advertised shortcut is needed so that when the user logs on for the first time, that feature is installed for that particular user, hence the ability for individual INI settings.
The next trick is where I think you might be going wrong. By default, Windows Installer won't allow you to install anything to the root of the users profile. There is a workaround for this, but I suggest you should install the INI file to the Application Data folder, as Windows Installer supports this.
The Current User (HKCU) registy key value should be in the format of: [AppDataFolder]MyApp\filename.ini
For each user that clicks on the shortcut, a registry key value will be created in the expanded form of: c:\documents and settings\username\application data\MyApp\filename.ini
The only thing left now is the creation of the default INI file in the users Application Data folder.
Good luck.
The advertised shortcut is needed so that when the user logs on for the first time, that feature is installed for that particular user, hence the ability for individual INI settings.
The next trick is where I think you might be going wrong. By default, Windows Installer won't allow you to install anything to the root of the users profile. There is a workaround for this, but I suggest you should install the INI file to the Application Data folder, as Windows Installer supports this.
The Current User (HKCU) registy key value should be in the format of: [AppDataFolder]MyApp\filename.ini
For each user that clicks on the shortcut, a registry key value will be created in the expanded form of: c:\documents and settings\username\application data\MyApp\filename.ini
The only thing left now is the creation of the default INI file in the users Application Data folder.
Good luck.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.