Results 1 to 14 of 14

Thread: [RESOLVED] Executable code dependency on Vb files

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2006
    Posts
    403

    Resolved [RESOLVED] Executable code dependency on Vb files

    Hitherto I have written programs on a machine with VB installed (of course!) and have transferred them to other machines with VB installed, either as VB folders or .exe executable code. In general there has never been a problem.

    However recently I tried to get a .exe program to run on an XP machine and it would not - there were error messages implying that certain needed files could not be found.

    Cutting a long story short, I installed VB6 on that XP machine and the .exe code then ran fine. So it seemed that although I was using the compiled .exe program version, it was nonetheless dependent on files which are specific to VB. This, it seems, somewhat defeats the object of producing a final .exe version of a program which one would hope could run on any windows machine, not just one with VB loaded.

    Investigation in my particular case showed the needed files to be MSDATGRD,MSADODC,MSCOMM32 and RICHTX32. The files occur in groups of 3 or 4 with extensions .OCX, .OCA, .DEP and MSDATGRD also has a .SRG

    I checked a 2000 machine and the XP machine for these files. Although the OS installations had taken all available options/add-ons neither contained those files until VB6 was installed.

    The location of the files is C:\Windows\System in Win98 (note: not system32) C:\WINNT\SYSTEM32 in Win2000 and C:\WINDOWS\SYSTEM32 in XP.

    I would appreciate comments about this. The objective of a VB6 program is often to produce a generally applicable .exe user code. If it has to depend on files which only load with a VB6 installation, the user code would need to be distributed along with these supporting files in some way. This problem must be well known within the VB community.

    camoore

    Wales, UK

  2. #2
    Frenzied Member some1uk03's Avatar
    Join Date
    Jun 2006
    Location
    London, UK
    Posts
    1,675

    Re: Executable code dependency on Vb files

    VB Complied .exe's depend on external file dependencies. This is why developers create SETUP files, which include these necessary files and distribute them via the SETUP utility.

    You should never simply copy the .exe from one machine and expect it to work on the other. Sometimes you might get away with it, if not much external files are used, but in your case, it seems vital that you do create a setup utility which would deploy those needed files.

    Have a look at Inno Setup. Quite easy to set up. And also a visual GUI for it here: ISTool.
    _____________________________________________________________________

    ----If this post has helped you. Please take time to Rate it.
    ----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.



  3. #3
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: Executable code dependency on Vb files

    You can also use the Package and Deployment wizard that comes with Visual Studio 6.0 which you can use to make an installer for your application.
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2006
    Posts
    403

    Re: Executable code dependency on Vb files

    Thank you (again) some1uk03 and dee-u. I realise now that this is a necessary and somewhat complex (for me) area which I have never previously needed to enter. Hence I will need to study, learn and practice the routines suggested.

    The suggestion from some1uk03 appears VERY comprehensive but at first reading difficult to understand, and to lack an introductory guide. The Package & Deployment wizard in V.Studio 6.0 ssuggested by dee-u on the other hand seems intuitively easier, but I have yet to test its output on a "virgin" machine.

    For my purposes, the simplest solution would be to create a CD of ALL the VB6 dependency files and to load this to the relevant Windows System folders of the recipient machines (this being easier all round than loading the whole of VB6 to them).

    Is there a simple way to construct a set of all these Vb dependent files? I can not find them as such on the VB6 source disc. Through the dee-u approach I can see which files a specific VB program needs, but not the totality.

    camoore

    Wales, UK

    ps. some1uk03 your control move at runtime routine works brilliantly.

  5. #5
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Executable code dependency on Vb files

    You should not install everything, just the things that your program needs (which will probably be about 1% of the files available). Not only will that reduce the size of your package, but it will also reduce installation time, and be less likely to cause accidental damage to other programs.

    To find out which files your program needs, the easiest way is to just let the installation creator (P&DW or something else) work it out for you - assuming of course that they have support for VB6 built in. Depending on what exactly which Components/References your program uses, this is likely to be about 10MB of files - whereas the whole lot (most of which are not relevant to your app) will probably be closer to 1000MB.

    I personally recommend Visual Studio Installer, which is the official 'modern' replacement for P&DW, and is free to download.

    There are links to downloads and documentation (for several products, including VSI) in our Application Deployment FAQ.


    If you are installing it, what program are you using to create the package? what does the installation script contain?

  6. #6

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2006
    Posts
    403

    Re: Executable code dependency on Vb files

    Where is "here" please Martin?

  8. #8
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Executable code dependency on Vb files

    The 'Application Deployment' forum, in the 'General' section of the site (as shown in the links just above [and below] the posts in this thread).

  9. #9

  10. #10

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2006
    Posts
    403

    Re: Executable code dependency on Vb files

    Thank you Si_the_geek.

    Your point about not installing "everything" is well taken.

    This whole subject of the installation package is one I will need to take time to learn and study. Thank you to all contributors to this thread for your advice and suggestions.

    Please all remember that some of us are relatively new to this business, and be forgiving if our enquiries are maybe basic to the more experienced. It is a GREAT forum, but people come to it from a whole range of backgrounds and levels of knowledge ranging from absolute beginners to full-blown professionals, such as the administrator and moderators. I urge you all to help people with the more basic levels of VB6 knowledge.

    I never fail to learn from contact at this forum, beit (mostly) in the receipt of help or (occasionally) in being able to offer help.

    I will mark this thread as resolved, and raise a new thread if a particular problem arises when I have tried and tested the solutions suggested.

    With Thanks,


    camoore

    Wales, UK

  11. #11
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Executable code dependency on Vb files

    Quote Originally Posted by camoore View Post
    Thank you Si_the_geek.

    Your point about not installing "everything" is well taken.

    This whole subject of the installation package is one I will need to take time to learn and study. Thank you to all contributors to this thread for your advice and suggestions.

    Please all remember that some of us are relatively new to this business, and be forgiving if our enquiries are maybe basic to the more experienced. It is a GREAT forum, but people come to it from a whole range of backgrounds and levels of knowledge ranging from absolute beginners to full-blown professionals, such as the administrator and moderators. I urge you all to help people with the more basic levels of VB6 knowledge.

    I never fail to learn from contact at this forum, beit (mostly) in the receipt of help or (occasionally) in being able to offer help.

    I will mark this thread as resolved, and raise a new thread if a particular problem arises when I have tried and tested the solutions suggested.

    With Thanks,


    camoore

    Wales, UK
    First of all, thanks. Second, we all are aware that the people come here to ask questions range from the newest nooby to expert programmers, and most of us try to answer questions with that in mind. On occasion however you may see someone deriding or making fun of someone because of their lack of experience. If you do see something like that then please let the moderators know by using the Report Post icon and we'll take care of it because one of our primary goals is to keep this place friendly.

  12. #12

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2006
    Posts
    403

    Re: [RESOLVED] Executable code dependency on Vb files

    Thank you Martin.

    Please in absolutely no way see anything I received from Si_the_geek, or elsewhere in this thread, as anything less than 100% helpful and most gratefully received, as has been the case with several other of my posts to which Si and others have been good enough to respond.

    I have on occasions seen posts which somewhat deride the lack of knowledge of newcomers, but these have been very rare, and all in the past.

    There have been occasions when contributors have said , in effect, "we will not write code, just help you to write your own". This is totally understandable, but from the perspective of a newcomer to VB6 programming there is great merit in having a demmo program to run, investigate and come to understand. Such VB ability as I learnt was from a few good textbooks which talked you through complete program projects and explained to you step by step what you were doing. Thus I commend to contributors the writing of simple but complete illustrative programs for people. This should not, of course, amount to the writing of commercial programs nor to the doing of students' taskwork.

    Sometimes I find the responses in the Forum to be aimed above the VB heads of the people making the enquiry.

    All said this is an excellent Forum. I often wonder how it is financed - it must cost money.

    I for one would be very happy to pay an annual fee for membership.

    Administrator may choose to delete this message from thread, since it is not strictly on-topic, but I hope the message is received. A PM could be sent.

    camoore

    Wales, UK

  13. #13
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: [RESOLVED] Executable code dependency on Vb files

    There isn't very much excuse for being a novice at VB6 anymore, the product hasn't been available for many years and there are lots of alternatives for newcomers. This might be why you see less tolerance for extremely simple questions.

    Another thing to keep in mind is the value of the VB6 documentation. Most simple matters can be resolved by simply looking them up there. By actually reading the documentation before trying to write programs you'll probably find that you can quickly locate answers later yourself as you need them.

    Questions about simple deployment like the one at hand for example are already covered in the documentation at the "state of the art" as it existed in 1998 at least: Distributing Your Applications.

    Anyone even halfway serious about writing VB6 programs should have the MSDN CDs that came with VB6 installed to his hard drive.


    What the documentation doesn't cover so well are changes and new features added to Windows (and VB6 itself since its 1998 release). The PDW was replaced in late 1998 by VSI 1.0 and in 2000 by VSI 1.1, several SOAP Toolkits were released for VB6 in years starting at 2000. Windows 2000, XP, Vista, and soon Windows 7 have had a large number of cumulative changes since Windows 98 arrived on the scene. Starting with IE 5 a number of things were brought along as part of that browser's ecosystem.

    All of these new issues have to be researched through books or the Internet because the VB6 documentation was never updated past about October 2001.

    But most of the sum total of things a newcomer might want to know have been pretty thoroughly asked and answered many times. This is why the search feature here (and for that matter Google, et al.) are so useful - and why they ought to be your first stop after looking in the manual.
    Last edited by dilettante; Aug 30th, 2009 at 08:10 PM. Reason: *sigh* typos

  14. #14

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2006
    Posts
    403

    Re: [RESOLVED] Executable code dependency on Vb files

    Dilettante :

    You are quite correct, but sometimes people need just a pointer to where to find information. There is a first time for everyone doing anything. Thanks to this thread and the responses, I have learnt about the distribution issue. Now I will be reading it up and hopefully getting it to work. Hitherto since I have only distributed my programs to other of my own machines, all of which had VB6 installed, the file dependency issue never arose. All I needed was the .exe.

    I have never encountered any derision from this Forum about any post I have made. However I have read other threads in which more experienced members have in effect derided inexperienced posters somewhat for their lack of knowledge. Many of those posters were very obviously young students and often it is clear that English is not their first language.

    I think that it behoves each and every one of us, in life, to treat all others with respect. In the case of responses to Forum threads, if a poster clearly lacks experience / knowledge you can either help him/her directly, point him/her at a source of relevant information or not respond at all.

    Most of we older professionals know more about our specialist subjects than the majority. In my case it is electronics,avionics,radio and radar. In your case it is clearly computer programming. I could probably teach you a lot about my subjects. Undoubtedly you could teach me a vast amount about VB6 etc.

    Horses for Courses.

    Over and Out

    camoore

    Wales, UK

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width