more deployment advice please

D

Doug

Hi

I am ready to deploy my app to some testers who have agreed to do some beta
testing.

I have some questions that I would like some advice on please.

Some of the people who will use my application will be on 'partially locked
down networks', ie. their program files folder will be read only. They
would need to get system administrators to allow them to install it or go
through a change management process to load this application. I would like
to allow users to deploy to their 'application data' folder and run the app
from there. I know that this will mean that the application would only be
available to the log in of the user who installed the application.

If I make any locational references to external files in my code 'hard
coded' then the ability for users to choose an alternative location would be
diminished. What is the best way to make references 'relative' for example
if i have .... location = "c:\\documents and settings\\"+user+\\Application
data\\MyApp.chm, if i make that to read location ="MyApp.chm" that should be
OK for the reference, but how do i include those relative locations in my
setup and deployment project?

I have thought about using an xml file that would contain the location that
the application was written to, and use that for location references, but
how do i create that file at deployment time? Is this possible by coding in
the setup project part?

Could someone please let me know the best way forward for this - or am i
looking at this in the wrong way?

Doug
 
M

Michael Nemtsev

Hello Doug,

Why not to refer to the other files from the app directory, and don't use
the full path?

---
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

D> \\MyApp.chm,
D>
 
R

Rick C

Doug said:
If I make any locational references to external files in my code 'hard
coded' then the ability for users to choose an alternative location would
be diminished. What is the best way to make references 'relative' for
example if i have .... location = "c:\\documents and
settings\\"+user+\\Application data\\MyApp.chm, if i make that to read
location ="MyApp.chm" that should be OK for the reference, but how do i
include those relative locations in my setup and deployment project?


If you are going to put things in specific places, don't hard-code the
location, use System.Environment and System.Environment.SpecialFolder.

location = Environment.GetFolderPath( SpecialFolder.Applicationdata ) +
@"\MyApp.chm";

Give them that as a default and let them pick a different location, which is
the typical behavior for an installer.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top