I
I_AM_DON_AND_YOU?
Hi Cor:
You have given a very good suggestion that I can directly reference the
"Program Files" Folder. Actually my vb.net program reads/write a notepad
file record.txt. For example, the name of my program is MYPROGRAM and I am
presuming that it would be installed in the "MYPROGRAM" folder of "Program
Files". Therefore I can reference record.txt file in my code as
path = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles)
path = path & "\MYPROGRAM\record.txt"
.......
.......
So far so good.
Now my question is what's the guarantee that user is going to install that
program in "Program Files" directory ? What if during the installation user
install that in C:\ ? Then my program would be installed at C:\MYPROGRAM and
my code would be searching the .txt file as "C:\Program
Files\MYPROGRAM\record.txt".
In simple words, what's the way to force the user to install MYPROGRAM in
Program Files directory.
Thanks in advance!
*********************
PREVIOUS REPLIES & QUESTIONS...
**************************************************************
Hi Don,
It is easy to find the program-files directory, maybe you can use that in
your program, so there is no need for hardcoding the program directory.
And now I in doubt which it is
\\\\
Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles)
Environment.GetFolderPath(Environment.SpecialFolder.Programs)
////
But I think that is easy to find for yourself which one if you know the
trick?
Cor
***** FIRST QUERY::::
I am working on the setup project of my small vb.net program. I don't want
to give the user (the person who will install my program) an option where
(s)he wants to install the program/utility. For example it should only be
installed only in C:\NEWPROGRAM directory. Please tell me in simple steps..
Thanks in advance!
You have given a very good suggestion that I can directly reference the
"Program Files" Folder. Actually my vb.net program reads/write a notepad
file record.txt. For example, the name of my program is MYPROGRAM and I am
presuming that it would be installed in the "MYPROGRAM" folder of "Program
Files". Therefore I can reference record.txt file in my code as
path = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles)
path = path & "\MYPROGRAM\record.txt"
.......
.......
So far so good.
Now my question is what's the guarantee that user is going to install that
program in "Program Files" directory ? What if during the installation user
install that in C:\ ? Then my program would be installed at C:\MYPROGRAM and
my code would be searching the .txt file as "C:\Program
Files\MYPROGRAM\record.txt".
In simple words, what's the way to force the user to install MYPROGRAM in
Program Files directory.
Thanks in advance!
*********************
PREVIOUS REPLIES & QUESTIONS...
**************************************************************
Hi Don,
It is easy to find the program-files directory, maybe you can use that in
your program, so there is no need for hardcoding the program directory.
And now I in doubt which it is
\\\\
Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles)
Environment.GetFolderPath(Environment.SpecialFolder.Programs)
////
But I think that is easy to find for yourself which one if you know the
trick?
Cor
***** FIRST QUERY::::
I am working on the setup project of my small vb.net program. I don't want
to give the user (the person who will install my program) an option where
(s)he wants to install the program/utility. For example it should only be
installed only in C:\NEWPROGRAM directory. Please tell me in simple steps..
Thanks in advance!