Unzipping the txt file

A

algan

I wrote the utility which FTPs the .zip file and unzips it. The code is
working fine. The only problem is: I hard coded the winzip path
(C:\Program files\winzip\winzip32.exe).
For my machine its working perfect, but on the user machine the path is
different.
Does any one have some code to locate the machine path to winzip?
Really appiciate your help, Thanks
 
C

Cindy M -WordMVP-

I wrote the utility which FTPs the .zip file and unzips it. The code is
working fine. The only problem is: I hard coded the winzip path
(C:\Program files\winzip\winzip32.exe).
For my machine its working perfect, but on the user machine the path is
different.
Does any one have some code to locate the machine path to winzip?
Try searching in the Registry. I can find some stuff under CLSID, but the
one you're asking about would be under
HKEY_Local_Machine\Software\Classes\Applications\winzip32.exe\shell\Open\
command

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
A

algan

Cindy said:
Try searching in the Registry. I can find some stuff under CLSID, but the
one you're asking about would be under
HKEY_Local_Machine\Software\Classes\Applications\winzip32.exe\shell\Open\
command

Cindy,
I was trying to use GetSettings funstion but it didn't work for me. If
you have any code I would really apppriciate your help.
Thanks, Liya
 
S

Steve Rindsberg

Cindy,
I was trying to use GetSettings funstion but it didn't work for me. If
you have any code I would really apppriciate your help.

GetSettings in VB/VBA only allows you to retrieve settings from a specific bit
of the registry.

You'd need to find a more generalized routine. Try looking at some of the
VB/VBA sites listed under http://www.mvps.org/ (Randy Birch's
http://vbnet.mvps.org/ in particular for this sort of thing).

Also on VBNet, search for "FindExecutable" which is, I expect, just the thing
you need. It returns the path to the exe file registered to a file extension.

It should point you to the app that "owns" .ZIP files, even if that doesn't
happen to be WinZIP on a particular user's computer.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top