VB6 to copy app folder to user's desktop?
Hi there folks! I am giving away a bunch of math apps to teachers next month that don't want the programs installed. So I am looking for a way so when a user clicks on a button, the program will copy a folder from a dvd to that users desktop. That way they can just copy over the apps they want to use.
Does anyone have any experience using vb6 to copy a folder over and all of the files inside it to a specific location (user's desktop)?
Thanks!
Re: VB6 to copy app folder to user's desktop?
This isn't safe to do blindly if the programs make use of any DLLs/OCXs that require registration. If they do things can get ugly and mess up user's machines.
If you must do this you need to look into reg-free COM, which is the only safe way to isolate ActiveX dependencies.
As for copying to the current user's Desktop goes, this is a pretty simple thing you can do via Shell32's ActiveX API. Just be sure to use late-bound instances of these objects because Microsoft broke binary compatibility here and there over the generations of Windows.
See Shell Objects for Scripting and Microsoft Visual Basic, and a version of this information is also part of the documentation that came with VB6 (MSDN Library CDs).