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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run a Winzip self extracting file

Status
Not open for further replies.

Sam8932

Programmer
Oct 15, 2002
22
0
0
I used Winzip to zip up files that we need to send to many users in different locations. The file created is an .exe file. These users do not have Winzip installed on their computers. Is there a way to run this executable winzip file on the users machine with VBA code?

Hopefully I've given you enough info.

Thanks in advance.
 
Thanks for the reply fumei. I am using a Shell command to zip the files. If the users had Winzip installed on their computers there would be no problem. What I need to do is extract the files to different locations on the users PC and I'm not sure how to do that. As far as passing in parameters and such.
 
Not following.

You are sending them .EXE files? If so, they can use Shell to execute it. I am not familiar with a WinZip produced .EXE. Are you saying you need WinZip to execute the .EXE?

As for extracting to different locations, are these passed as command line parameters? If so, can these not, again, be executed by Shell?

Gerry
My paintings and sculpture
 
I figured it out.

I've created a self extracting zip file (which is an .exe file)

code:
Dim strFilePath As String
Dim strZipFileLocation As String
Dim strUnzipLocation As String
Dim strZipFile As String

strFilePath = GetDBPath

strZipFileLocation = LocateFile("wzipse32.exe")

strUnzipLocation = "C:\content"

strZipFile = strFilePath & "CMS_Data"

wkCmnd = "" & strZipFileLocation & " """ & strZipFile & """ " & " -y -auto -d " & strUnzipLocation & ""
intZipVal = Shell(wkCmnd, vbMaximizedFocus)

And then just used the shell command to run that .exe file

 
I figured it out.
Really?


Is this not what you originally asked, and was answered? Did you not write in your original post:
The file created is an .exe file. These users do not have Winzip installed on their computers. Is there a way to run this executable winzip file on the users machine with VBA code?

Did I not post:
You are sending them .EXE files? If so, they can use Shell to execute it.

And now you post:
And then just used the shell command to run that .exe file
Well, I am glad you figured it out.

Gerry
My paintings and sculpture
 
Well I knew I needed to use the shell command jackass. What I wasn't sure of was how exactly to do it as far as passing in command line parameter. And you didn't really help much with that did you. I didn't realize it was SO important to you that you get credit for helping me.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top