Kondro Posted August 11, 2011 Share 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. Link to comment Share on other sites More sharing options...
wakillon Posted August 11, 2011 Share 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 Link to comment Share on other sites More sharing options...
Kondro Posted August 11, 2011 Author Share 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") Link to comment Share on other sites More sharing options...
wakillon Posted August 11, 2011 Share 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 Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted August 11, 2011 Share 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 Link to comment Share on other sites More sharing options...
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