2017-10-04 3 views
1

Ich baue meine * .msi mit WiX Toolset mit Code unten und ich muss das in benutzerdefinierten Ordner (nicht ProgramFiles) installieren.Wie installiere ich eine App in einen benutzerdefinierten Ordner?

Kann ich Installationspfad von Quellen wie Datei oder Registrierungsschlüssel bekommen?

<Fragment> 
    <Directory Id="TARGETDIR" Name="SourceDir"> 
     <Directory Id="ProgramFilesFolder"> 
     <Directory Id="INSTALLFOLDER" Name="MySetup" /> 
     </Directory> 
    </Directory> 
    </Fragment> 

Antwort

0

[GELÖST]

MyAppInstallationPath.ini Datei

[Data] 
Path=V:\ 

* WSX-Datei

<Fragment> 
    <Property Id="INSTALLPATH"> 
     <IniFileSearch Id="MyAppInstalationPath" Type="directory" Name="MyAppInstallationPath.ini" Section="State" Key="Data" /> 
    </Property> 
    </Fragment> 

    <Fragment> 
    <Directory Id="TARGETDIR" Name="SourceDir"> 
     <Directory Id="INTALLPATH" Name="MyApp"> 
     <Directory Id="INSTALLFOLDER" Name="MySetup" /> 
     </Directory> 
    </Directory> 
    </Fragment> 

    <Fragment> 
    <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> 
     <Component Id="ProductComponent" Guid="F49934B4-6DE4-4EF1-8CDF-A4C758378FD5"> 
     <File Id="Calc" DiskId="1" Source="C:\WINDOWS\system32\calc.exe" /> 
     </Component> 
    </ComponentGroup> 
    </Fragment> 
Verwandte Themen