From: Douglas J. Steele on
AFAIK, the API call will detect the currently registered application for the
..zip extension whether it's WinZip32 or WinZip64.

You should be able to simply write out a dummy file with the .zip extension
and find the registered application using that dummy file: I believe the API
call strictly looks at the file name, not whether it's a valid file.

Another option, of course, is to go speleunking through the HKCR section of
the registry.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"rdemyan via AccessMonster.com" <u6836(a)uwe> wrote in message
news:a6c31763335a5(a)uwe...
> Thanks, Doug. My App uses WinZip to upload zipped files to an ftp site.
> I
> recently purchased a new computer which is 64 bit. Programs are stored in
> the folder Program Files (x86) and not Program Files. Since my code has
> a
> hard coded reference to the path (which was presumed to be Program Files),
> my
> program can no longer find WinZip.
>
> I had forgotten that My App has this vulnerability. I wish there was
> another
> way to find WinZip than what you suggest, since it requires knowing the
> file
> name of a zip file on the user's computer. I've decided to start storing
> the
> full path in a local table. If MyApp can't find it, it will ask the user
> to
> locate WinZip via File Search code. Then Myapp will store the full path
> for
> future use.
>
> However, I would prefer to be able to find it in code.
>
> Also, what happens when WinZip32 becomes Winzip64??
>
>
>
>
>
> Douglas J. Steele wrote:
>>Oops. Just noticed I was missing the final slash on the folder:
>>
>>success = FindExecutable("MyFile.zip", "C:\SomeFolder\", sResult)
>>
>>> Take a look at what Randy Birch has at
>>> http://vbnet.mvps.org/code/system/findexecutable.htm
>>[quoted text clipped - 12 lines]
>>>> WinZip. If possible, I'd like to start with as little information as
>>>> possible, (Example WinZip).
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-reports/201004/1
>


From: rdemyan via AccessMonster.com on
Oh, OK. If the API doesn't care if it is a valid zip file, then that should
work fine. I'll give it a go and report back.

Thanks.

Douglas J. Steele wrote:
>AFAIK, the API call will detect the currently registered application for the
>.zip extension whether it's WinZip32 or WinZip64.
>
>You should be able to simply write out a dummy file with the .zip extension
>and find the registered application using that dummy file: I believe the API
>call strictly looks at the file name, not whether it's a valid file.
>
>Another option, of course, is to go speleunking through the HKCR section of
>the registry.
>
>> Thanks, Doug. My App uses WinZip to upload zipped files to an ftp site.
>> I
>[quoted text clipped - 30 lines]
>>>>> WinZip. If possible, I'd like to start with as little information as
>>>>> possible, (Example WinZip).

--
Message posted via http://www.accessmonster.com

From: rdemyan via AccessMonster.com on
It turns out that the API requires a file that exists. Not only that, but
the path folder must also be accurate.

I guess I could try to create a zip file in code in the CurrentProject.Path
folder, get the location of WinZip and then save that location to a local
table within MyApp. Before this code is invoked, I'll have code that checks
to make sure Winzip exists based on the path currently stored in the table.
If not, then the code to create the dummy WinZip file will be invoked and the
API will be called to get the location of WinZip. Afterwards, the dummy zip
file will be deleted.



rdemyan wrote:
>Oh, OK. If the API doesn't care if it is a valid zip file, then that should
>work fine. I'll give it a go and report back.
>
>Thanks.
>
>>AFAIK, the API call will detect the currently registered application for the
>>.zip extension whether it's WinZip32 or WinZip64.
>[quoted text clipped - 11 lines]
>>>>>> WinZip. If possible, I'd like to start with as little information as
>>>>>> possible, (Example WinZip).

--
Message posted via http://www.accessmonster.com

First  |  Prev  | 
Pages: 1 2
Prev: Access Report question
Next: 2 column report