Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

copy an application to the user's PC and then install app

Status
Not open for further replies.

newprogamer

Programmer
Sep 22, 2004
107
US
Hello Everyone,

I have a CD that contains a stand-alone application. The application will run from the CD. The user must have Adobe reader installed. If it is not installed, the program will install adobe after receiving the user's permission. Currently, it is trying to run Adobe from the CD. How do I copy the executable to a location on the user's computer and then install adobe on the user's computer?

Thanks so much!
New Programmer
 
Copy the file then 'shell out' to the executable at the location you specified for it to be placed.

Search for VB Shell and you should find the answer you need.
 
I have written the code to copy the file, but how do I create the directory first. My code returns the error number 76, path not found.
***********************************************
Here is a sample of the code.


Private Sub cmdInstall_Click()

Dim strSource As String
Dim strDest As String ' destination

On Error GoTo err_copy


'install adobe reader 6.0
strSource = App.Path & "\adobe\AdbeRdr60_DLM_enu_full.exe"
strDest = "C:\temp\adobe\AdbeRdr60_DLM_enu_full.exe"
FileCopy strSource, strDest
Shell (strDest)

err_copy:
MsgBox "Error installing Adobe" & vbCrLf &
Err.Number & ": " & Err.Description, vbExclamation


End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top