[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.setup

FileNotFoundException during Custom Action

Renjith

7/5/2006 4:10:00 PM

Hello

I have a C# Outlook Add-in (.NET 1.1, VS 2003) and I have added a
Installer class in which I want to copy one file from one media
directory (SOURCEDIR) to installation directory (TARGETDIR). For this I
have added the CustomActionData with /src=[SOURCEDIR] /dst=[TARGETDIR].
But when I run the installation it fails with FileNotFoundException.

One of the existing posts mentions that the CustomActionData gets in
between the /LogFile option and this causes the problem. But I was
unable to get the solution for this.

Please help

Regards
Renjith

5 Answers

Phil Wilson

7/5/2006 5:16:00 PM

0

Note that folder properties require quotes as described here:
http://msdn2.microsoft.com/en-us/library/2w2...

and since property names are case-sensitive you probably need to use
SourceDir
--
Phil Wilson [MVP Windows Installer]
----
"Renjith" <v.renjith@gmail.com> wrote in message
news:1152115791.664125.42340@m73g2000cwd.googlegroups.com...
> Hello
>
> I have a C# Outlook Add-in (.NET 1.1, VS 2003) and I have added a
> Installer class in which I want to copy one file from one media
> directory (SOURCEDIR) to installation directory (TARGETDIR). For this I
> have added the CustomActionData with /src=[SOURCEDIR] /dst=[TARGETDIR].
> But when I run the installation it fails with FileNotFoundException.
>
> One of the existing posts mentions that the CustomActionData gets in
> between the /LogFile option and this causes the problem. But I was
> unable to get the solution for this.
>
> Please help
>
> Regards
> Renjith
>


Renjith

7/6/2006 2:20:00 AM

0

Thanks Phil
Now I am able to access the property. I gave /name="[SourceDir]\". But
after that it still gives the exception FileNotFoundException

yours truly
renjith

Phil Wilson wrote:

> Note that folder properties require quotes as described here:
> http://msdn2.microsoft.com/en-us/library/2w2...
>
> and since property names are case-sensitive you probably need to use
> SourceDir
> --
> Phil Wilson [MVP Windows Installer]
> ----
> "Renjith" <v.renjith@gmail.com> wrote in message
> news:1152115791.664125.42340@m73g2000cwd.googlegroups.com...
> > Hello
> >
> > I have a C# Outlook Add-in (.NET 1.1, VS 2003) and I have added a
> > Installer class in which I want to copy one file from one media
> > directory (SOURCEDIR) to installation directory (TARGETDIR). For this I
> > have added the CustomActionData with /src=[SOURCEDIR] /dst=[TARGETDIR].
> > But when I run the installation it fails with FileNotFoundException.
> >
> > One of the existing posts mentions that the CustomActionData gets in
> > between the /LogFile option and this causes the problem. But I was
> > unable to get the solution for this.
> >
> > Please help
> >
> > Regards
> > Renjith
> >

Phil Wilson

7/6/2006 3:40:00 PM

0

You need those quotes on SourceDir and TARGETDIR because they are both
folder properties - I can't tell from your reply whether you did both or
not.
--
Phil Wilson
[Microsoft MVP-Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.ht...

"Renjith" <v.renjith@gmail.com> wrote in message
news:1152152412.827297.183660@b68g2000cwa.googlegroups.com...
> Thanks Phil
> Now I am able to access the property. I gave /name="[SourceDir]\". But
> after that it still gives the exception FileNotFoundException
>
> yours truly
> renjith
>
> Phil Wilson wrote:
>
>> Note that folder properties require quotes as described here:
>> http://msdn2.microsoft.com/en-us/library/2w2...
>>
>> and since property names are case-sensitive you probably need to use
>> SourceDir
>> --
>> Phil Wilson [MVP Windows Installer]
>> ----
>> "Renjith" <v.renjith@gmail.com> wrote in message
>> news:1152115791.664125.42340@m73g2000cwd.googlegroups.com...
>> > Hello
>> >
>> > I have a C# Outlook Add-in (.NET 1.1, VS 2003) and I have added a
>> > Installer class in which I want to copy one file from one media
>> > directory (SOURCEDIR) to installation directory (TARGETDIR). For this I
>> > have added the CustomActionData with /src=[SOURCEDIR] /dst=[TARGETDIR].
>> > But when I run the installation it fails with FileNotFoundException.
>> >
>> > One of the existing posts mentions that the CustomActionData gets in
>> > between the /LogFile option and this causes the problem. But I was
>> > unable to get the solution for this.
>> >
>> > Please help
>> >
>> > Regards
>> > Renjith
>> >
>


Renjith

7/7/2006 6:30:00 AM

0

Hi

I tried with just the [SourceDir] property and it is giving this error.


Also I have a few other observations
1. When I try a test variable, /testarg=Renjith, it works without any
problem.
2. When I create another sample add-in with a setup program, the
SourceDir also works without any problem.

Yours truly
Renjith V.

Phil Wilson wrote:
> You need those quotes on SourceDir and TARGETDIR because they are both
> folder properties - I can't tell from your reply whether you did both or
> not.
> --
> Phil Wilson
> [Microsoft MVP-Windows Installer]
> Definitive Guide to Windows Installer
> http://apress.com/book/bookDisplay.ht...
>
> "Renjith" <v.renjith@gmail.com> wrote in message
> news:1152152412.827297.183660@b68g2000cwa.googlegroups.com...
> > Thanks Phil
> > Now I am able to access the property. I gave /name="[SourceDir]\". But
> > after that it still gives the exception FileNotFoundException
> >
> > yours truly
> > renjith
> >
> > Phil Wilson wrote:
> >
> >> Note that folder properties require quotes as described here:
> >> http://msdn2.microsoft.com/en-us/library/2w2...
> >>
> >> and since property names are case-sensitive you probably need to use
> >> SourceDir
> >> --
> >> Phil Wilson [MVP Windows Installer]
> >> ----
> >> "Renjith" <v.renjith@gmail.com> wrote in message
> >> news:1152115791.664125.42340@m73g2000cwd.googlegroups.com...
> >> > Hello
> >> >
> >> > I have a C# Outlook Add-in (.NET 1.1, VS 2003) and I have added a
> >> > Installer class in which I want to copy one file from one media
> >> > directory (SOURCEDIR) to installation directory (TARGETDIR). For this I
> >> > have added the CustomActionData with /src=[SOURCEDIR] /dst=[TARGETDIR].
> >> > But when I run the installation it fails with FileNotFoundException.
> >> >
> >> > One of the existing posts mentions that the CustomActionData gets in
> >> > between the /LogFile option and this causes the problem. But I was
> >> > unable to get the solution for this.
> >> >
> >> > Please help
> >> >
> >> > Regards
> >> > Renjith
> >> >
> >

Phil Wilson

7/7/2006 6:07:00 PM

0

We seem to be going around in circles here. You have to quote folder
properties as described at that link, that's just the way it works, and
SourceDir and TARGETDIR are both folder properties so both need that quoted
syntax. Your example 1 isn't a folder property so it doesn't need quotes. We
can't move ahead with your original posted issue about /src=[SOURCEDIR]
/dst=[TARGETDIR] until you've used the required quoted syntax with both of
those properties as well as spelt SourceDir properly. You may well still
have an issue, but we can't get to it until you're using the correct syntax.

The reason for quoting perties is to deal with embedded slashes and
generally allow the InstallUtilLib and Installer class code to parse the
CustomActionData string and turn it into keys and values in the Context
property of your Installer class. If the string says /arg=D:/MyFolder there
has to be some way for the parser to know that arg is a key value and
MyFolder isn't.
--
Phil Wilson [MVP Windows Installer]
----
"Renjith" <v.renjith@gmail.com> wrote in message
news:1152253793.830686.61670@s16g2000cws.googlegroups.com...
> Hi
>
> I tried with just the [SourceDir] property and it is giving this error.
>
>
> Also I have a few other observations
> 1. When I try a test variable, /testarg=Renjith, it works without any
> problem.
> 2. When I create another sample add-in with a setup program, the
> SourceDir also works without any problem.
>
> Yours truly
> Renjith V.
>
> Phil Wilson wrote:
>> You need those quotes on SourceDir and TARGETDIR because they are both
>> folder properties - I can't tell from your reply whether you did both or
>> not.
>> --
>> Phil Wilson
>> [Microsoft MVP-Windows Installer]
>> Definitive Guide to Windows Installer
>> http://apress.com/book/bookDisplay.ht...
>>
>> "Renjith" <v.renjith@gmail.com> wrote in message
>> news:1152152412.827297.183660@b68g2000cwa.googlegroups.com...
>> > Thanks Phil
>> > Now I am able to access the property. I gave /name="[SourceDir]\". But
>> > after that it still gives the exception FileNotFoundException
>> >
>> > yours truly
>> > renjith
>> >
>> > Phil Wilson wrote:
>> >
>> >> Note that folder properties require quotes as described here:
>> >> http://msdn2.microsoft.com/en-us/library/2w2...
>> >>
>> >> and since property names are case-sensitive you probably need to use
>> >> SourceDir
>> >> --
>> >> Phil Wilson [MVP Windows Installer]
>> >> ----
>> >> "Renjith" <v.renjith@gmail.com> wrote in message
>> >> news:1152115791.664125.42340@m73g2000cwd.googlegroups.com...
>> >> > Hello
>> >> >
>> >> > I have a C# Outlook Add-in (.NET 1.1, VS 2003) and I have added a
>> >> > Installer class in which I want to copy one file from one media
>> >> > directory (SOURCEDIR) to installation directory (TARGETDIR). For
>> >> > this I
>> >> > have added the CustomActionData with /src=[SOURCEDIR]
>> >> > /dst=[TARGETDIR].
>> >> > But when I run the installation it fails with FileNotFoundException.
>> >> >
>> >> > One of the existing posts mentions that the CustomActionData gets in
>> >> > between the /LogFile option and this causes the problem. But I was
>> >> > unable to get the solution for this.
>> >> >
>> >> > Please help
>> >> >
>> >> > Regards
>> >> > Renjith
>> >> >
>> >
>