iHonda Posted April 12, 2006 Posted April 12, 2006 is there a way to have a script search to see if a specified program is installed on the computer?? A great place to start Autoit 1-2-3
dabus Posted April 12, 2006 Posted April 12, 2006 (edited) Try to search through the registry-keys... Dim $i While 1 $i=$i+1 $var = RegEnumKey("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", $i) If @error <> 0 then ExitLoop MsgBox(4096, "SubKey #" & $i & " under Uninstall: ", $var) WEnd You could replace MsgBox with If $var='AddMySoftwareHere' Then $Found=1 ExitLoop EndIf .... If $Found=1 Then DoSomething Edited April 12, 2006 by dabus
nfwu Posted April 12, 2006 Posted April 12, 2006 (edited) If the program saved registry values, check for those values. If the program installs certain libraries in the windows folder, check for those files. Otherwise, try using StringInString on the output of "tree C:". $ourProcess = Run(@ComSpec & " /k tree C:", @WorkingDir, @SW_HIDE, 2) $found = 0 $progfoldername = "Dev-Cpp" while not @error If StringInStr(StdoutRead($ourProcess), $progfoldername) Then $found = 1 ExitLoop EndIf wend ;;;;;;; now, if program folder is found, $found == 1. #) Edited April 12, 2006 by nfwu TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode()
iHonda Posted April 13, 2006 Author Posted April 13, 2006 ok thanks guys even tho im still a little lost i will figure it out. j/w wut would i do if i didnt know if the program writes stuf the the registry?? im trying to make a script for my grandpa (hes computer illiterate) that will check to see if a browser is installed then launch it if it is. A great place to start Autoit 1-2-3
skippynz Posted April 13, 2006 Posted April 13, 2006 ok thanks guys even tho im still a little lost i will figure it out. j/w wut would i do if i didnt know if the program writes stuf the the registry?? im trying to make a script for my grandpa (hes computer illiterate) that will check to see if a browser is installed then launch it if it is.do you meant like internet explorer or some other type of "browser" ?
iHonda Posted April 13, 2006 Author Posted April 13, 2006 (edited) yea internet explorer, mozilla fire fox, and he has this other browser that got installed when i put aim on his computer called AOL Explorer is there a way to see if these programs are installed?? Edited April 13, 2006 by Zmaster A great place to start Autoit 1-2-3
skippynz Posted April 13, 2006 Posted April 13, 2006 yea internet explorer, mozilla fire fox, and he has this other browser that got installed when i put aim on his computer called AOL Explorer is there a way to see if these programs are installed??if its windows xp sp2 you can use the "Set Program Access and Defaults" to use what ever internet browser you have then just create a shortcut to some URL you want him to go to first. ie for my machine at home i want my missus to use Firefox and not Internet explorer so i changed the Default internet browser to Firefox and removed the links to internet explorer from the desktop, so now if she just types in a URL in the address bar it will auto open in Firefox.dunno if this helps you or not.
iHonda Posted April 13, 2006 Author Posted April 13, 2006 lol i completely forgot about that thanx. A great place to start Autoit 1-2-3
skippynz Posted April 13, 2006 Posted April 13, 2006 lol i completely forgot about that thanx.no worries - ive had days like that - must be the old age...(29 going on 59)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now