/build/static/layout/Breadcrumb_cap_w.png

Change INSTALLDIR in Execute sequence

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

Answers (9)

Posted by: nheim 16 years ago
10th Degree Black Belt
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
Posted by: Inabus 16 years ago
Second Degree Green Belt
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
Posted by: Eswari 16 years ago
Orange Belt
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................
Posted by: anonymous_9363 16 years ago
Red Belt
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.
Posted by: blacklisted_packager 16 years ago
Orange Belt
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.
Posted by: Eswari 16 years ago
Orange Belt
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.
Posted by: Inabus 16 years ago
Second Degree Green Belt
0
That way is fine and the way I would of used to resolve the problem.

P
Posted by: blacklisted_packager 16 years ago
Orange Belt
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 ?
Posted by: anonymous_9363 16 years ago
Red Belt
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.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