What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » VB Runtime in my programs Installer?

VB Runtime in my programs Installer?
Author: Message:
Salem
Senior Member
****

Avatar

Posts: 769
Reputation: 16
37 / Male / Flag
Joined: May 2004
O.P. VB Runtime in my programs Installer?
Hi

Can anyone help me. I'm busy writing programs using Visual Basic 6, and use InstallShield (the one that come with Borland Delhpi 6). I would like to know if i can somehow include the Visual Basic runtime files in the installer, then the users will not need to download the runtime files.

Also, i want to add settings to my programs, But need help on how to get my program to remember the settings the next time it opens, i'm a beginner at programming. I know you can use the registry for this, but can someone give me hel on how to do this?

Thanx in advance

RileyM
[Image: salem874.smart.jpg][Image: card.png]
Was i Helpful?[/url]
09-08-2004 05:21 PM
Profile PM Find Quote Report
Choli
Elite Member
*****

Avatar
Choli

Posts: 4714
Reputation: 42
43 / Male / Flag
Joined: Jan 2003
RE: VB Runtime in my programs Installer?
quote:
Originally posted by RileyM
I would like to know if i can somehow include the Visual Basic runtime files in the installer, then the users will not need to download the runtime files.
you can include the installation package of the vb runtime files (that you can gt somewhere in microsoft.com) but I wouldn't do that, because it'd be more than 1 MB in the setup package.

The other thing you can do is use a wizard that comes with VB that create installation packages. In spansish its name is "asistente para el empaquetado y distribucion" or somethign similar. I don't know its english name.

Anyway, I think that the best thing you can do is put a note in your current installation package that tells the user to download and install the vb runtime files if s/he doesn't have them. Put a link to the microsoft site and that would be ok: your package will be small and users that already have the vb files won't need to get / install them again.

quote:
Originally posted by RileyM
Also, i want to add settings to my programs, But need help on how to get my program to remember the settings the next time it opens, i'm a beginner at programming. I know you can use the registry for this, but can someone give me hel on how to do this?
maybe you can start using the vb functions GetSetting and SaveSetting and similar ones. Search them in your online help for more information. However, I'd suggest you to use the windows API functions. Using them you have more control over what is happening and you can do more things with them. They're RegQueryValueEx, RegSetValueEx, RegOpenKeyEx, RegCloseKey and others. Remember that in order you can use these functions you have to declare them first and you need some knowledge about how windows APIs work.
Messenger Plus! en espaņol:
<< http://www.msgpluslive.es/ >>
<< http://foro.msgpluslive.es/ >>
:plus4:
09-08-2004 08:44 PM
Profile PM Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: VB Runtime in my programs Installer?
quote:
Originally posted by Choli
The other thing you can do is use a wizard that comes with VB that create installation packages. In spansish its name is "asistente para el empaquetado y distribucion" or somethign similar. I don't know its english name.
Package and Deployment Wizard
quote:
Originally posted by Choli
RegQueryValueEx, RegSetValueEx, RegOpenKeyEx, RegCloseKey
Forgetting RegCreateKey? Kinda important...
And of course RegCreateKeyEx, the complex version...

This post was edited on 09-08-2004 at 10:05 PM by RaceProUK.
[Image: spartaafk.png]
09-08-2004 10:03 PM
Profile PM Web Find Quote Report
lopardo
Veteran Member
*****


Posts: 1395
Reputation: 33
38 / Male / Flag
Joined: Nov 2002
Status: Away
RE: VB Runtime in my programs Installer?
quote:
Originally posted by RileyM
Can anyone help me. I'm busy writing programs using Visual Basic 6, and use InstallShield (the one that come with Borland Delhpi 6). I would like to know if i can somehow include the Visual Basic runtime files in the installer, then the users will not need to download the runtime files.
I'd use Inno Setup Installer, it's free and very powerful. Check out its website for more information on how to distribute VB runtimes. Anyways, I agree with Choli about this:

