Checking for an application?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Checking for an application?
Hi there,
I am trying to write a code for my project which, when the user (of the final standalone) activates a button, will initiate a check of the computer's system to see if a particular application is installed. If it can't find the application, it will return a message saying so.
I remember reading somewhere in the Rev resource material a way of doing this, but I've just spent about an hour looking for it and simply can't find it any longer.
Can someone please give me a suggestion of how to do this or where to find the information?
Cheers,
Peter
I am trying to write a code for my project which, when the user (of the final standalone) activates a button, will initiate a check of the computer's system to see if a particular application is installed. If it can't find the application, it will return a message saying so.
I remember reading somewhere in the Rev resource material a way of doing this, but I've just spent about an hour looking for it and simply can't find it any longer.
Can someone please give me a suggestion of how to do this or where to find the information?
Cheers,
Peter
Re: Checking for an application?
For Windows, I found a VBScript that looks at the Registry for Uninstall keys, and returns a list: http://billsway.com/vbspage/
Also for Windows, psinfo -s works well. Look for it at www.sysinternals.com.
Walt
Also for Windows, psinfo -s works well. Look for it at www.sysinternals.com.
Walt
Walt Brown
Omnis traductor traditor
Omnis traductor traditor
Re: Checking for an application?
Hi Peter,
This should do what you want:
It should be easy to adjust this for Linux, if needed.
Best regards,
Mark
This should do what you want:
Code: Select all
function programs
if the platform is "MacOS" then -- only OSX!
put shell("ps -xcw") into myList
put offset("COMMAND",myList) into myColPos
repeat for each line myLine in myList
put char myColPos to -1 of myLine & cr after myNewList
end repeat
filter myNewList without "(*"
return line 2 to -1 of myNewList
else if the platform is "Win32" then
put line 4 to -1 of shell("tasklist") into myList
repeat for each line myLine in myList
put word 1 of myLine & cr after myNewList
end repeat
return line 1 to -2 of myNewList
else
return empty
end if
end programs
Best regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Checking for an application?
Since posting my original message I have discovered another way of doing what I want (see below). But I'm a little confused about something.
I want the end user to click a button which will check if QuickTime is installed on the computer. If it isn't installed then a dialogue box will appear with a message instructing the user to install QuickTime.
I'm thinking of using this:
But then I read this in the Rev dictionary:
Thanks Mark for your response. I tried the code with some success, but thought the above code is simpler - provided it works cross platform.
Cheers,
Peter
I want the end user to click a button which will check if QuickTime is installed on the computer. If it isn't installed then a dialogue box will appear with a message instructing the user to install QuickTime.
I'm thinking of using this:
Code: Select all
on mouseUp
if the QTVersion = 0.0 then show field "DialogueBox"
else go to card 2
end mouseUp
What does "calling the QTVersionfunction" mean in real terms?Tip: It can take Revolution a second or two to load the code needed to use QuickTime, depending on the machine speed. Since this code is only loaded into memory once per session, you can speed up the first occurrence of a QuickTime-related action by calling the QTVersionfunction during otherwise dead time--for example, during startup of your application--to preload the code.
Thanks Mark for your response. I tried the code with some success, but thought the above code is simpler - provided it works cross platform.
Cheers,
Peter
Re: Checking for an application?
Hi Peter,
Calling a function is synonymous to "using" or "executing" that function. Your script is calling and loads QT if it is available. It is often the best solution to do this while your splash screen is showing.
Kind regards,
Mark
Calling a function is synonymous to "using" or "executing" that function. Your script is calling and loads QT if it is available. It is often the best solution to do this while your splash screen is showing.
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Checking for an application?
I was limiting myself to the original inquiry: "see if a particular application is installed", "Application" and "Installed" being the operative words, not exactly the same as "see if a particular process is running".
Best, Walt
Best, Walt
Walt Brown
Omnis traductor traditor
Omnis traductor traditor
Re: Checking for an application?
Walt - I can see how my original inquiry was misleading, thanks for the feedback it helps me understand why sometimes when I ask a question on this forum I get mixed responses.
Kind regards,
Peter
Kind regards,
Peter