hi,

I need to change the INSTALLDIR run time.

Is there anyway to change the INSTALLDIR property in Execute sequence.

If so,can somebody can help how to do it.
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Hi Richard,
May i ask first of all what you are trying to achieve exactly?
It's not yes or no, but where in the sequence. It should be possible in front of the 'CostFinalize' sequence.
Regards, Nick
Answered 02/19/2008 by: nheim
Tenth Degree Black Belt

Please log in to comment
0
The question I would ask is why do you need to do this as having some background information generally helps people provide a clear and concise response to a query :)

P
Answered 02/19/2008 by: Inabus
Second Degree Green Belt

Please log in to comment
0
I want the following code to run in silent mode(Immediate mode/diferred).

Set objNetwork = WScript.CreateObject("WScript.Network")
strMname= objNetwork.ComputerName
Set objShell = WScript.CreateObject("WScript.Shell")
'msgbox strMname
strFolder="TestServer\test"
strPath= "\\" & strMname & strFolder
Msgbox strPath
Session.Property("INSTALLDIR")=strPath

It is working in UI sequence,but not in Execute sequence.
Can somebody help me out................
Answered 02/19/2008 by: Eswari
Orange Belt

Please log in to comment
0
How can it be working anywhere? If it's an embedded script, the 'WScript' directive will cause it to fail and, if it's in the Binary table or run as an external script (as an installed file), the 'Session' object doesn't exist.
Answered 02/19/2008 by: VBScab
Red Belt

Please log in to comment
0
Hi Eswari,

What VBScab wants to tell you is that you need to modify the script and use it as an embedded code

Set objNetwork = CreateObject("WScript.Network")
strMname= objNetwork.ComputerName
Set objShell = CreateObject("WScript.Shell")
'msgbox strMname
strFolder="TestServer\test"
strPath= "\\" & strMname & strFolder
Msgbox strPath
Session.Property("INSTALLDIR")=strPath

While calling Vbscript from embedded code Wscript.CreateObject() line wont work as msi will be using its own host engine.
Answered 02/19/2008 by: blacklisted_packager
Orange Belt

Please log in to comment
0
However i changed the first line
Set objNetwork = CreateObject("WScript.Network")
strMname= objNetwork.ComputerName
Set objShell = CreateObject("WScript.Shell")
'msgbox strMname
strFolder="TestServer\test"
strPath= "\\" & strMname & "\" & strFolder
Msgbox strPath
Session.Property("INSTALLDIR")=strPath

But still the error exist.

So i tried another way Set Property custom action which will run in immediate mode.Here i set the property value as \\[ComputerName]\Share\dir

This is working fine.But i am not sure is it best method to set the Installdir.Will it cause any prob when deploying it in live.
Answered 02/19/2008 by: Eswari
Orange Belt

Please log in to comment
0
That way is fine and the way I would of used to resolve the problem.

P
Answered 02/19/2008 by: Inabus
Second Degree Green Belt

Please log in to comment
0
Strange but it should work..
I hope you made the Custom Action Immediate and Initialized it before Cost Finalize.
Can you paste what error are you getting ?
Answered 02/19/2008 by: blacklisted_packager
Orange Belt

Please log in to comment
0
Don't forget that you need to take account of your deployment mechanism, too. If it uses the System account (as most do) it will not have access to the network, meaning that UNC paths will be invalid.If, however, your mechanism involves bodies using a suitably-permissioned account armed with a CD/DVD walking up to boxes, you'll have no such problem.
Answered 02/19/2008 by: VBScab
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity