Bob,
If the person removes the EXE from the folder, then they have broken
your product, IMO. If they move the EXE, then I would expect the EXE to
look in its location to find the files, and fail because it can't find them.
The files are read-only, right? Not everyone will have access to the
Program Files directory for writing. If you need to write to these files,
then you might want to consider placing them in the application data
directory.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Bob" <bs********@yahoo.comwrote in message
news:78**********************************@d21g2000 prf.googlegroups.com...
On Feb 28, 10:07 am, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
>Bob,
Are you doing this in a setup project (for the application you are
trying to find the folder for) or are you trying to do this for ^any^
application.
--
- Nicholas Paldino [.NET/C# MVP]
- m...@spam.guard.caspershouse.com
"Bob" <bshumsk...@yahoo.comwrote in message
news:79**********************************@n77g200 0hse.googlegroups.com...
Hi,
How do you get the application folder path that a user select in a msi
install which defaults to c:\Program Files\Company Name\...?
Thanks,
Bob
In my setup (msi) I copy some files to the location that the user
specifies for the application folder. I need to access those files at
runtime. I am currently using
System.Windows.Forms.Application.StartupPath but I think this will
break if the user moves the exe.
Thanks,
Andrew