This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Easy question. How I can modify INSTALLDIR in my project
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 30, 2012
10:11 AM
Easy question. How I can modify INSTALLDIR in my project
Hi, community.
Easy question. How I can modify "INSTALLDIR" from a dialog windows?
I have downloaded this example here:
http://community.flexerasoftware.com/showthread.php?t=201283
I added to the button "Next" (dialog "InstallWelcome") an additional action, "DoAction" = "DisplayINSTALLDIR"
But, unfortunately, the result is very strange. The MessageBox shows empty value.
So, I think I have some fundamental misunderstanding. Please, help me.
How does it possible to change "INSTALLDIR" value?
The project is attached...
Easy question. How I can modify "INSTALLDIR" from a dialog windows?
I have downloaded this example here:
http://community.flexerasoftware.com/showthread.php?t=201283
I added to the button "Next" (dialog "InstallWelcome") an additional action, "DoAction" = "DisplayINSTALLDIR"
function DisplayINSTALLDIR(hMSI)
STRING szInstDir;
STRING szInstDir2;
NUMBER nvCount;
INT result;
begin
nvCount = MAX_PATH;
MsiGetProperty(hMSI, "INSTALLDIR", szInstDir, nvCount);;
SprintfBox(INFORMATION, "INSTALLDIR", szInstDir);
szInstDir = "c:\\Projects";
result = MsiSetProperty(hMSI, "INSTALLDIR", szInstDir);
result = MsiGetProperty(hMSI, "INSTALLDIR", szInstDir2, nvCount);
SprintfBox(INFORMATION,"Deferred Execution", szInstDir2);
end;
But, unfortunately, the result is very strange. The MessageBox shows empty value.
So, I think I have some fundamental misunderstanding. Please, help me.
How does it possible to change "INSTALLDIR" value?
The project is attached...
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 30, 2012
10:53 AM
Some strange things. Now the ShowMessage shows right value.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 01, 2012
12:58 AM
Make sure to set nvcount before each call to to MsiGetProperty.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 01, 2012
08:05 AM
I think the problem was with the uncompiled script. It seems that you will debug the script very carefully, always compile it before debugging, because sometimes I saw the values of my constants that were modified before.