VB Runtime in my programs Installer? - Printable Version
-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: VB Runtime in my programs Installer? (/showthread.php?tid=31141)
VB Runtime in my programs Installer? by Salem on 09-08-2004 at 05:21 PM
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
RE: VB Runtime in my programs Installer? by Choli on 09-08-2004 at 08:44 PM
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.
RE: VB Runtime in my programs Installer? by RaceProUK on 09-08-2004 at 10:03 PM
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...
RE: VB Runtime in my programs Installer? by lopardo on 09-08-2004 at 10:16 PM
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.
RE: VB Runtime in my programs Installer? by CookieRevised on 09-09-2004 at 02:22 AM
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).
RE: VB Runtime in my programs Installer? by RaceProUK on 09-09-2004 at 09:16 AM
quote: Originally posted by Choli
GetSetting and SaveSetting
Don't they deal with the INI file?
RE: VB Runtime in my programs Installer? by Dempsey on 09-09-2004 at 09:46 AM
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
RE: VB Runtime in my programs Installer? by Choli on 09-09-2004 at 07:45 PM
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.
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)
|