I am trying to determine if an application is installed on a PC without creating a temp file and reading it.
The goal is to have an Autorun CD (that part is no problem) that when it is run checks to see if Acrobat is installed. The dos command below works
and I could direct the output to a file such as c:\temp\testacrobat.txt and then see if the string "File association not found for extension type" exists in the file. However, since it is a standalone CD and it is going to be distributed I would prefer that it didn't write anything to users PC.
Does anyone know of another way of doing this? Like direct the output to the clipboard etc or another way to test if an application is installed. The file association method seems to me to be the best as it disregards versions and with Acrobat maybe they like a different viewer.
C:\Documents and Settings\Keith Passaur>assoc .pdf
.pdf=AcroExch.Document
C:\Documents and Settings\Keith Passaur>assoc ape
File association not found for extension ape
Output to clipboard instead of a File
Moderators: JRL, Dorian (MJT support)
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
If you finally do need to write somewhere to do this, here are two thoughts:
1. Many years ago it was commont to make RAM drives.
Is it possible that you could create a temporary RAM Drive? Write to it as needed, and then deleted the drive when done?
-------------
2. How about writing to a temp folder, then deleting when done? Net result is nothing is on machine.
------------
1. Many years ago it was commont to make RAM drives.
Is it possible that you could create a temporary RAM Drive? Write to it as needed, and then deleted the drive when done?
-------------
2. How about writing to a temp folder, then deleting when done? Net result is nothing is on machine.
------------
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
Found a way to output dos to the clipboard
Bob, thanks for the response. I thought of the ram drive but forgot how to do it, however in my research I found a little know component that Microsoft has called "Clip.exe". It is a small exectuable, 6k and if you run it you can write to the clipboard. Here is the code that make it possible to check for a pdf viewer.
Run Program>Clip.exe
Run Program>cmd /c assoc .pdf |Clip
Wait>1
GetClipboard>clipboard
I have gotten it to work with this script and can see what a great complement it is to Macro Scheduler. I appears to be for free distribution as it is available at this Microsoft ftp site.
ftp://ftp.microsoft.com/Services/TechNe ... skit/FILE/
There are other utilities on this site as well and they maybe usefull as well.
Run Program>Clip.exe
Run Program>cmd /c assoc .pdf |Clip
Wait>1
GetClipboard>clipboard
I have gotten it to work with this script and can see what a great complement it is to Macro Scheduler. I appears to be for free distribution as it is available at this Microsoft ftp site.
ftp://ftp.microsoft.com/Services/TechNe ... skit/FILE/
There are other utilities on this site as well and they maybe usefull as well.
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Don't forget MJT's Clip Magic also.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!