.NETGURU
Custom Action VB Script
Messages   Related Types
This message was discovered on microsoft.public.dotnet.framework.setup.

Post a new message to this list...

aro
Hi folks,

I am trying to read the installation path using a VB Script. In fact, I
can already do that easily by using the script and the
"CustomActionData" property. The problem I have is that this
CustomAction is supposed to run between InstallInitialize and
InstallFinalize in the InstallExecuteSequence table.

I need this script to run before InstallInitialize. Anything later than
that is simply too late for me(the changes that I make to the .msi are
ignored). If I change the sequence and put it before InstallInitialize I
get an error.

Does anyone know how I could get the installation path before
InstallInitialize runs ? Please help. Thanks.
Reply to this message...
 
    
Phil Wilson
You'd need to make it an immediate custom action instead of deferred (take
1024, msidbCustomActionTypeInScript, out of the Type), then you can sequence
it early in the execute sequence, if that works for you. You won't need
CustomActionData if it's immediate, just use the TARGETDIR property.
--
Phil Wilson
[MVP Windows Installer]
Definitive Guide to Windows Installer
http://www.amazon.com/exec/obidos/tg/detail/-/1590592972/104-7044380-4696760

"aro" <Click here to reveal e-mail address> wrote in message
news:Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
    
Nick
Thanks Phil for taking your time and answering me.

I understand the part about not using deferred custom actions. I don't
have 1024 as a Type though. The .NET installer created automatically two
rows for my script in CustomAction, Type 51 and 5xx(something like this,
I don't have it here right now).

Now, I have another script, and I set it up with Orca (manually, not
through the .NET installer project) to a CustomAction Type 6(VB Script).
I can put it pretty much wherever I want in the InstallExecuteSequence
table and have it run in the beginning of the installation.

What I wasn't able to figure out was how to read the installation path
:-( I tried MsgBox ("TARGETDIR") and loads of other things which I
thought would return the path. I still couldn't find the right
parameters/syntax. When I read what you say I imagine it should be
fairly easy. Not for me, at least not yet...

I would really appreciate if you could shed a little bit more light on
this one. Thanks a lot
Reply to this message...
 
    
Phil Wilson
In a VBScript you need to say Msgbox (Property("TARGETDIR"))
--
Phil Wilson [MVP Windows Installer]
----
"Nick" <Click here to reveal e-mail address> wrote in message
news:uk$Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
    
aro
Thanks Phil.

Phil Wilson wrote:
> In a VBScript you need to say Msgbox (Property("TARGETDIR"))
Reply to this message...
 
    
aro
Thanks Phil for taking your time and answering me.

I understand the part about not using deferred custom actions. I don't
have 1024 as a Type though. The .NET installer created automatically two
rows for my script in CustomAction, Type 51 and 5xx(something like this,
I don't have it here right now).

Now, I have another script, and I set it up with Orca (manually, not
through the .NET installer project) to a CustomAction Type 6(VB Script).
I can put it pretty much wherever I want in the InstallExecuteSequence
table and have it run in the beginning of the installation.

What I wasn't able to figure out was how to read the installation path
:-( I tried MsgBox ("TARGETDIR") and loads of other things which I
thought would return the path. I still couldn't find the right
parameters/syntax. When I read what you say I imagine it should be
fairly easy. Not for me, at least not yet...

I would really appreciate if you could shed a little bit more light on
this one. Thanks a lot
Reply to this message...
 
 




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification