Re: using Context.Parameters["INSTALLDIR"],

From: David Guyer [MS] (davguy_at_online.microsoft.com)
Date: 03/25/04


Date: Thu, 25 Mar 2004 20:32:56 GMT

My guess is that the directory is missing or has too many \'s in it between
the path and filename...

To help debug this, you can put in the following line in your custom action:
        System.Diagnostics.Debugger.Launch

I often use a line like this when working with paths:
        If Not mypathstring.EndsWith("\") Then mypathstring &= "\"

Then, add on the filename.

---
David Guyer - VBQA Deployment Testing
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: "Senthil" <senthilv@5by5networks.com>
>References: <#tGUXvcAEHA.2112@TK2MSFTNGP11.phx.gbl> 
<#Ug4UBeAEHA.3048@tk2msftngp13.phx.gbl> 
<eZ5ZFjeAEHA.3316@TK2MSFTNGP11.phx.gbl> 
<#$C4rbfAEHA.2348@TK2MSFTNGP09.phx.gbl> 
<OMqHcifAEHA.1964@TK2MSFTNGP11.phx.gbl> 
<eTx6ypfAEHA.3308@TK2MSFTNGP10.phx.gbl> 
<U8dGYpiAEHA.604@cpmsftngxa06.phx.gbl> 
<OVkSOSoAEHA.640@TK2MSFTNGP09.phx.gbl>
>Subject: Re: using Context.Parameters["INSTALLDIR"], 
>Date: Fri, 5 Mar 2004 15:58:20 +0530
>Lines: 210
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.3790.0
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>Message-ID: <uEA0VypAEHA.2632@TK2MSFTNGP12.phx.gbl>
>Newsgroups: microsoft.public.dotnet.framework.setup
>NNTP-Posting-Host: 61.11.60.210
>Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
>Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.setup:7397
>X-Tomcat-NG: microsoft.public.dotnet.framework.setup
>
>hi  David, Neo
>thanks for the response..
>i am still struck up with an issue.
>see i am in a scenario like this :
>when i installl my windows service with the installer i am editing the
>Config file of the
>servcie.
>so for this purpose only i am taking the TARGETDIR>
>right now what i am facing is :
>
>i am using
>pathinfo = Path.Combine(this.Context.Parameters["TARGETDIR"],
>"xmledit1.exe.config");
>
>when i tun this setup , it says Systsm.IO  Error, file not found or one of
>the components r not found.
>
>my doubts are :
>
>1. when i use this.Context.Parameters["TARGETDIR"],  i will get the target
>directory which i select during the setup right ???
>
>2. also i am taking the xmledit1.exe.config file in that location.....so
>when the insaller runs will the  Service.Exe and config be created first
>???or will it check for the availablity of that file and then Install the
>EXE and COnfig.
>
>whats the sequence???
>
>pls do let me know , am in a urgent state to complate this
>
>help needed
>
>,,,,
>
>Senthil
>
>
>
>
>
>
>
>
>
>"Nico Debeuckelaere" <nicoNO@SPAMnd-sign.com> wrote in message
>news:OVkSOSoAEHA.640@TK2MSFTNGP09.phx.gbl...
>> To be curious ... what is that last backslash good for?
>>
>> "David Guyer [MS]" <davguy@online.microsoft.com> wrote in message
>> news:U8dGYpiAEHA.604@cpmsftngxa06.phx.gbl...
>> > /TARGETDIR="[TARGETDIR]\"  The back slash is very important in this
>case!
>> > :-)
>> >
>> >
>> > ---
>> > David Guyer - VBQA Deployment Testing
>> > This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>> > --------------------
>> > >From: "Nico Debeuckelaere" <nicoNO@SPAMnd-sign.com>
>> > >Subject: Re: using Context.Parameters["INSTALLDIR"],
>> > >
>> > >Senthil,
>> > >
>> > >As I just mentioned ... use TARGETDIR:
>> > >/TARGETDIR="[TARGETDIR]"
>> > >
>> > >Context.Parameters.Item("TARGETDIR")
>> > >
>> > >Regards,
>> > >
>> > >--
>> > >
>> > >Nico Debeuckelaere (MVP VB.NET)
>> > >
>> > >ND-Sign BVBA (Microsoft Certified Partner since 2004)
>> > >Pierstraat 135
>> > >B-2840 Rumst
>> > >URL: http://www.nd-sign.com
>> > >== ND-Sign, Designed for you ==
>> > >(This posting is provided "AS IS", with no warranties, and confers no
>> > >rights.)
>> > >
>> > >"Senthil" <senthilv@5by5networks.com> wrote in message
>> > >news:OMqHcifAEHA.1964@TK2MSFTNGP11.phx.gbl...
>> > >> hey nico , i javbe to deliver this stuff soon man, and i am struch 
up
>> > >> tooo...
>> > >> can yu let me asap???
>> > >> my email id is :
>> > >> senthilv@5by5networks.com
>> > >>
>> > >> oka....
>> > >>
>> > >> "Nico Debeuckelaere" <nicoNO@SPAMnd-sign.com> wrote in message
>> > >> news:#$C4rbfAEHA.2348@TK2MSFTNGP09.phx.gbl...
>> > >> > Hi Senthil,
>> > >> >
>> > >> > I have nothing to check now but can you try for the variable
>> TARGETDIR
>> > >or
>> > >> > something?
>> > >> >
>> > >> > Regards,
>> > >> >
>> > >> > --
>> > >> >
>> > >> > Nico Debeuckelaere (MVP VB.NET)
>> > >> >
>> > >> > ND-Sign BVBA (Microsoft Certified Partner since 2004)
>> > >> > Pierstraat 135
>> > >> > B-2840 Rumst
>> > >> > URL: http://www.nd-sign.com
>> > >> > == ND-Sign, Designed for you ==
>> > >> > (This posting is provided "AS IS", with no warranties, and confers
>no
>> > >> > rights.)
>> > >> >
>> > >> >
>> > >> > "Senthil" <senthilv@5by5networks.com> wrote in message
>> > >> > news:eZ5ZFjeAEHA.3316@TK2MSFTNGP11.phx.gbl...
>> > >> > > hi nico
>> > >> > > very much thanks for yur response..
>> > >> > >
>> > >> > > i did teh way yu said...
>> > >> > > for my surprise i happen to see that
>> > >> > > 1. as i am running my setup i am selecting a path where i need 
to
>> > >> install.
>> > >> > > but the path1 i saw as:D:\WINDOWS\system32
>> > >> > > why is the installer takkng this path as the path of 
INSTALLDIR??
>> > >> > > why not its taking my path which i giving in the installer ???
>> > >> > > help needed
>> > >> > > ,,,,,
>> > >> > > Senthil
>> > >> > >
>> > >> > > "Nico Debeuckelaere" <nicoNO@SPAMnd-sign.com> wrote in message
>> > >> > > news:#Ug4UBeAEHA.3048@tk2msftngp13.phx.gbl...
>> > >> > > > In your Setup project, press the Custom Actions button.
>> > >> > > > Here you will find all your actions to be perform during
>> > >installation,
>> > >> > > > uninstallation etc.
>> > >> > > > If you select the action to install your application and look
>at
>> > the
>> > >> > > > properties of it you can see the following property:
>> > >> > > > CustomActionData
>> > >> > > > Here you type:/INSTALLDIR="[INSTALLDIR]"
>> > >> > > > In your installer class you can get the parameter:
>> > >> > > > Context.Parameters.Item("INSTALLDIR")
>> > >> > > >
>> > >> > > > Regards,
>> > >> > > >
>> > >> > > > --
>> > >> > > >
>> > >> > > > Nico Debeuckelaere (MVP VB.NET)
>> > >> > > >
>> > >> > > > ND-Sign BVBA (Microsoft Certified Partner since 2004)
>> > >> > > > Pierstraat 135
>> > >> > > > B-2840 Rumst
>> > >> > > > URL: http://www.nd-sign.com
>> > >> > > > == ND-Sign, Designed for you ==
>> > >> > > >
>> > >> > > > "Senthil" <senthilv@5by5networks.com> wrote in message
>> > >> > > > news:#tGUXvcAEHA.2112@TK2MSFTNGP11.phx.gbl...
>> > >> > > > > hi all
>> > >> > > > >
>> > >> > > > > i am creating an installer project to install my 
application.
>> > >> > > > >
>> > >> > > > > my application has got a few data which r needed to be 
edited
>> at
>> > >run
>> > >> > > time
>> > >> > > > > ...getting the user input and editing the config file.
>> > >> > > > >
>> > >> > > > > so i am using
>> > >> > > > >
>> > >> > > > > Path.Combine(this.Context.Parameters["INSTALLDIR"],
>> > >> > > "xmledit.exe.config");
>> > >> > > > >
>> > >> > > > > for getting the path where the installer installs my
>> application
>> > >is
>> > >> > > > > installed..
>> > >> > > > >
>> > >> > > > > i am getting error like VAlue cannot be null :path1
>> > >> > > > >
>> > >> > > > > Help needed in solving this
>> > >> > > > >
>> > >> > > > > ,,,
>> > >> > > > >
>> > >> > > > > Senthil
>> > >> > > > >
>> > >> > > > >
>> > >> > > >
>> > >> > > >
>> > >> > >
>> > >> > >
>> > >> >
>> > >> >
>> > >>
>> > >>
>> > >
>> > >
>> > >
>> >
>>
>>
>
>
>

Loading