Wix storing a path in a property
I've been struggling with this Wix installer stuff..What I need to do is to store the JRE path selected by the person doing the installation in a property (I think that I need to do it like this). After having the property, I intend to use it somehow at the end of the installation, to write the value in a file..
Problem is that I can't seem to store the value of the DirectoryCombo/DirectoryList/PathEdit in the property...
My code is like this:
<!-- I use this to initialize the JREPATH to the most likely path..This works as expected -->
<CustomAction Id='INIT_JREPATH' Property='JREPATH' Value='[ProgramFilesFolder]Java' Execute='firstSequence' />
<!-- When this button is clicked, a new dialog is opened, where the UI elements have the path initialized above..This works as expected.. -->
<Control Id='BrowseButton' Type='PushButton' X='276' Y='126' Width='90' Height='18' Text='{VSI_MS_Sans_Serif13.0_0_0}B&rowse...' TabSkip='no'>
<Publish Property='SelectJreFolderDialog_Property' Value='JREPATH'><![CDATA[1]]></Publish>
<Publish Event='SpawnDialog' Value='SelectJreFolderDialog'><![CDATA[1]]></Publish>
</Control>
<!-- This is where I got stuck -->
<Dialog Id='SelectJreFolderDialog' X='50' Y='50' Width='313' Height='223' Title='Browse for JRE Installation Folder' NoMinimize='yes'>
<Control Id='OKButton' Type='PushButton' X='168' Y='198' Width='66' Height='18' Text='{VSI_MS_Sans_Serif13.0_0_0}OK' TabSkip='no' Default='yes'>
**<!-- The code from below are various attempts that I tried to set the property at button click**
<Publish Property='SelectJreFolder_Property' Value='C:Program Files (x86)Javajre1.8.0_181'><![CDATA[1]]></Publish>
<Publish Event='SetProperty' Value='[SelectJreFolderDialog_Property]'><![CDATA[1]]></Publish>
<!-- <Publish Event='SetTargetPath' Value='[SelectJreFolderDialog_Property]'><![CDATA[1]]></Publish> -->
<Publish Event='EndDialog' Value='Return'><![CDATA[1]]></Publish>
</Control>
<Control Id='CancelButton' Type='PushButton' X='240' Y='198' Width='66' Height='18' Text='{VSI_MS_Sans_Serif13.0_0_0}Cancel' TabSkip='no' Cancel='yes'>
<Publish Event='Reset' Value='{}'><![CDATA[1]]></Publish>
<Publish Event='EndDialog' Value='Return'><![CDATA[1]]></Publish>
</Control>
<Control Id='BrowseText' Type='Text' X='6' Y='9' Width='60' Height='12' Text='{VSI_MS_Sans_Serif13.0_0_0}&Browse:' TabSkip='no' />
<Control Id='FolderCombo' Type='DirectoryCombo' X='66' Y='6' Width='198' Height='120' Property='SelectJreFolderDialog_Property' Text='{VSI_MS_Sans_Serif13.0_0_0}MsiDirectoryCombo' TabSkip='no' Indirect='yes' Removable='yes' Fixed='yes' Remote='yes' RAMDisk='yes' Floppy='yes'>
<Publish Property='SelectJreFolder_Property' Value= '[SelectJreFolderDialog_Property]' ><![CDATA[1]]></Publish>
</Control>
<!-- I have other elements here, a DirectoryList and a PathEdit, basically different approaches to selec the needed path..I did not add them because I don't think that they are relevant -->
</Dialog>
Problem is that..this is not working...when I try to set the value, what actually happens on the next dialog is that I get the value "JREPATH" instead of what the person doing the install selects...ex instead of C:blsa blajava
How can I fix this ? Any suggestions ?...The best approach if possible would be to store the value from the DirectoryCombo when Ok is pressed...not sure how doable is that..
Thanks a lot!
wix
add a comment |
I've been struggling with this Wix installer stuff..What I need to do is to store the JRE path selected by the person doing the installation in a property (I think that I need to do it like this). After having the property, I intend to use it somehow at the end of the installation, to write the value in a file..
Problem is that I can't seem to store the value of the DirectoryCombo/DirectoryList/PathEdit in the property...
My code is like this:
<!-- I use this to initialize the JREPATH to the most likely path..This works as expected -->
<CustomAction Id='INIT_JREPATH' Property='JREPATH' Value='[ProgramFilesFolder]Java' Execute='firstSequence' />
<!-- When this button is clicked, a new dialog is opened, where the UI elements have the path initialized above..This works as expected.. -->
<Control Id='BrowseButton' Type='PushButton' X='276' Y='126' Width='90' Height='18' Text='{VSI_MS_Sans_Serif13.0_0_0}B&rowse...' TabSkip='no'>
<Publish Property='SelectJreFolderDialog_Property' Value='JREPATH'><![CDATA[1]]></Publish>
<Publish Event='SpawnDialog' Value='SelectJreFolderDialog'><![CDATA[1]]></Publish>
</Control>
<!-- This is where I got stuck -->
<Dialog Id='SelectJreFolderDialog' X='50' Y='50' Width='313' Height='223' Title='Browse for JRE Installation Folder' NoMinimize='yes'>
<Control Id='OKButton' Type='PushButton' X='168' Y='198' Width='66' Height='18' Text='{VSI_MS_Sans_Serif13.0_0_0}OK' TabSkip='no' Default='yes'>
**<!-- The code from below are various attempts that I tried to set the property at button click**
<Publish Property='SelectJreFolder_Property' Value='C:Program Files (x86)Javajre1.8.0_181'><![CDATA[1]]></Publish>
<Publish Event='SetProperty' Value='[SelectJreFolderDialog_Property]'><![CDATA[1]]></Publish>
<!-- <Publish Event='SetTargetPath' Value='[SelectJreFolderDialog_Property]'><![CDATA[1]]></Publish> -->
<Publish Event='EndDialog' Value='Return'><![CDATA[1]]></Publish>
</Control>
<Control Id='CancelButton' Type='PushButton' X='240' Y='198' Width='66' Height='18' Text='{VSI_MS_Sans_Serif13.0_0_0}Cancel' TabSkip='no' Cancel='yes'>
<Publish Event='Reset' Value='{}'><![CDATA[1]]></Publish>
<Publish Event='EndDialog' Value='Return'><![CDATA[1]]></Publish>
</Control>
<Control Id='BrowseText' Type='Text' X='6' Y='9' Width='60' Height='12' Text='{VSI_MS_Sans_Serif13.0_0_0}&Browse:' TabSkip='no' />
<Control Id='FolderCombo' Type='DirectoryCombo' X='66' Y='6' Width='198' Height='120' Property='SelectJreFolderDialog_Property' Text='{VSI_MS_Sans_Serif13.0_0_0}MsiDirectoryCombo' TabSkip='no' Indirect='yes' Removable='yes' Fixed='yes' Remote='yes' RAMDisk='yes' Floppy='yes'>
<Publish Property='SelectJreFolder_Property' Value= '[SelectJreFolderDialog_Property]' ><![CDATA[1]]></Publish>
</Control>
<!-- I have other elements here, a DirectoryList and a PathEdit, basically different approaches to selec the needed path..I did not add them because I don't think that they are relevant -->
</Dialog>
Problem is that..this is not working...when I try to set the value, what actually happens on the next dialog is that I get the value "JREPATH" instead of what the person doing the install selects...ex instead of C:blsa blajava
How can I fix this ? Any suggestions ?...The best approach if possible would be to store the value from the DirectoryCombo when Ok is pressed...not sure how doable is that..
Thanks a lot!
wix
add a comment |
I've been struggling with this Wix installer stuff..What I need to do is to store the JRE path selected by the person doing the installation in a property (I think that I need to do it like this). After having the property, I intend to use it somehow at the end of the installation, to write the value in a file..
Problem is that I can't seem to store the value of the DirectoryCombo/DirectoryList/PathEdit in the property...
My code is like this:
<!-- I use this to initialize the JREPATH to the most likely path..This works as expected -->
<CustomAction Id='INIT_JREPATH' Property='JREPATH' Value='[ProgramFilesFolder]Java' Execute='firstSequence' />
<!-- When this button is clicked, a new dialog is opened, where the UI elements have the path initialized above..This works as expected.. -->
<Control Id='BrowseButton' Type='PushButton' X='276' Y='126' Width='90' Height='18' Text='{VSI_MS_Sans_Serif13.0_0_0}B&rowse...' TabSkip='no'>
<Publish Property='SelectJreFolderDialog_Property' Value='JREPATH'><![CDATA[1]]></Publish>
<Publish Event='SpawnDialog' Value='SelectJreFolderDialog'><![CDATA[1]]></Publish>
</Control>
<!-- This is where I got stuck -->
<Dialog Id='SelectJreFolderDialog' X='50' Y='50' Width='313' Height='223' Title='Browse for JRE Installation Folder' NoMinimize='yes'>
<Control Id='OKButton' Type='PushButton' X='168' Y='198' Width='66' Height='18' Text='{VSI_MS_Sans_Serif13.0_0_0}OK' TabSkip='no' Default='yes'>
**<!-- The code from below are various attempts that I tried to set the property at button click**
<Publish Property='SelectJreFolder_Property' Value='C:Program Files (x86)Javajre1.8.0_181'><![CDATA[1]]></Publish>
<Publish Event='SetProperty' Value='[SelectJreFolderDialog_Property]'><![CDATA[1]]></Publish>
<!-- <Publish Event='SetTargetPath' Value='[SelectJreFolderDialog_Property]'><![CDATA[1]]></Publish> -->
<Publish Event='EndDialog' Value='Return'><![CDATA[1]]></Publish>
</Control>
<Control Id='CancelButton' Type='PushButton' X='240' Y='198' Width='66' Height='18' Text='{VSI_MS_Sans_Serif13.0_0_0}Cancel' TabSkip='no' Cancel='yes'>
<Publish Event='Reset' Value='{}'><![CDATA[1]]></Publish>
<Publish Event='EndDialog' Value='Return'><![CDATA[1]]></Publish>
</Control>
<Control Id='BrowseText' Type='Text' X='6' Y='9' Width='60' Height='12' Text='{VSI_MS_Sans_Serif13.0_0_0}&Browse:' TabSkip='no' />
<Control Id='FolderCombo' Type='DirectoryCombo' X='66' Y='6' Width='198' Height='120' Property='SelectJreFolderDialog_Property' Text='{VSI_MS_Sans_Serif13.0_0_0}MsiDirectoryCombo' TabSkip='no' Indirect='yes' Removable='yes' Fixed='yes' Remote='yes' RAMDisk='yes' Floppy='yes'>
<Publish Property='SelectJreFolder_Property' Value= '[SelectJreFolderDialog_Property]' ><![CDATA[1]]></Publish>
</Control>
<!-- I have other elements here, a DirectoryList and a PathEdit, basically different approaches to selec the needed path..I did not add them because I don't think that they are relevant -->
</Dialog>
Problem is that..this is not working...when I try to set the value, what actually happens on the next dialog is that I get the value "JREPATH" instead of what the person doing the install selects...ex instead of C:blsa blajava
How can I fix this ? Any suggestions ?...The best approach if possible would be to store the value from the DirectoryCombo when Ok is pressed...not sure how doable is that..
Thanks a lot!
wix
I've been struggling with this Wix installer stuff..What I need to do is to store the JRE path selected by the person doing the installation in a property (I think that I need to do it like this). After having the property, I intend to use it somehow at the end of the installation, to write the value in a file..
Problem is that I can't seem to store the value of the DirectoryCombo/DirectoryList/PathEdit in the property...
My code is like this:
<!-- I use this to initialize the JREPATH to the most likely path..This works as expected -->
<CustomAction Id='INIT_JREPATH' Property='JREPATH' Value='[ProgramFilesFolder]Java' Execute='firstSequence' />
<!-- When this button is clicked, a new dialog is opened, where the UI elements have the path initialized above..This works as expected.. -->
<Control Id='BrowseButton' Type='PushButton' X='276' Y='126' Width='90' Height='18' Text='{VSI_MS_Sans_Serif13.0_0_0}B&rowse...' TabSkip='no'>
<Publish Property='SelectJreFolderDialog_Property' Value='JREPATH'><![CDATA[1]]></Publish>
<Publish Event='SpawnDialog' Value='SelectJreFolderDialog'><![CDATA[1]]></Publish>
</Control>
<!-- This is where I got stuck -->
<Dialog Id='SelectJreFolderDialog' X='50' Y='50' Width='313' Height='223' Title='Browse for JRE Installation Folder' NoMinimize='yes'>
<Control Id='OKButton' Type='PushButton' X='168' Y='198' Width='66' Height='18' Text='{VSI_MS_Sans_Serif13.0_0_0}OK' TabSkip='no' Default='yes'>
**<!-- The code from below are various attempts that I tried to set the property at button click**
<Publish Property='SelectJreFolder_Property' Value='C:Program Files (x86)Javajre1.8.0_181'><![CDATA[1]]></Publish>
<Publish Event='SetProperty' Value='[SelectJreFolderDialog_Property]'><![CDATA[1]]></Publish>
<!-- <Publish Event='SetTargetPath' Value='[SelectJreFolderDialog_Property]'><![CDATA[1]]></Publish> -->
<Publish Event='EndDialog' Value='Return'><![CDATA[1]]></Publish>
</Control>
<Control Id='CancelButton' Type='PushButton' X='240' Y='198' Width='66' Height='18' Text='{VSI_MS_Sans_Serif13.0_0_0}Cancel' TabSkip='no' Cancel='yes'>
<Publish Event='Reset' Value='{}'><![CDATA[1]]></Publish>
<Publish Event='EndDialog' Value='Return'><![CDATA[1]]></Publish>
</Control>
<Control Id='BrowseText' Type='Text' X='6' Y='9' Width='60' Height='12' Text='{VSI_MS_Sans_Serif13.0_0_0}&Browse:' TabSkip='no' />
<Control Id='FolderCombo' Type='DirectoryCombo' X='66' Y='6' Width='198' Height='120' Property='SelectJreFolderDialog_Property' Text='{VSI_MS_Sans_Serif13.0_0_0}MsiDirectoryCombo' TabSkip='no' Indirect='yes' Removable='yes' Fixed='yes' Remote='yes' RAMDisk='yes' Floppy='yes'>
<Publish Property='SelectJreFolder_Property' Value= '[SelectJreFolderDialog_Property]' ><![CDATA[1]]></Publish>
</Control>
<!-- I have other elements here, a DirectoryList and a PathEdit, basically different approaches to selec the needed path..I did not add them because I don't think that they are relevant -->
</Dialog>
Problem is that..this is not working...when I try to set the value, what actually happens on the next dialog is that I get the value "JREPATH" instead of what the person doing the install selects...ex instead of C:blsa blajava
How can I fix this ? Any suggestions ?...The best approach if possible would be to store the value from the DirectoryCombo when Ok is pressed...not sure how doable is that..
Thanks a lot!
wix
wix
asked Nov 15 '18 at 14:10
TeshteTeshte
3921523
3921523
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
<Publish Property='SelectJreFolderDialog_Property' Value='JREPATH'><![CDATA[1]]></Publish>
You need to set Value to [JREPATH], like this:
<Publish Property='SelectJreFolderDialog_Property' Value='[JREPATH]'><![CDATA[1]]></Publish>
add a comment |
The issue was fixed by deleting the line:
<Publish Property='SelectJreFolder_Property' Value= '[SelectJreFolderDialog_Property]' ><![CDATA[1]]></Publish>
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53321319%2fwix-storing-a-path-in-a-property%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
<Publish Property='SelectJreFolderDialog_Property' Value='JREPATH'><![CDATA[1]]></Publish>
You need to set Value to [JREPATH], like this:
<Publish Property='SelectJreFolderDialog_Property' Value='[JREPATH]'><![CDATA[1]]></Publish>
add a comment |
<Publish Property='SelectJreFolderDialog_Property' Value='JREPATH'><![CDATA[1]]></Publish>
You need to set Value to [JREPATH], like this:
<Publish Property='SelectJreFolderDialog_Property' Value='[JREPATH]'><![CDATA[1]]></Publish>
add a comment |
<Publish Property='SelectJreFolderDialog_Property' Value='JREPATH'><![CDATA[1]]></Publish>
You need to set Value to [JREPATH], like this:
<Publish Property='SelectJreFolderDialog_Property' Value='[JREPATH]'><![CDATA[1]]></Publish>
<Publish Property='SelectJreFolderDialog_Property' Value='JREPATH'><![CDATA[1]]></Publish>
You need to set Value to [JREPATH], like this:
<Publish Property='SelectJreFolderDialog_Property' Value='[JREPATH]'><![CDATA[1]]></Publish>
answered Nov 28 '18 at 11:42
kasperkasper
13115
13115
add a comment |
add a comment |
The issue was fixed by deleting the line:
<Publish Property='SelectJreFolder_Property' Value= '[SelectJreFolderDialog_Property]' ><![CDATA[1]]></Publish>
add a comment |
The issue was fixed by deleting the line:
<Publish Property='SelectJreFolder_Property' Value= '[SelectJreFolderDialog_Property]' ><![CDATA[1]]></Publish>
add a comment |
The issue was fixed by deleting the line:
<Publish Property='SelectJreFolder_Property' Value= '[SelectJreFolderDialog_Property]' ><![CDATA[1]]></Publish>
The issue was fixed by deleting the line:
<Publish Property='SelectJreFolder_Property' Value= '[SelectJreFolderDialog_Property]' ><![CDATA[1]]></Publish>
answered Nov 28 '18 at 13:48
TeshteTeshte
3921523
3921523
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53321319%2fwix-storing-a-path-in-a-property%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown