Jump to content
Sign in to follow this  
lafafmentvotre

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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

Share this post


Link to post
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)

Share this post


Link to post
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
Sign in to follow this  

×
×
  • Create New...