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
- :
- Loosing PROPERTY value during install - Basic MSI 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 03, 2008
04:33 AM
Loosing PROPERTY value during install - Basic MSI Project
Hi,
I have a CA that I run in InstallWellcome dialog where I set a property:
function FindPaths(hWND)
..
begin
appPath = RegDBGetInstallPath("My Aplication");
MsiSetProperty(hWND,"APPPATH",appPath);
end;
Here the property is set with the correct value.
Also during other custom dialog I set some other Property based on the existence of APPPATH property.
But I have another CA which regulates my ini file, set in exec UI sequence after WriteIni, Deffered Exec in Syst Context and there:
function RegulateIniFile(hWND)
...
begin
MsiGetProperty(hWND,"APPPATH",appPath2, size);
end;
Here appPath2 variable is empty.
Why and where does my PROPERTY looses its value ?
Thanks,
Bianca
I have a CA that I run in InstallWellcome dialog where I set a property:
function FindPaths(hWND)
..
begin
appPath = RegDBGetInstallPath("My Aplication");
MsiSetProperty(hWND,"APPPATH",appPath);
end;
Here the property is set with the correct value.
Also during other custom dialog I set some other Property based on the existence of APPPATH property.
But I have another CA which regulates my ini file, set in exec UI sequence after WriteIni, Deffered Exec in Syst Context and there:
function RegulateIniFile(hWND)
...
begin
MsiGetProperty(hWND,"APPPATH",appPath2, size);
end;
Here appPath2 variable is empty.
Why and where does my PROPERTY looses its value ?
Thanks,
Bianca
(8) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 03, 2008
05:06 AM
You can read this document for in-depth information: http://www.macrovision.com/webdocuments/PDF/CustomActionData.pdf?link_id=productsTipsTricks
The idea is to define your property(APPPATH) in the customactiondata property in the property table. Your property will be accessible during deferred execution...
The idea is to define your property(APPPATH) in the customactiondata property in the property table. Your property will be accessible during deferred execution...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 03, 2008
06:52 AM
Christoph wrote:
You can read this document for in-depth information: http://www.macrovision.com/webdocuments/PDF/CustomActionData.pdf?link_id=productsTipsTricks
The idea is to define your property(APPPATH) in the customactiondata property in the property table. Your property will be accessible during deferred execution...
Hi Christopf,
In the property table i have APPPATH with empty value. Isn't that enough ?
I mention that this is an IS11.5 basic msi project upgraded to IS2008. I didn't had this issue before.
In the IS11.5 project I was using ISMSI_HANDLE instead of hWND but I read that ISMSI_HANDLE is not supported in Basic MSI projects, and is not supported in InstallScript custom actions so I changed it to hWND.
Bianca
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 03, 2008
07:02 AM
Hi Bianca,
no... adding the APPPATH property in the property table is not enough.
You need to add it to the 'CustomActionData' property.
Open the installshield help library and click on the search tab, do a search for 'customactiondata'. You will find all the information and examples there.
Good luck...
Christoph.
no... adding the APPPATH property in the property table is not enough.
You need to add it to the 'CustomActionData' property.
Open the installshield help library and click on the search tab, do a search for 'customactiondata'. You will find all the information and examples there.
Good luck...
Christoph.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 03, 2008
08:22 AM
I guess you wished me good luck because you knew I would be back with questions 🙂
I added Custom Action - New Set Property - APPPATH
Property Name: RegulateIniFile
Property Value: [APPPATH]
Install Exec Sequence: After WriteIniValues
As a reminder RegulateIniFile() is my deffered CA. I set my APPPATH at the beging of the installation (I read the InstallPath from the registry through a CA immediat execution named FindPath() ), and I need to use its value in this deffered CA.
What more must I do ? In the forum we keep getting to some pdfs but there is no real example (with a custom property, not just INSTALLDIR and SUPPORTDIR).
Please advise.
Thanks
Bianca
I added Custom Action - New Set Property - APPPATH
Property Name: RegulateIniFile
Property Value: [APPPATH]
Install Exec Sequence: After WriteIniValues
As a reminder RegulateIniFile() is my deffered CA. I set my APPPATH at the beging of the installation (I read the InstallPath from the registry through a CA immediat execution named FindPath() ), and I need to use its value in this deffered CA.
What more must I do ? In the forum we keep getting to some pdfs but there is no real example (with a custom property, not just INSTALLDIR and SUPPORTDIR).
Please advise.
Thanks
Bianca
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 04, 2008
01:58 AM
Hi Bianca,
no problem 🙂
As I understand you correctly, your APPPATH property gets a value out of the registry in the beginning of the installation. Correct? If so, why do you use a seperate custom action to achieve this. Why not just define a systemsearch that fills your property APPPATH.
The next thing to do is defining your custom action(type 51) as described in the PDF and as you already described in your previous post. Schedule this CA in the UISequence.
Now you should be able to read out your property in your deferred custom action. To test this... you can write a little installscript custom action that you schedule as deferred and where you print the APPPATH property...
Regards,
Christoph
no problem 🙂
As I understand you correctly, your APPPATH property gets a value out of the registry in the beginning of the installation. Correct? If so, why do you use a seperate custom action to achieve this. Why not just define a systemsearch that fills your property APPPATH.
The next thing to do is defining your custom action(type 51) as described in the PDF and as you already described in your previous post. Schedule this CA in the UISequence.
Now you should be able to read out your property in your deferred custom action. To test this... you can write a little installscript custom action that you schedule as deferred and where you print the APPPATH property...
Regards,
Christoph
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 04, 2008
02:15 AM
Christoph wrote:
Hi Bianca,
no problem 🙂
As I understand you correctly, your APPPATH property gets a value out of the registry in the beginning of the installation. Correct? If so, why do you use a seperate custom action to achieve this. Why not just define a systemsearch that fills your property APPPATH.
The next thing to do is defining your custom action(type 51) as described in the PDF and as you already described in your previous post. Schedule this CA in the UISequence.
Now you should be able to read out your property in your deferred custom action. To test this... you can write a little installscript custom action that you schedule as deferred and where you print the APPPATH property...
Regards,
Christoph
Hi Christoph,
1. My APPPATH property is set in a CA (Immediate Execution) run at the begining of the installation. - This is ok ?
2. I added a custom action deffered in syst context: RegulateIniFile () in which I need to use the APPPATH property. Install Exec Seq After GetAPPPATH (set below)
3. I added Custom Action - New Set Property - GetAPPPATH
Property Name: RegulateIniFile
Property Value: [APPPATH]
Install Exec Sequence: After WriteIniValues
In the RegulateIniFile() I do:
MsiGetProperty(hMSI, "CustomAction", appPath2, size);
MessageBox(appPath2,INFORMATION);
appPath2 is empty 😞
Is there something else ?
Bianca
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 04, 2008
02:28 AM
Hi Christoph,
Some how I managed to get a correct value 🙂
I Changed the size = MAX_PATH in MsiGetProperty(hMSI, "CustomAction", appPath2, size);
No I will move on ... and dig a little because in my deffered CA I need about 5 property's.
Thanks a lot for your pacience.
Bianca
Some how I managed to get a correct value 🙂
I Changed the size = MAX_PATH in MsiGetProperty(hMSI, "CustomAction", appPath2, size);
No I will move on ... and dig a little because in my deffered CA I need about 5 property's.
Thanks a lot for your pacience.
Bianca
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 04, 2008
03:32 AM
Glad to hear that you found it... 😉
Also... like I told you... to initially fill the APPPATH property, there is no need to define a seperate custom action. Just define a systemsearch...
Christoph.
Also... like I told you... to initially fill the APPPATH property, there is no need to define a seperate custom action. Just define a systemsearch...
Christoph.
