Sign in to follow this  
Followers 0
lafafmentvotre

Registry Key Value

5 posts in this topic

#1 ·  Posted (edited)

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

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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  

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

Thanks a lot

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  
Followers 0