Package & Deployment questsion:

  • Thread starter Thread starter I_AM_DON_AND_YOU?
  • Start date Start date
I

I_AM_DON_AND_YOU?

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!
 
* "I_AM_DON_AND_YOU? said:
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..

Why not? I would not install a program like this...
 
Hi Herfried,
That is probably easy to answer even for me.
Because probably Don has made a hard coded reference to is.
So I give Don an answer not knowing if that is right.

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
 
* "Cor said:
That is probably easy to answer even for me.
Because probably Don has made a hard coded reference to is.
So I give Don an answer not knowing if that is right.

That's why I asked.
 
As others have pointed out, not giving the user a choice of where it goes
is not recommended and violates Windows Logo. However, if you really want
to do it... you can change the DefaultLocation property of the Application
Folder in the setup project, change it to C:\NEWPROGRAM. Then, go to the
UI editor, and delete the "Installation Folder" dialog, that's the one that
asks the user where to install it to.
 
Back
Top