Creating a self-extracting winzip file through VB (1 Viewer)

Jibbadiah

James
Local time
Today, 21:00
Joined
May 19, 2005
Messages
282
Hi,

I have some existing code that works fine. It allows me to output a report to a local drive, then zip and password protect the file, then I send the file on to the recipient.

I have just been informed that the recipients won't have a copy of winzip... so I have to make it self-extracting. Does anyone know how to ammend the following to make this self-extracting?!

Code:
strWinzip = "C:\Program Files\WinZip\WinZip32.exe"
        
'Name winzip file same as file to be zipped
strZipFile = Left(strReportName, InStr(1, strReportName, ".", vbTextCompare) - 1) & ".zip"
                
strWinzipCmd = strWinzip & " -a -ex -s" & strPassword & " """ & strZipFile & """ """ & strReportName & """"

RunDOSExecutable (strWinzipCmd) 'This function is similar to call shell but waits for external process to finish

According to the winzip program I would use the existing code to create a winzip file, then I would open the winzip doc, go to actions "Make .exe" and then click ok a couple of times. Easy enough if you do it manually, but I have to send around 1000 reports!!

Any help would be greatly appreciated.

Note: Working for the business that I work for it is highly unlikely that I will be allowed access to any other self-extraction programs... other than our existing copy of Winzip 7.

Cheers,

J.
 

Users who are viewing this thread

Top Bottom