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.100%29.aspx
http://msdn.microsoft.com/en-us/library/6bf6fwxe%28VS.100%29.aspx