SOURCEDIR Property
Hi all,
Thanks for your support provided so far.
I 'm writing a vbscript in CallVBScriptFrom EmbeddedCode customaction to retrieve the value of SourceDir Property as
Srcprop=Session.Property("SourceDir")
But while trying to display it using msgbox, it returns an empty value. But if i try to retrieve the INSTALLDIR value it retrieves it.
I have mentioned this VBscript custom action before CostFinalize action.
Could any one help in this?
Thanks for your support provided so far.
I 'm writing a vbscript in CallVBScriptFrom EmbeddedCode customaction to retrieve the value of SourceDir Property as
Srcprop=Session.Property("SourceDir")
But while trying to display it using msgbox, it returns an empty value. But if i try to retrieve the INSTALLDIR value it retrieves it.
I have mentioned this VBscript custom action before CostFinalize action.
Could any one help in this?
0 Comments
[ + ] Show comments
Answers (11)
Please log in to answer
Posted by:
anonymous_9363
16 years ago
Where in the sequence are you running the script? Remember that CAs in the Execute Deferred sequence can only access a limited number of properties, one of which is INSTALLDIR. If you need the script to run in ED, you need to make use of teh special CustomActionData property. There's a lot of info here on using that property. As ever, use the 'Search' facility.
Why do you need to know where the MSI is stored, anyway? Just curious...
Why do you need to know where the MSI is stored, anyway? Just curious...
Posted by:
anonymous_9363
16 years ago
Hey, JB. I'm racking my brain trying to figure out how http://msdn2.microsoft.com/en-us/library/aa371232.aspx helps Bhuvan retrieve the actual MSI location...
Mayhap you could elucidate for us?
Mayhap you could elucidate for us?
Posted by:
Jamie B
16 years ago
Posted by:
anonymous_9363
16 years ago
Posted by:
Jamie B
16 years ago
Posted by:
nheim
16 years ago
Hi Bhuvan,
just make sure, you call your custom action after the "CostFinalize" action. This is the action, which populates all the directory properties.
And be aware, that "SourceDir" will not be resolved, on uninstalls.
Take a look at the log file and it will tell you all the answers, you need. :-)
If you, for some reason, need to reread the Sourcedir, you have to work with "ResolveResource", like Jamie pointed out. But this works only after the "CostInitialize" action.
Regards, Nick
just make sure, you call your custom action after the "CostFinalize" action. This is the action, which populates all the directory properties.
And be aware, that "SourceDir" will not be resolved, on uninstalls.
Take a look at the log file and it will tell you all the answers, you need. :-)
If you, for some reason, need to reread the Sourcedir, you have to work with "ResolveResource", like Jamie pointed out. But this works only after the "CostInitialize" action.
Regards, Nick
Posted by:
Jamie B
16 years ago
Posted by:
AngelD
16 years ago
ORIGINAL: Jamie B
SourceDir will be resolved on uninstall if the ResolveSource action is used, otherwise it wont.
Yes, but it's not executed by default meaning; you'll have to add yourself and sometimes added with a condition of "NOT Installed".
Follow Ian's "CustomActionData property" for deferred execution and Nick's advice should solve your issue during install.
Posted by:
jmcfadyen
16 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.