2017-10-04 2 views
1

위의 코드를 사용하여 WiX Toolset을 사용하여 * .msi를 빌드하고이를 사용자 지정 폴더 (ProgramFiles 아님)에 설치해야합니다.앱을 맞춤 폴더에 설치하는 방법은 무엇입니까?

파일 또는 레지스트리 키와 같은 소스에서 설치 경로를 얻을 수 있습니까?

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

답변

0

[이 해결]

MyAppInstallationPath.ini 파일

[Data] 
Path=V:\ 

* .wsx 파일

<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>