Can anyone help with problems deploying applications? - TechRepublic
Question
April 15, 2008 at 03:04 PM
eladkatz

Can anyone help with problems deploying applications?

by eladkatz . Updated 18 years, 3 months ago

Hi all, first time poster so i apologize in advance if my question is malformed or simply stupid, that being said, let me get on to the question itself:
I have create an application that is a context menu on folders that uses a text file in order to check if any of the words in it, appear in the folder name (I’m obviously simplifying it in order to make the question more focused).
My problem is that the file should be read every time that the application is run and it looks for it in the folder that hosts the folder I’m looking at with the context menu (for example: if I’m right clicking “c:\program files\visual studio 2008” it looks for the file at “c:\program files”)
I’ve tried deploying it using the publish wizard in the visual studio and other methods i saw in the site (iexpress for example) but i couldnt tell the application that it will be installed to c:\program files\app for example and that it should look for the file there.
this is the code that reads the config file:
static string[] readConfigFile(string fileLocation)
{
return System.IO.File.ReadAllLines(configFileName);

}
where configFileName = “config.txt” – no path really, i’ve tried using “.\config.txt” and other methods to no avail – the only way to make it work is to have it read the file from a fixed location and copying it there myself – but that makes no sense since i can’t ask the person who installs it to copy one file there and the other someplace else etc…
what i need is a way to tell the application to look for the file only where the application itself resides or better yet – a way to make an installer that is easily customizable.
Thanks a bunch,
Elad Katz.

This discussion is locked

All Comments