Bất cứ ai trong tương lai nhìn vào điều này, và tự hỏi làm thế nào để làm cho điều này [% HOMEPATH] làm việc sau đó hy vọng điều này sẽ giúp bạn:
<!-- Declare an action which binds the 'user home' to UserFolder
(You can replace [%HOMEDRIVE][%HOMEPATH] with [%USERPROFILE], read the difference from internet.) -->
<CustomAction
Id='SpecifyUserFolder'
Directory='UserFolder'
Value="[%HOMEDRIVE][%HOMEPATH]" />
<!-- put this before installation process -->
<InstallExecuteSequence>
<Custom Action="SpecifyUserFolder" Before="InstallFiles" />
</InstallExecuteSequence>
<!-- User home then becomes available here, because the ID matches the declared ID in CustomAction above. -->
<Directory Id='UserFolder'>
</Directory>'
Nguồn
2017-11-06 11:33:01
PersonalFolder là thư mục Documents cho người sử dụng hiện tại, tôi đang tìm thư mục thực tế của người dùng. Thư mục Documents sẽ làm mặc dù vậy, cảm ơn! – Rob
Ah! Xin lỗi vì điều đó. Vui mừng nó làm việc ra anyway. – gymbrall