Kondro 0 Posted August 11, 2011 I have hopefully an easy question for the experts. I have a script written to install an application update. this are soon to be needed for about 100 users. i plan to call my exe via logon scripts. I need to have the first line of the script look for a reg key for the app and if it exists then terminate the script or if the reg key is absent then move on to the installs. please help. Thanks. Share this post Link to post Share on other sites
wakillon 403 Posted August 11, 2011 I have hopefully an easy question for the experts. I have a script written to install an application update. this are soon to be needed for about 100 users. i plan to call my exe via logon scripts. I need to have the first line of the script look for a reg key for the app and if it exists then terminate the script or if the reg key is absent then move on to the installs. please help.Thanks.The RegRead example in the helpfile doesn't help you ? AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Share this post Link to post Share on other sites
Kondro 0 Posted August 11, 2011 The RegRead example in the helpfile doesn't help you ?no, sorry. i have reviewed the help files and the online functions definition but i am missing something. below is what i have in my script. the registry key does exist on the test machine but it still processes the script.Opt("WinWaitDelay",100)Opt("WinTitleMatchMode",4)Opt("WinDetectHiddenText",1)Opt("MouseCoordMode",0) Sleep(2000) If RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{B2A9B452-2621-49B0-A474-AB01F9F74202}", "Oracle 11 Client") <> "" Then ProcessClose("AutoIt3.exe") ;also tried "Exit" here. EndIfRun('\\hp-con-ecm\smspkge$\va100108\Integra\Oracle81Eradicator.exe')ProcessWaitClose("oracle81eradicator.exe")ShellExecuteWait("\\hp-con-ecm\smspkge$\va100108\integra\Oracle 11 Client.msi", "/passive /norestart")MsgBox(4096,"Hill Phoenix Application Update", "Your HP Apps Software has been updated, Please reboot your computer") Share this post Link to post Share on other sites
wakillon 403 Posted August 11, 2011 try If RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{B2A9B452-2621-49B0-A474-AB01F9F74202}", "Oracle 11 Client") <> "" Then ProcessClose("AutoIt3.exe") Exit Else Run('\\hp-con-ecm\smspkge$\va100108\Integra\Oracle81Eradicator.exe') ProcessWaitClose("oracle81eradicator.exe") ShellExecuteWait("\\hp-con-ecm\smspkge$\va100108\integra\Oracle 11 Client.msi", "/passive /norestart") MsgBox(4096,"Hill Phoenix Application Update", "Your HP Apps Software has been updated, Please reboot your computer") EndIf AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Share this post Link to post Share on other sites
AdmiralAlkex 125 Posted August 11, 2011 Don't ProcessClose() yourself, just Exit .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Share this post Link to post Share on other sites