473,396 Members | 1,827 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Setup Program (query 2)...

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.SpecialFolde r.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.SpecialFolde r.ProgramFiles)
Environment.GetFolderPath(Environment.SpecialFolde r.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!
Nov 20 '05 #1
4 1327
Hi Don,

!! .. force the user .. !!

Aaaggh!!

As a User I hate not being given the choice of where to install some
software. I don't always use Program Files (eg, games go on a different drive)
and I frequently reduce a long-winded app name to something shorter.

Is there a way for the Setup to write a registry key for you which records
the installation path? You may allow the User to choose where to install but
they can't expect to control your registry keys.

On the other hand, if you want your application to know where it's being
run from, it already knows:
Application.ExecutablePath
This includes the program name and extension so you'd have to remove those
first.

Regards,
Fergus
Nov 20 '05 #2

"Fergus Cooney" <fi******@tesco.net> wrote in message
news:uz**************@TK2MSFTNGP10.phx.gbl...
Hi Don,

!! .. force the user .. !!

Aaaggh!!

As a User I hate not being given the choice of where to install some
software. I don't always use Program Files (eg, games go on a different drive)
and I frequently reduce a long-winded app name to something shorter.
I agree, and on top of that, I commonly install programs on a different drive entirely, D:, or
maybe F: or G: who knows.
Is there a way for the Setup to write a registry key for you which records
the installation path? You may allow the User to choose where to install but
they can't expect to control your registry keys.

On the other hand, if you want your application to know where it's being
run from, it already knows:
Application.ExecutablePath
This includes the program name and extension so you'd have to remove those
first.
Regards,
Fergus

Nov 20 '05 #3
You are great. Good suggestion. Thanks.

I found the another method where even there is no need to cut the extension
and it is:
Application.Startup Path

There is one more problem I am facing but didn't get the solution. In my
Setup Program I am not been able to create 2 things (when the program is
intalled on the client machine ) : (1) create shortcut to my program/utility
(2) Entry in Windows' Start --> Program Menu.

Actually in my VB.Net solution I have two projects (1) MYPROGRAM (2)
MYPROGRAM_INSTALLER. MYPROGRAM is a "Windows Application".
MYPROGRAM_INSTALLER is a "SetUp Wizard" project.

Although on "File System Editor" in the Solution Explorer I can see (1)
Application Folder (2) User's Desktop and (3) User's Program Menu. But some
how I am not been able to create short cuts for Start Menu and Users'
Desktop. May be you can tell me in simple steps....

- Sender

"Fergus Cooney" <fi******@tesco.net> wrote in message
news:uz**************@TK2MSFTNGP10.phx.gbl...
Hi Don,

!! .. force the user .. !!

Aaaggh!!

As a User I hate not being given the choice of where to install some
software. I don't always use Program Files (eg, games go on a different drive) and I frequently reduce a long-winded app name to something shorter.

Is there a way for the Setup to write a registry key for you which records the installation path? You may allow the User to choose where to install but they can't expect to control your registry keys.

On the other hand, if you want your application to know where it's being run from, it already knows:
Application.ExecutablePath
This includes the program name and extension so you'd have to remove those first.

Regards,
Fergus

Nov 20 '05 #4
Hi Don,

I'm afraid I've not been involved with the Setup Wizard so far. If no-one
else picks up on this, you may need to post it as an independant query.

Sorry. :-(

Regards,
Fergus
Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Bob | last post by:
Could anyone suggest me some examples/articles on creating a setup program in VS.NET that can install the assembly into the GAC? I have done some search and research myself and have some basic...
4
by: I_AM_DON_AND_YOU? | last post by:
There is one more problem I am facing but didn't get the solution. In my Setup Program I am not been able to create 2 things (when the program is intalled on the client machine ) : (1) create...
3
by: CR | last post by:
To prepare a PC for my .NET apps I have to run mdac_typ.exe, dotnetfx.exe, and .NET setup programs for every application. Since I have around 8 apps this adds up to 10 installs for every pc. Is...
7
by: Bob | last post by:
I want my aps to the insalled as was the old way under c:\Program files\Myapp or give the user the choice as before of installing the app in another folder location. That again no longer seems...
8
by: pamelafluente | last post by:
I am beginning aspNet, I know well win apps. Need a simple and schematic code example to start work. This is what I need to accomplish: ---------------------- Given button and a TextBox on a...
2
by: JM | last post by:
Hi, I have created a windows application which uses Microsoft.mshtml.dll for displaying browser window in the application for showing html. When I am creating a setup program, I have to...
15
by: l3vi | last post by:
I have a new system Im building that stores entries of what people are searching for on my sites. I want to be able to keep records of how many times a keyword was searched for daily, and from...
0
by: Will Asrari | last post by:
I am creating a web setup project in Visual Studio .NET 2003 and have completed this task successfully. As of now the client who will be receiving this setup package will get the MSI along with a...
0
by: slughead | last post by:
people! im new here, please be nice... im having problem with the setup package in my recent project! need help please... i have created setup package to distribute the my software,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.