|
-
Sep 19th, 2001, 05:12 PM
#1
Thread Starter
Lively Member
Installation Directory
Is there any way that I can get my program to install in the default directory.
I use the Application setup wizard that comes with VB, and for update reasons I want the program to install to the default location.
Any info would be appreciated. Thanks
-
Oct 14th, 2003, 12:41 AM
#2
Hyperactive Member
Did you get anywhere with your problem?
I am working on a problem where I need to know where the progam was installed using the MS installer.
-
Oct 14th, 2003, 12:58 AM
#3
While I would use Inno (http://www.innosetup.com/, I do believe there's an option to disallow user intervention of installation directory), you can edit the P&D Wizard to do what you want (it's a VB project, on my comp. it's around here: C:\Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard).
Edit: For Steve: you might try searching the registry for the install path of what you're trying to remove. Hope it works
The time you enjoy wasting is not wasted time.
Bertrand Russell
<- Remember to rate posts you find helpful.
-
Oct 14th, 2003, 01:43 AM
#4
Hyperactive Member
I have found the uninstall area and use it for another purpose. I also see a key for 'InstallLocation' but it is always blank when I do installs.
Using MSI... is there a way to have it fill in this block? The only other way I know is to have my program update the location it is ran from. This is a probem if they never run the program after installing it.
Basically... I created a nice live update program and need to know where my product was installed so I can update the exe or add new files.
-
Oct 14th, 2003, 09:07 AM
#5
Lively Member
Find Your Proggy
This Post might help, i created it to find Access but it could be used to find any progam, The functions find the program associated with an App..... etc...........
(if your proggy has files associated with it then KOOL...
Go Here This Might Help
with respect
bindu
-
Oct 14th, 2003, 11:18 AM
#6
Hyperactive Member
Thanks for the tip...
If a user was to remove the association then my program would not be able to locate the file quickly. Rats!!
If only I can just have MSI identify the install location in the registry then I would be on easy street. MSI will write registry items but I do not know how identify the install location the user is selecting.
The only option I have is to not permit the user to change the install location and let MSI install to the default location instead. Then I just identify where the program 'should be' and go from there.
-
Oct 14th, 2003, 03:48 PM
#7
Re: Installation Directory
Originally posted by viperfire
Is there any way that I can get my program to install in the default directory.
I use the Application setup wizard that comes with VB, and for update reasons I want the program to install to the default location.
Any info would be appreciated. Thanks
I may not understand your problem, but why not use App.Path and then not worry where the user has installed the app?
-
Oct 14th, 2003, 06:56 PM
#8
I believe he's talking about writing the registry from the Microsoft Installer, which should, by all rights, write it to the registry already. You might try searching around the web to see if anyone else has run into that problem. On another sidenote: I really would suggest you try Inno, just to see if it'll do what you want it to. If not, there's a workaround to every problem
The time you enjoy wasting is not wasted time.
Bertrand Russell
<- Remember to rate posts you find helpful.
-
Oct 14th, 2003, 08:41 PM
#9
Hyperactive Member
Thanks...
Eventually I will just create my own installer.. I just do not have the time. I am currently working an a program to update all my products on a users computer and it works great!!
For anyone else who needs a way to find the Install Path...
Basically... I have worked around the Install location requirement by doing this:
When the program is installed it creates two GUIDS. One identifies the program and another to group the program and it's requirements. Each required file also has a GUID.
These are stored in HKLM\Software\Microsoft\CurrentVersion\Installer\UserData\xxxx\Components\{EXEGUID}\{GroupGUID}\AppP ath
xxxx = A user Token ID number I guess. There can be several and the registry entry will be in one of them. I guess who ever installed the program will contain the entry.
These Unique ID numbers are the same when installed on other computers. So I search for the {EXE GUID} and then get the Key for the {Group GUID}. This ultimatly returns the App Path.
Hope this is of some use for others. It took me 10 hours to research this.
-
Oct 15th, 2003, 12:51 AM
#10
-
Oct 17th, 2003, 04:59 AM
#11
Hyperactive Member
I never found the App Path entry till you pointed it out. This is because I did seaches for my program.
Here is the funny thing... I see tons of other apps but none of mine that I installed with the Miscrosoft Installer!!
-
Oct 17th, 2003, 07:35 AM
#12
-
Oct 17th, 2003, 08:13 AM
#13
New Member
I believe the variable in the MSI program is targetdir, you can set a key in the registry with that value with the installer.
-
Oct 20th, 2003, 05:18 AM
#14
Hyperactive Member
binduau
I have a module that reads and writes to any location of the registry I desire. Been using it for years. My problem stems from the MSI installer and not being able to have the install process write a registry entry with the 'user selected' install location.
The MSI installer is a new thing for me so I am still learning how to use it.
Mr. Den
Thanks for your tip! I will give it a try right now and see what results I get. I will be sure to post if it worked or not.
-
Oct 20th, 2003, 06:10 AM
#15
Frenzied Member
Edit the SETUP.LST file generated by the P&D Wizard using Notepad, and add
ForceUseDefDir=1
to the end of the [Setup] section
eg;
[Setup]
Title=My App
DefaultDir=$(ProgramFiles)\MyApp
AppExe=MyApp.exe
AppToUninstall=MyApp.exe
ForceUseDefDir=1
The user will not be prompted for the install location - and it will be installed into wherever is designated in the DefaultDir= line.
'Buzby'
Visual Basic Developer
"I'm moving to Theory. Everything works there."
-
Oct 20th, 2003, 09:29 AM
#16
Lively Member
Kool!
Originally posted by Buzby
Edit the SETUP.LST file generated by the P&D Wizard using Notepad, and add
ForceUseDefDir=1
to the end of the [Setup] section
eg;
[Setup]
Title=My App
DefaultDir=$(ProgramFiles)\MyApp
AppExe=MyApp.exe
AppToUninstall=MyApp.exe
ForceUseDefDir=1
The user will not be prompted for the install location - and it will be installed into wherever is designated in the DefaultDir= line.
-
Oct 21st, 2003, 07:45 AM
#17
Hyperactive Member
This is some good information... but what about using MSI instead of the P&D Wizard.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|