A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Find path where WinZip is installed



 
 
Thread Tools Display Modes
  #1  
Old April 16th, 2010, 05:27 PM posted to microsoft.public.access.reports
rdemyan via AccessMonster.com
external usenet poster
 
Posts: 36
Default Find path where WinZip is installed

Is there a way that I can determine the full path of an application like
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/For...ports/201004/1

  #2  
Old April 17th, 2010, 07:58 PM posted to microsoft.public.access.reports
Richard[_41_]
external usenet poster
 
Posts: 7
Default Find path where WinZip is installed

On Apr 16, 9:27*am, "rdemyan via AccessMonster.com" u6836@uwe wrote:
Is there a way that I can determine the full path of an application like
WinZip. *If possible, I'd like to start with as little information as
possible, (Example WinZip).

--
Message posted via AccessMonster.comhttp://www.accessmonster.com/Uwe/Forums.aspx/access-reports/201004/1


Click on start -- programs -- find win zip, right click on win zip,
click properties.
  #3  
Old April 17th, 2010, 09:57 PM posted to microsoft.public.access.reports
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default Find path where WinZip is installed

Take a look at what Randy Birch has at
http://vbnet.mvps.org/code/system/findexecutable.htm

If you change the line of code

success = FindExecutable("winhlp32.hlp", "c:\winnt\system32\", sResult)

to point to a known Zip file, like

success = FindExecutable("MyFile.zip", "C:\SomeFolder", sResult)

then sResult will contain the path to winzip32.exe

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


"rdemyan via AccessMonster.com" u6836@uwe wrote in message
news:a69fbf73c8622@uwe...
Is there a way that I can determine the full path of an application like
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/For...ports/201004/1



  #4  
Old April 18th, 2010, 04:06 PM posted to microsoft.public.access.reports
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default Find path where WinZip is installed

Oops. Just noticed I was missing the final slash on the folder:

success = FindExecutable("MyFile.zip", "C:\SomeFolder\", sResult)

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


"Douglas J. Steele" wrote in message
...
Take a look at what Randy Birch has at
http://vbnet.mvps.org/code/system/findexecutable.htm

If you change the line of code

success = FindExecutable("winhlp32.hlp", "c:\winnt\system32\", sResult)

to point to a known Zip file, like

success = FindExecutable("MyFile.zip", "C:\SomeFolder", sResult)

then sResult will contain the path to winzip32.exe

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


"rdemyan via AccessMonster.com" u6836@uwe wrote in message
news:a69fbf73c8622@uwe...
Is there a way that I can determine the full path of an application like
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/For...ports/201004/1





  #5  
Old April 19th, 2010, 12:55 PM posted to microsoft.public.access.reports
rdemyan via AccessMonster.com
external usenet poster
 
Posts: 36
Default Find path where WinZip is installed

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/For...ports/201004/1

  #6  
Old April 19th, 2010, 06:53 PM posted to microsoft.public.access.reports
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default Find path where WinZip is installed

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@uwe wrote in message
news:a6c31763335a5@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/For...ports/201004/1



  #7  
Old April 20th, 2010, 01:38 AM posted to microsoft.public.access.reports
rdemyan via AccessMonster.com
external usenet poster
 
Posts: 36
Default Find path where WinZip is installed

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

  #8  
Old April 20th, 2010, 05:02 AM posted to microsoft.public.access.reports
rdemyan via AccessMonster.com
external usenet poster
 
Posts: 36
Default Find path where WinZip is installed

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

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:35 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.