Jump to content

Registry Key Value


Recommended Posts

Hello

How can i find a registry key and execute an uninstall if this key exist, like :

IF FileExists("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{E8662ED4-5F39-4B01-B76F-1DCA5582C9FA}") then

RunWait("MsiExec.exe /X{E8662ED4-5F39-4B01-B76F-1DCA5582C9FA} /QUIET")

EndIf

It doesn't match

Please help me

Thanks

(sorry for my bad english).

Edited by lafafmentvotre
Link to comment
Share on other sites

  • Developers

Hello

How can i find a registry key and execute an uninstall if this key exist, like :

IF FileExists("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{E8662ED4-5F39-4B01-B76F-1DCA5582C9FA}") then

RunWait("MsiExec.exe /X{E8662ED4-5F39-4B01-B76F-1DCA5582C9FA} /QUIET")

EndIf

It doesn't match

Please help me

Thanks

(sorry for my bad english).

Look at RegRead() in the helpfile .. :P

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

RegRead give back an error value if mismatch.

Do that:

CODE
$var = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{E8662ED4-5F39-4B01-B76F-1DCA5582C9FA}","UninstallString")

If @error <> 0 Then MsgBox(0, '', "uninstall string not exists")

Edited by BugFix

Best Regards BugFix  

Link to comment
Share on other sites

RegRead give back an error value if mismatch.

Do that:

CODE
$var = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{E8662ED4-5F39-4B01-B76F-1DCA5582C9FA}","UninstallString")

If @error <> 0 Then MsgBox(0, '', "uninstall string not exists")

Here you have similar "working" application to what you want to achieve. Check the code. Should be helpfull :P

http://www.autoitscript.com/forum/index.php?showtopic=20406

My little company: Evotec (PL version: Evotec)

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...