Link to home
Start Free TrialLog in
Avatar of Informative
InformativeFlag for United States of America

asked on

Customizing VB6 Setup Package Deployment..

I would like the setup program to make a couple of entries in the registry which can be simply as savesetting/getsettings entries even but where is the best place to make this change.

I've modified the setup.frm source code once before in VB4 or 5 but would really like a good more thorough explanation of the official procedure for doing this and especially for the new Deployment system which is in VB6.

Thanks!
Avatar of Informative
Informative
Flag of United States of America image

ASKER

I'm really hopeful to find some sort of offical document detailing it or it would be great if there were a way to just add entries to the setup.lst but I'm at least thinking it would be nice to have the default install directory and whatever stored in the registry instead of always using APP.PATH which can cause problems when the program is not in its usual place.
Avatar of Éric Moreau
You can continue to modify Setup1.vbp since it is the application used to install applications.

You can put the "ForceUseDefDir=1" in the Setup section to let the application installs in the folder named by "DefaultDir" without asking the user for confirmation.


ASKER CERTIFIED SOLUTION
Avatar of AnswerTheMan
AnswerTheMan

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jackg
jackg

It is very easy in VB 6.00 to use the savesetting/getsetting function, but are you trying to use your own settings or allow user interaction?.
Well the problem with the save settings getsettings for me is that they are specific per each user logged onto a machine but even still yes I would like to have the setup just use the savesettings to save the default folder/directory.  Apparently this would be accomplished by editing the setup1.vbp

I'm thinking that most applications benefit from knowing where they reside and/or where they would obtain updates to the software from and this sort of information would be best stored during the installation.  Where they run setup from we could store APP.PATH to the registry with savesettings and where they install TO would also be useful and should match the APP.PATH when they later run the program.  Tracking this information at install time saves a lot of trouble in the long run should the user move the folder and try to run from elsewhere the application should be aware this has happened.

I'm not exactly sure what I'm looking for yet but so far I'm appreciating all of the feedback!  Answerman I will explore that link later today..
look. SaveSetting and GetSetting are very poor rutines espeacially when used from the setup program.
during setup, you must look in registry for KNOWN registry path which can be anywhere.
if your privious app wrote to that location - you can't track that with GetSettings since you don't know the path which that privious app was installed on.
so,
you can use API registry functions instead from within your setup1 project to alwayes write to same registry location (whatever).
or,
you can use VisualStudioInstaller which i've mentioned to get same registry result,
or,
check my answer at :
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=10235351 
for another option (read it all)


I like your answer AnswerMan can you give me a little more info on the VisualStudio Installer and how to use it to package VB apps?  I'll go ahead and give you the points..
Install it, then run it.
 in the "New project" window, select the "new" tab, then click "VisualStudio Installer project". DblClick the VisualBasic projct, then Brose for your project's vbp file.
Click "Finish".
then - set visually any registry settings you want.
at last - build the project.
it creates a setup program like Office2000 setup.
--------------------------------------
one thing you can't do in VSI is to add code or variabels to the setup program.

in case you need that - try my last comment's last option.
I've setup a new question This VisStudioInstaller looks pretty cool!  

https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=10265945 

I'm not seeing where I could easily make it set a registry entry to equal the Files to Install path nor where I could tell it to set a default path besides the assumed

c:\programfiles\projectname

path it assigns me automatically.  The MSI files wont run on many users workstations?  Do they require IE5 or something or what exactly is an MSI file and well no surprise it runs great on my machine.

Thanks
yep. won't run on any WIN sys.
i've tried on IE5 and it was OK.
on WIN95 with IE3 - nothin doin
have not tried on IE4, IE4.01.
have you tried the URL i gave you :
check my answer at :
                   https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=10235351  
that REGISTRY CLASS can help you do all you need
very easy. if not upon setup, then on the first run of your app.
There are problems with the setup doing registry entries and that is because the setup may or may not have everything it needs installed yet to DO those edits.

I may actually wind up doing a direct registry edit during the setup to store the installed paths (from to) but for now I'm still experimenting with the Visual Studio installer.  

It's very nice compared to the usual VB setup deployment wizard but I'm still not sure how to create a registry entry which is custom and does not get assigned its value during the creation of the VSI wizard..  Hmm gladly award another 100 points to someone who could explain how to get VSI to create a custom registry key to store the FROM TO install drive\folderpaths.