473,568 Members | 2,738 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Get FolderPath(Envi ronment.Special Folder.ProgramF iles)
path = path & "\MYPROGRAM\rec ord.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.Get FolderPath(Envi ronment.Special Folder.ProgramF iles)
Environment.Get FolderPath(Envi ronment.Special Folder.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 1335
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.Exe cutablePath
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******** ******@TK2MSFTN GP10.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.Exe cutablePath
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.Sta rtup 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_INSTA LLER. MYPROGRAM is a "Windows Application".
MYPROGRAM_INSTA LLER 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******** ******@TK2MSFTN GP10.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.Exe cutablePath
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
2614
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 understanding on how to create a setup program. All the articles about Windows Installer 2.0 is the best way to install your assembly into GAC but I...
4
4396
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 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)...
3
1157
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 there an easier way to do this? In VB6 I was able to run 1 setup program and that covered everything. Thanks! Chuck.
7
1689
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 to be the default way things are done when you publish an app in Vs2005, Microsoft has again <GGGG> seen in their infinite wisdom that they needed to...
8
2070
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 web form when one presses the button on the web form on a client pc, the sql query which is contained in the text box is sent to a vb net...
2
5449
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 include Microsoft.mshtml.dll in the Setup project. I am using VS 2003 Setup program and my app is in C#. Now the problem is the size of this dll is...
15
6701
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 that I can calculate weekly and monthly. At this point I have one entry per search phrase with the number of hits the search phrase has gotten, and...
0
1103
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 SQL build script. How it works now is that the user will edit the web.config (manually, after installation) and then manually logon to the SQL...
0
976
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, however, when i started running the setup package program to other machine for distribution, it halts and asks for "...the system not updated reboot to...
0
7693
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7604
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7916
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7962
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6275
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5498
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3631
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2101
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.