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
- :
- I found the problem
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
‎Nov 08, 2010
10:21 AM
Session.Property - What am I doing wrong?
I have created a property in the Property Manager called "REPLACE_SCHEDULER_CONFIG" with an initial value of 0 (Zero).
In a deferred custom action scheduled for After InstallInitialize I run the following function:
What I am trying to do is set the value of "REPLACE_SCHEDULER_CONFIG" depending upon the what is in the current config file.
I have also tried unsuccesfully to read the value of
Session.Property("REPLACE_SCHEDULER_CONFIG")
in the deferred action. I have successfully read Session.ProductProperty("REPLACE_SCHEDULER_CONFIG") - but according to the documentation session.ProductProperty is read-only.
My goal is to use the value of REPLACE_SCHEDULER_CONFIG as a condition of putting a new configuration file on the users system.
Does anyone know what I am doing wrong - or how I could better accomplish this?
In a deferred custom action scheduled for After InstallInitialize I run the following function:
Function ReplaceConfig()
sConfigPath="e:\scheduler\system\config\scheduler.cfg"
sConfig = LCase(readFile(sConfigPath))
If Len(sConfig) > 0 then
If InStr(1, sConfig, "Scheduler Service 2.0") then
Session.Property("REPLACE_SCHEDULER_CONFIG") = 0
Else
Session.Property("REPLACE_SCHEDULER_CONFIG") = 1
End If
End if
ReplaceConfig = IDSUCCESS
End Function
What I am trying to do is set the value of "REPLACE_SCHEDULER_CONFIG" depending upon the what is in the current config file.
I have also tried unsuccesfully to read the value of
Session.Property("REPLACE_SCHEDULER_CONFIG")
in the deferred action. I have successfully read Session.ProductProperty("REPLACE_SCHEDULER_CONFIG") - but according to the documentation session.ProductProperty is read-only.
My goal is to use the value of REPLACE_SCHEDULER_CONFIG as a condition of putting a new configuration file on the users system.
Does anyone know what I am doing wrong - or how I could better accomplish this?
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 08, 2010
11:21 AM
As usual - after struggling for hours I post a question - and then figure it out. Harumph...
There appear to be numerous problems.
1. In order to access session.property I need Immediate Execution, not Deferred.
2. The value that I'm assigning to the session.property needs to be a string value: "1" not 1.
Now it appears to work.
There appear to be numerous problems.
1. In order to access session.property I need Immediate Execution, not Deferred.
2. The value that I'm assigning to the session.property needs to be a string value: "1" not 1.
Now it appears to work.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 09, 2010
12:33 AM
Using Session.Property to fetch Property values in a Deferred CA will not work. Only a few Installer properties are available in the deferred mode.
You need to look into CustomActionData. This provides us with a method to access custom properties during deferred mode.
You need to look into CustomActionData. This provides us with a method to access custom properties during deferred mode.