PsychOfMSE Posted October 17, 2013 Posted October 17, 2013 (edited) expandcollapse popup#AutoIt3Wrapper_Res_Comment=CHI Citrix Uninstaller #AutoIt3Wrapper_Res_Description=This application will uninstall any version of Citrix Online Plugin #AutoIt3Wrapper_Res_Fileversion=1.0.1.0 #AutoIt3Wrapper_Res_FileVersion_AutoIncrement=P #AutoIt3Wrapper_Res_ProductVersion=1.0 #AutoIt3Wrapper_res_requestedExecutionLevel=requireAdministrator #AutoIt3Wrapper_Icon=favicon.ico Global $x86 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\ICA Client\", "ClientName") Global $x64 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Citrix\ICA Client\", "ClientName") Global $receiver_Present = FileExists("C:\ProgramData\Citrix\Citrix Receiver (Enterprise)\TrolleyExpress.exe") Global $receiver_Present_2 = FileExists("C:\ProgramData\Citrix\Citrix Receiver\TrolleyExpress.exe") Global $PNAgent_x64_Upgrade = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Citrix\PluginPackages\XenAppSuite\PN_Agent\", "Version") Global $PNAgent_x86_Upgrade = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\PNAgent\", "Version") Global $Dragon_x64 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Voice\SpeechRecognition\Engine", "Dragon NaturallySpeaking") Global $Dragon_x86 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Voice\SpeechRecognition\Engine", "Dragon NaturallySpeaking") Global $Dragon_Installed Global $Dragon_Installed_x64 Global $Dragon_Installed_x86 If Not $Dragon_x64 = "" Then $Dragon_Installed_x64 = 1 If Not $Dragon_x86 = "" Then $Dragon_Installed_x86 = 1 If $Dragon_Installed_x64 = 1 Or $Dragon_Installed_x86 = 1 Then $Dragon_Installed = 1 If Not FileExists(@ProgramFilesDir & "\Citrix\") then Exit IniWrite(@tempdir & "\ClientName.ini", "section1", "ClientName", $x86) IniWrite(@tempdir & "\ClientName.ini", "section2", "ClientName", $x64) Func Cleanup() FileDelete(@TempDir & '\ReceiverCleanupUtility.exe') ;File Cleanup FileDelete(@TempDir & '\CitrixUninstallPrevious.bat') ;File Cleanup EndFunc ;==>Cleanup ;File installation from executable FileInstall("C:\AutoItCitrix\CitrixUninstallPrevious.bat", @TempDir & "\", 0) FileInstall("C:\AutoItCitrix\ReceiverCleanupUtility.exe", @TempDir & "\", 0) ;This block will check for remotescan and if it exists then exits. If FileExists("C:\Program Files (x86)\RemoteScan Server\server.ini") Then Call("Cleanup") Exit ElseIf FileExists("C:\Program Files\RemoteScan Server\server.ini") Then Call("Cleanup") Exit Else EndIf ;Checks for Citrix receiver and exits if present. If $receiver_Present = 1 Then Call("Cleanup") Exit Else EndIf ;Checks for Citrix receiver and exits if present. If $receiver_Present_2 = 1 Then Call("Cleanup") Exit Else EndIf ;Checks for Citrix PNAgent 12.3.0.8 and if it exists then exits. While Not StringInStr($CmdLineRaw, 'Disable_12_3_Skip="True"', 0, 1) If $PNAgent_x64_Upgrade = "12.3.0.8" Then Call("Cleanup") Exit ElseIf $PNAgent_x86_Upgrade = "12.3.0.8" Then Call("Cleanup") Exit EndIf Wend ;Uninstall any previous citrix version FileChangeDir(@TempDir) RunWait(@ComSpec & " /c " & "CitrixUninstallPrevious.bat" & " /c ", "", @SW_HIDE) FileChangeDir(@TempDir) RunWait(@ComSpec & " /c " & "ReceiverCleanupUtility.exe" & " /silent ", "", @SW_HIDE) DirRemove(@ProgramsCommonDir & "\Citrix\", 1) Call("Cleanup") IniWrite(@TempDir & "\UninstallPrevious.ini", "section1", "Uninstall", "True") Shutdown(6) The script is working fine on my end but when some users at different sites try to run it the script will uninstall Citrix just fine but will not reboot and just sits in the task tray indefinitely. The majority of the issues are coming from Windows XP devices, Windows 7 devices seem to work just fine. Can anyone see anything glaringly wrong? Edited October 17, 2013 by PsychOfMSE
JohnOne Posted October 17, 2013 Posted October 17, 2013 I'd use TrayIconDebug option to see exactly where the script is hanging. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
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