Discussion:
Install a VB program on a USB key drive
(too old to reply)
Lei Liu
2003-10-22 21:54:24 UTC
Permalink
I have written a VB program that I'd like to run once or twice on my
patients' computers. I didn't thing installing and then uninstalling
things on a patient's computer was a good idea, so I thought about
running the program from a USB key drive. I can install my program
(packaged using MS's packaging and deploying wizard) on a usb key
drive, and load all the support files (VB run time, .dll and .ocx) to
the same folder. However, there is a problem. If some components used
in running my program (.dll or .ocx) are not registered on a computer,
the program would not run from the key drive. If I have to register
all the components with a patients' computer, then it is not much
different from installing the program. So is there a way to run a VB
program from a usb key drive without installing it on a computer? If
there is, then what do I need to do?
Thanks!
Lei
the Wiz
2003-10-22 23:17:48 UTC
Permalink
Post by Lei Liu
I have written a VB program that I'd like to run once or twice on my
patients' computers. I didn't thing installing and then uninstalling
things on a patient's computer was a good idea, so I thought about
running the program from a USB key drive. I can install my program
(packaged using MS's packaging and deploying wizard) on a usb key
drive, and load all the support files (VB run time, .dll and .ocx) to
the same folder. However, there is a problem. If some components used
in running my program (.dll or .ocx) are not registered on a computer,
the program would not run from the key drive. If I have to register
all the components with a patients' computer, then it is not much
different from installing the program. So is there a way to run a VB
program from a usb key drive without installing it on a computer? If
there is, then what do I need to do?
Thanks!
Lei
You really don't have a lot of options.

Don't use ocx's, because they must be registered. This does limit the features
your program can have ;-)

However, you can do everything with cross-version API calls or with dll's; the
dll's can be on the USB drive with the program. The interface is harder and
takes more code than using ocx's.

Switch to a language that creates stand-alone exe files. Maybe Delphi or XPB!
Basic (when it becomes available again).



More about me: http://www.jecarter.com/
VB3/VB6/NSBasic Palm/C/PowerBasic source code: http://www.jecarter.com/programs.html
Drivers for Pablo graphics tablet and JamCam cameras: http://home.earthlink.net/~mwbt/
johnecarter ***@at mindspring dot.dot com. Fix the obvious to reply by email.
Frank Adam
2003-10-22 23:21:38 UTC
Permalink
Post by Lei Liu
I have written a VB program that I'd like to run once or twice on my
patients' computers. I didn't thing installing and then uninstalling
things on a patient's computer was a good idea, so I thought about
running the program from a USB key drive. I can install my program
(packaged using MS's packaging and deploying wizard) on a usb key
drive, and load all the support files (VB run time, .dll and .ocx) to
the same folder. However, there is a problem. If some components used
in running my program (.dll or .ocx) are not registered on a computer,
the program would not run from the key drive. If I have to register
all the components with a patients' computer, then it is not much
different from installing the program. So is there a way to run a VB
program from a usb key drive without installing it on a computer? If
there is, then what do I need to do?
Not that i know of. If you can write C or Delphi, you could perhaps
write a small stub that registers the components before running the VB
application and de-registers them after.

Actually, even with a batch file you may be able to this.
ie:
runvb.bat
regsvr32 "/s \acontrol.ocx"
vbapp.exe
regsvr32 "/u /s \acontrol.ocx"

May work.
--
Regards, Frank
J French
2003-10-23 06:55:27 UTC
Permalink
Post by Lei Liu
I have written a VB program that I'd like to run once or twice on my
patients' computers. I didn't thing installing and then uninstalling
things on a patient's computer was a good idea, so I thought about
running the program from a USB key drive. I can install my program
(packaged using MS's packaging and deploying wizard) on a usb key
drive, and load all the support files (VB run time, .dll and .ocx) to
the same folder. However, there is a problem. If some components used
in running my program (.dll or .ocx) are not registered on a computer,
the program would not run from the key drive. If I have to register
all the components with a patients' computer, then it is not much
different from installing the program. So is there a way to run a VB
program from a usb key drive without installing it on a computer? If
there is, then what do I need to do?
A USB key drive is little more than a jumped up Floppy to the
computer.

If you do not use any OCXes or VB DLLs then all your App needs is
MSVBVM60.DLL

It is quite possible to write pretty complex programs without using
any OCXes or VB DLLs
- actually quite a lot of the stuff in the standard VB OCXes is a load
of rubbish

Loading...