quote:
Originally posted by Choli
Anyway, I think that the best thing you can do is put a note in your current installation package that tells the user to download and install the vb runtime files if s/he doesn't have them. Put a link to the microsoft site and that would be ok: your package will be small and users that already have the vb files won't need to get / install them again.
[Image: userbar452797dd.gif]
09-08-2004 10:16 PM
Profile PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: VB Runtime in my programs Installer?
Another way of writing and reading settings is useing INI-files. It is much safer and easier to use, if you're not experienced with the registry.

You must use API's also (just like if you want to use the registry), I don't know the exact API's from the top of my head, but you sure will find them (or someone will list them here)....

Some people will say that using INI-files is lame and the "old" method. Well this is far from true. So don't be fooled by them... (even if you are experienced with the registry, INI-files have benefits over the registry in many cases, just like the registry-method has some benefits over INI's)

Also note that using the registry you are expected to follow certain (unwritten) rules, like writing your settings in a specific branch in the registry and not in any other. Furthermore, editing settings by others is far more easy in INI-files then in the registry (not everybopdy knows how to handle the registry). Also the registry can be a very dangerous place to work in if you're not exactly know what you're doing!! For all these reasons I recommend using an INI-file (until you're more experienced in programming).

This post was edited on 09-09-2004 at 02:23 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
09-09-2004 02:22 AM
Profile PM Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: VB Runtime in my programs Installer?
quote:
Originally posted by Choli
GetSetting and SaveSetting
Don't they deal with the INI file?
[Image: spartaafk.png]
09-09-2004 09:16 AM
Profile PM Web Find Quote Report
Dempsey
Scripting Contest Winner
*****

Avatar
http://AdamDempsey.net

Posts: 2395
Reputation: 53
38 / Male / Flag
Joined: Jul 2003
RE: VB Runtime in my programs Installer?
quote:
Originally posted by raceprouk
quote:
Originally posted by Choli
GetSetting and SaveSetting
Don't they deal with the INI file?
they save to
code:
HKEY_CURRENT_USER\Software\VB and VBA Program Settings
SoundPacks   -   Scripts   -   Skins

that's not a bug, thats an unexpected feature
09-09-2004 09:46 AM
Profile E-Mail PM Web Find Quote Report
Choli
Elite Member
*****

Avatar
Choli

Posts: 4714
Reputation: 42
43 / Male / Flag
Joined: Jan 2003
RE: VB Runtime in my programs Installer?
quote:
Originally posted by raceprouk
quote:
Originally posted by Choli
RegQueryValueEx, RegSetValueEx, RegOpenKeyEx, RegCloseKey
Forgetting RegCreateKey? Kinda important...
And of course RegCreateKeyEx, the complex version...
quote:
Originally posted by Choli
They're RegQueryValueEx, RegSetValueEx, RegOpenKeyEx, RegCloseKey and others.
;)
quote:
Originally posted by CookieRevised
Some people will say that using INI-files is lame and the "old" method. Well this is far from true. So don't be fooled by them... (even if you are experienced with the registry, INI-files have benefits over the registry in many cases, just like the registry-method has some benefits over INI's)
True. RileyM: be sure you understand the differences between both methods and you can choose the one that best suits your needs.
quote:
Originally posted by CookieRevised
You must use API's also (just like if you want to use the registry), I don't know the exact API's from the top of my head, but you sure will find them (or someone will list them here)....
APIs for read/write from/in an INI file:
GetPrivateProfileSectionNames, GetPrivateProfileSection, GetPrivateProfileInt, GetPrivateProfileString, WritePrivateProfileString
I used those in the last public version of the messenger plus translator, however there are some others more. :P
Note: Be careful with those APIs. Under windows 9x/Me there's a bug with them: You can't use filer larger than 65505 bytes (aprox)
quote:
Originally posted by raceprouk
quote:
Originally posted by Choli
GetSetting and SaveSetting
Don't they deal with the INI file?
No, but I think there's some other function in VB that does that. I can't find it now (maybe i'm wrong and it doesn't exist)
Messenger Plus! en espaņol:
<< http://www.msgpluslive.es/ >>
<< http://foro.msgpluslive.es/ >>
:plus4:
09-09-2004 07:45 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On