Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

MSI-Pakete ins Profil installieren


3 replies to this topic

Admini

Admini
  • Members
  • 2 posts

Posted 25 January 2005 - 06:48

Moin Moin

Ich benutze WinInstall 2003 LE um meine Pakete zu erstellen und bearbeiten.

Mein Paket ist sowiet fertig.Nun möchte ich das einige Dateien in das Profil des Nutzer installiert werden der gerade angemeldet ist.
Da das Programm das ich installieren will kein Leerzeichen in den Pfaden verträgt, habe ich erstmal den Default-Namen der Profile von DOKUMENTE UND EINSTELLUNGEN in PROFILES geändert.

Wie bringe ich WinInstall bei das er die Dateien nach PROFILES/[USERNAME]/ installiert??

Oder anders gefragt gibt es eine Umgebungsvariable für den zur Laufzeit der Installation angemeldeten User??

Danke für eure Unterstützung

NewOrder

NewOrder
  • Members
  • 10 posts

Posted 25 January 2005 - 11:23

Hallo,

also, wie man WinInstall dazu bringt, weiß ich nicht, da ich damit nicht arbeite. Aber generell wird man die Lösung über eine CustomAction realisieren. Ich kopiere dir hier mal den Wise-Artikel 1334 rein, in dem die Lösung beschrieben ist:

Symptom
How do I create a folder directly under the user's profile folder?
Resolution
There may be occasions when files in your installation package pertain to the user currently logged into the machine. These may be user-specific data files or text files that vary from user to user that your application updates.
To create a folder under the user's profile folder, complete the following steps:
1. Open Wise for Windows Installer, Wise for Visual Studio .NET, or Windows Installer Editor in Wise Package Studio.
2. Select Preferences from the Edit menu. The Preferences dialog appears.
3. Click the Installation Expert tab and if not all ready marked, mark the View directory for all features on files page checkbox. Click OK.
4. Click the Setup Editor tab and then click the Tables tab.
5. Select the Directory table from the table list.
6. In the pane on the upper right, right-click and select New Row. If you receive a warning message, click OK to remove the message.
7. Enter the following information for each column:
* Directory: PROFILE
* Directory_Parent: TARGETDIR
* DefaultDir: Profile (This value is irrelevant as it will be overwritten when you add a Set Directory custom action.)
8. Click the MSI Script tab and select All Custom Actions from the Installation Mode drop-down list.
9. In the Actions list, double-click Set Directory. The Set Directory dialog appears.
10. On the Details tab, enter the following information:
* Custom Action Name: SetPROFILE
* Directory: PROFILE
* Directory Value: [%USERPROFILE]\<MyFolderName> where <MyFolderName> should be replaced with the name of the folder you want to create.
11. Click the Location tab and insert the Custom Action after the CostFinalize action in the Normal Execute Immediate/Deferred sequence.
NOTE: With the CostFinalize action, Windows Installer resolves the Directory table, creating the directory properties for the installation. If you sequence the Set Directory custom action before CostFinalize, your custom value will be overwritten when the Directory table is resolved.
12. Click OK.
13. Click the Installation Expert tab and click the Files page link in the Feature Details group.
14. In the directory under the Destination Computer named Profile (the value you entered in the DefaultDir column in the Directory table), add files to this folder in the same manner as you would add files to predefined locations. You can create subfolders of this directory using the Files page with no additional customization.
At runtime, the installation resolves the value of the environment variable USERPROFILE and appends the folder name to this location. The folder is then created and the files you placed into this folder at design time are installed.

Das ist natürlich in erster Linie auf das Wise Package Studio ausgerichtet, allerdings sollte dir die beschriebene Vorgehensweise doch weiterhelfen.

Grüße,

NewOrder

NewOrder

NewOrder
  • Members
  • 10 posts

Posted 25 January 2005 - 11:57

Hi nochmal,

mir fällt gerade ein, dass eine Sache allerdings in dem Artikel nicht beschrieben ist. Wie realisiert am besten, dass die Dateien dann auch wirklich für jeden angemeldeten Benutzer installiert werden. Dazu habe ich die Dateien in eine seperate Komponente aufgenommen, die zusätzlich irgendeinen CurrentUser Registrykey-Eintrag beinhaltet, der auch noch als Keypath klassifiziert ist. Wenn der Benutzer dann über einen Einstiegspunkt (z.B. Installer-Shortcut) die Anwendung startet wird im Prinzip über Selfrepair das gewünschte realisiert. Hast du keine Einstiegspunkte in deiner Anwendung, hilft ein myitforum-Artikel http://myitforum.tec...iew.asp?id=6842 weiter:


If you are using Windows Installer for per-machine-based installations, it could be the case that your setup contains components with user-related resources that have no entry-points to initiate the install-on-demand/self healing function of MSI. This, of course, will mean that when deployed the package will not install the user resources required to run the application properly.

But wait, don’t lose hope! In such a case you can use the Active Setup for a self healing on demand. It needs just one registry key in your msi file.

This registry key can be assigned to any Component that installs per-machine resources or you can create one component just for this key.

How it works:
The value in the StubPath key will be executed at a special time during which the Active Setup tasks are running and no other Windows Installer processes are running in the background that could cause the repair not to run (which would be the case if you attempted to run this command in the Run-Once registry key).
The command will thereby perform a repair for HKCU registry keys and missing files.

If this command runs successfully, it will create a registry key in HKCU and the command will not run again. However, if you wish to trigger this command again, because of a small update, then use the Version Key and increment its value each time you wish to run this command again when a user logs in.

Important Note:
Remember to use this command only if your setup does not contain any entry-point that would not allow the repair on demand, because this repair will run when a user on the target workstation logs in after the installation has been run. That means, even if the user doesn’t use the installed application, it will run the repair. And as you may already know, those repairs can take some time depending on the workstation’s hardware configuration and the size of the package.


Grüße,

NewOrder


Admini

Admini
  • Members
  • 2 posts

Posted 25 January 2005 - 15:47

Gibt es so eine Lösung auch für den WinInstall LE 2003?