Results 1 to 11 of 11

Thread: is VB Runtime files really necessary

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 1999
    Location
    Bahrain
    Posts
    41
    Is it really necessary, I want to make an AutoRun CD-Rom, but the problem is that if the client machine doesn’t have VB Run-time files already installed the program will fail to start.

    If VB Runtime files are necessary, and there is no chance to ignore it, how can I identify if the client machine does or doesn’t have VB Runtime already installed (say using BAT files).

  2. #2
    Lively Member FirstKnight's Avatar
    Join Date
    Jul 1999
    Location
    Johannesburg, South Africa
    Posts
    95
    Unfortunatly you have to install the runtime files, but there is a way to do this. You can find an .exe file on download.com or cnet that installs just the vb6 runtime files. I think it is called vb6runtime.exe or something. Add this to your installation cd, and change you autorun file so that it runs this first.

    Hope it helps.
    Today is yesterday's tomorrow

  3. #3

    Thread Starter
    Member
    Join Date
    Aug 1999
    Location
    Bahrain
    Posts
    41
    Thanks FirstKnight for your reply..

    But the problem is that, when i install the runtime files it would ask the user to restart the PC..

    secondly, if i set the autorun file is the vb6runtime.exe (which installs run-time files) how can i run my program ?


  4. #4
    Megatron
    Guest
    I you could easily make a C++ program to do this, then use ShellExecute to open your VB exe.

  5. #5

    Thread Starter
    Member
    Join Date
    Aug 1999
    Location
    Bahrain
    Posts
    41
    good idea megatron,

    how will i identify from C++ wither vb-runtime files are already installed or not ?

  6. #6
    Guru Yonatan's Avatar
    Join Date
    Apr 1999
    Location
    Israel
    Posts
    892
    You could call the GetSystemDirectory to get the system directory. Then, check if MSVBVM60.DLL (or whatever runtime file your version of VB requires) is there, and then if all the OCXs and DLLs you need are there.
    You can check by calling CreateFile with OPEN_EXISTING. Don't forget to CloseHandle!
    If the runtime is not there, run the runtime-installer program.
    If it is there, make sure all the OCXs and ActiveX DLLs are registered, by calling DllRegisterServer for each one.

    Enjoy

    By the way, the runtime files are the main reason I don't use VB anymore.

  7. #7
    Megatron
    Guest
    You can also use the FindFirstFile (API equiv. of Dir) function to search for the file.

  8. #8

    Thread Starter
    Member
    Join Date
    Aug 1999
    Location
    Bahrain
    Posts
    41
    Thanks Yonata, Megatron..

    As a small software business owner, VB has forced many software businesses like me to work on it, in most cases VB reduce big amount programming time with alsmo same quality saving lot of money

  9. #9
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Cool

    I came accross the same problem. I got around it
    by putting the msvbvm60.dll on the cd in the root path.

    I found out that when a dll is not located in
    the default paths(system32, windows, or system etc.)
    the system looks for it in the same path as the
    calling exe is located. If it's not found it
    gives the error you received.

    You can test this by putting the dll on the cd
    (in the root path with the exe) and then
    rename the dll on your system to something else
    (after you close VB).
    Then run the cd. It will use
    the dll off of the cd by default.
    You do not need to register the dll either.
    Your autorun cd will run and when your done
    rename the dll on your system back and then you
    can open VB again.

    BTW - if a computer already has the dll when your cd runs
    it will not create any problems because your not
    registering the dll. When they take your cd out
    there system will function as it was before, not
    even knowing about your dll.


  10. #10
    PowerPoster
    Join Date
    Aug 2000
    Location
    India
    Posts
    2,288
    It's generally the other way round. The file is first searched in the app directory, then the systems directory, then the windows directory and then in the directories specified in the Path environment variable.
    Last edited by amitabh; Apr 30th, 2001 at 01:51 AM.

  11. #11
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Cool

    Your correct. My mistake. It was late you know.
    The system searches in the app path first.

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