[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

microsoft.public.dotnet.framework.setup

custom action on windows 7 64 bit

pulu

4/8/2010 10:48:00 AM

Hi,

i'm using msi in visual studio 2005.

i added a custom action that runs a c# console application that moves
files from %programfiles% to %programdata%.

when running this msi on windows 7 64 bit i get a pop - up message of
error code 2689.

AFIK msi is run with administrator privileges, does it include also
the custom actions?

Thanks,

pulu
5 Answers

jacky kwok

4/9/2010 2:38:00 AM

0

On 8/4/2010 PM 6:48, pulu wrote:
> Hi,
>
> i'm using msi in visual studio 2005.
>
> i added a custom action that runs a c# console application that moves
> files from %programfiles% to %programdata%.
>
> when running this msi on windows 7 64 bit i get a pop - up message of
> error code 2689.
>
> AFIK msi is run with administrator privileges, does it include also
> the custom actions?
>
> Thanks,
>
> pulu


Are you sure your "c# console application" work when running in
normal(i.e. not in installer custom actions).

A point you need to note is that there are 2 "Program Files" folder in
64bit OS.
One is for 64bit apps "Program Files", one is for 32 bit apps "Program
Files (x86)".
By default, VS2005 installer project creates a 32bit target installer,
the default app installer path is in "Program Files (x86)" in 64 bit OS
except you change it manually.

While, if your "c# console application" is a pure dotnet2 executable
app, it will run as a 64bit app in 64bit windowOS. Then, in its 64bit
app viewpoint , %programfiles% == "Program Files".

Hence, if your apps is installed in "Program Files (x86)",
your "c# console application" will use a non-exist path.



pulu

4/11/2010 8:28:00 AM

0

On Apr 9, 5:38 am, jacky kwok <ja...@nospam.nospam> wrote:
> On 8/4/2010 PM 6:48, pulu wrote:
>
>
>
> > Hi,
>
> > i'm using msi in visual studio 2005.
>
> > i added a custom action that runs a c# console application that moves
> > files from %programfiles% to %programdata%.
>
> > when running this msi on windows 7 64 bit i get a pop - up message of
> > error code 2689.
>
> > AFIK msi is run with administrator privileges, does it include also
> > the custom actions?
>
> > Thanks,
>
> > pulu
>
> Are you sure your "c# console application" work when running in
> normal(i.e. not in installer custom actions).
>
> A point you need to note is that there are 2 "Program Files" folder in
> 64bit OS.
> One is for 64bit apps "Program Files", one is for 32 bit apps "Program
> Files (x86)".
> By default, VS2005 installer project creates a 32bit target installer,
> the default app installer path is in "Program Files (x86)" in 64 bit OS
> except you change it manually.
>
> While, if your "c# console application" is a pure dotnet2 executable
> app, it will run as a 64bit app in 64bit windowOS. Then, in its 64bit
> app viewpoint , %programfiles% == "Program Files".
>
> Hence, if your apps is installed in "Program Files (x86)",
> your "c# console application" will use a non-exist path.

Hi,

Thanks for answering.

the msi copies the executable to the target location under normal
%program files% (not x86),

and when double clicking it runs successfully while the msi didn't ran
it at all.

when i add a condition 1=1 in the custom action i get the error code
and the installation rolls back.

i would appreciate any help.

Jacky Kwok

4/11/2010 1:14:00 PM

0

On 11/4/2010 PM 4:28, pulu wrote:
> On Apr 9, 5:38 am, jacky kwok<ja...@nospam.nospam> wrote:
>> On 8/4/2010 PM 6:48, pulu wrote:
>>
>>
>>
>>> Hi,
>>
>>> i'm using msi in visual studio 2005.
>>
>>> i added a custom action that runs a c# console application that moves
>>> files from %programfiles% to %programdata%.
>>
>>> when running this msi on windows 7 64 bit i get a pop - up message of
>>> error code 2689.
>>
>>> AFIK msi is run with administrator privileges, does it include also
>>> the custom actions?
>>
>>> Thanks,
>>
>>> pulu
>>
>> Are you sure your "c# console application" work when running in
>> normal(i.e. not in installer custom actions).
>>
>> A point you need to note is that there are 2 "Program Files" folder in
>> 64bit OS.
>> One is for 64bit apps "Program Files", one is for 32 bit apps "Program
>> Files (x86)".
>> By default, VS2005 installer project creates a 32bit target installer,
>> the default app installer path is in "Program Files (x86)" in 64 bit OS
>> except you change it manually.
>>
>> While, if your "c# console application" is a pure dotnet2 executable
>> app, it will run as a 64bit app in 64bit windowOS. Then, in its 64bit
>> app viewpoint , %programfiles% == "Program Files".
>>
>> Hence, if your apps is installed in "Program Files (x86)",
>> your "c# console application" will use a non-exist path.
>
> Hi,
>
> Thanks for answering.
>
> the msi copies the executable to the target location under normal
> %program files% (not x86),
>
> and when double clicking it runs successfully while the msi didn't ran
> it at all.
>
> when i add a condition 1=1 in the custom action i get the error code
> and the installation rolls back.
>
> i would appreciate any help.


Then, the last thing, I can think about is
did you set your CustomAction is NOT an "Installer Class".
For an executable file CustomAction, "Installer Class" should be set
"Installer Class" to FALSE (default is TRUE).


pulu

4/12/2010 7:53:00 AM

0

On Apr 11, 4:14 pm, Jacky Kwok <ja...@hkcompose.com> wrote:
> On 11/4/2010 PM 4:28, pulu wrote:
>
>
>
>
>
> > On Apr 9, 5:38 am, jacky kwok<ja...@nospam.nospam>  wrote:
> >> On 8/4/2010 PM 6:48, pulu wrote:
>
> >>> Hi,
>
> >>> i'm using msi in visual studio 2005.
>
> >>> i added a custom action that runs a c# console application that moves
> >>> files from %programfiles% to %programdata%.
>
> >>> when running this msi on windows 7 64 bit i get a pop - up message of
> >>> error code 2689.
>
> >>> AFIK msi is run with administrator privileges, does it include also
> >>> the custom actions?
>
> >>> Thanks,
>
> >>> pulu
>
> >> Are you sure your "c# console application" work when running in
> >> normal(i.e. not in installer custom actions).
>
> >> A point you need to note is that there are 2 "Program Files" folder in
> >> 64bit OS.
> >> One is for 64bit apps "Program Files", one is for 32 bit apps "Program
> >> Files (x86)".
> >> By default, VS2005 installer project creates a 32bit target installer,
> >> the default app installer path is in "Program Files (x86)" in 64 bit OS
> >> except you change it manually.
>
> >> While, if your "c# console application" is a pure dotnet2 executable
> >> app, it will run as a 64bit app in 64bit windowOS. Then, in its 64bit
> >> app viewpoint , %programfiles% == "Program Files".
>
> >> Hence, if your apps is installed in "Program Files (x86)",
> >> your "c# console application" will use a non-exist path.
>
> > Hi,
>
> > Thanks for answering.
>
> > the msi copies the executable to the target location under normal
> > %program files% (not x86),
>
> > and when double clicking it runs successfully while the msi didn't ran
> > it at all.
>
> > when i add a condition 1=1 in the custom action i get the error code
> > and the installation rolls back.
>
> > i would appreciate any help.
>
> Then, the last thing, I can think about is
> did you set your CustomAction is NOT an "Installer Class".
> For an executable file CustomAction, "Installer Class" should be set
> "Installer Class" to FALSE (default is TRUE).

Hi,

Thanks again for the help.

it actually did the trick.

can you please maybe explain what exactly is the installer class
property?

jacky kwok

4/13/2010 1:50:00 AM

0

On 12/4/2010 PM 3:53, pulu wrote:
> On Apr 11, 4:14 pm, Jacky Kwok<ja...@hkcompose.com> wrote:
>> On 11/4/2010 PM 4:28, pulu wrote:
>>
>>
>>
>>
>>
>>> On Apr 9, 5:38 am, jacky kwok<ja...@nospam.nospam> wrote:
>>>> On 8/4/2010 PM 6:48, pulu wrote:
>>
>>>>> Hi,
>>
>>>>> i'm using msi in visual studio 2005.
>>
>>>>> i added a custom action that runs a c# console application that moves
>>>>> files from %programfiles% to %programdata%.
>>
>>>>> when running this msi on windows 7 64 bit i get a pop - up message of
>>>>> error code 2689.
>>
>>>>> AFIK msi is run with administrator privileges, does it include also
>>>>> the custom actions?
>>
>>>>> Thanks,
>>
>>>>> pulu
>>
>>>> Are you sure your "c# console application" work when running in
>>>> normal(i.e. not in installer custom actions).
>>
>>>> A point you need to note is that there are 2 "Program Files" folder in
>>>> 64bit OS.
>>>> One is for 64bit apps "Program Files", one is for 32 bit apps "Program
>>>> Files (x86)".
>>>> By default, VS2005 installer project creates a 32bit target installer,
>>>> the default app installer path is in "Program Files (x86)" in 64 bit OS
>>>> except you change it manually.
>>
>>>> While, if your "c# console application" is a pure dotnet2 executable
>>>> app, it will run as a 64bit app in 64bit windowOS. Then, in its 64bit
>>>> app viewpoint , %programfiles% == "Program Files".
>>
>>>> Hence, if your apps is installed in "Program Files (x86)",
>>>> your "c# console application" will use a non-exist path.
>>
>>> Hi,
>>
>>> Thanks for answering.
>>
>>> the msi copies the executable to the target location under normal
>>> %program files% (not x86),
>>
>>> and when double clicking it runs successfully while the msi didn't ran
>>> it at all.
>>
>>> when i add a condition 1=1 in the custom action i get the error code
>>> and the installation rolls back.
>>
>>> i would appreciate any help.
>>
>> Then, the last thing, I can think about is
>> did you set your CustomAction is NOT an "Installer Class".
>> For an executable file CustomAction, "Installer Class" should be set
>> "Installer Class" to FALSE (default is TRUE).
>
> Hi,
>
> Thanks again for the help.
>
> it actually did the trick.
>
> can you please maybe explain what exactly is the installer class
> property?

refer MSDN, search "Installer Class".
e.g.
http://msdn.microsoft.com/en-us/library/d9k65z2d%28VS.1...
http://msdn.microsoft.com/en-us/library/6bf6fwxe%28VS.1...