We help IT Professionals succeed at work.
Get Started

Batch Script Issue Question

robertarenson
on
168 Views
Last Modified: 2015-09-08
The script works fine up to the point where it is suppose to launch the installation process, it is not launching the CitrixReceiver.exe with all of its commands.

Issue:

echo Installing Citrix Receiver 4.1
c:\temp\CitrixReceiver.exe /silent /includeSSON ENABLE_SSON=yes STORE0="Store;https://xxxx.xxx.com/Citrix/xxxxxx/discovery;on; Citrix Applications" ALLOWADDSTORE=A STARTMENUDIR="CitrixApps" LEGACYFTAICONS=True ADDLOCAL=ReceiverInside,ICA_Client,SSON,AM,SELFSERVICE,USB,DesktopViewer,Flash,Vd3d

Script:

@echo off
PUSHD "%~dp0"
 
taskkill /im:ssonsvr.exe /f
taskkill /im:pnamain.exe /f
taskkill /im:wfcrun32.exe /f
taskkill /im:wfica32.exe /f

 
IF EXIST "%ALLUSERSPROFILE%\Citrix\Citrix online plug-inTrolleyExpress.exe" (
echo Uninstalling old Citrix client
"%ALLUSERSPROFILE%\Citrix\Citrix online plug-inTrolleyExpress.exe" /uninstall /cleanup
)

 
IF EXIST "C:\ProgramData\Citrix\Citrix online plug-in – webTrolleyExpress.exe" (
echo Uninstalling old Citrix client
"C:\ProgramData\Citrix\Citrix online plug-in – webTrolleyExpress.exe" /uninstall /cleanupFull
)

 
IF EXIST "C:\ProgramData\CitrixCitrix online plug-inTrolleyExpress.exe" (
echo Uninstalling old Citrix client
"C:\ProgramData\Citrix\Citrix online plug-inTrolleyExpress.exe" /uninstall /cleanup
)

 
IF EXIST "%ALLUSERSPROFILE%\Citrix\Citrix Receiver\TrolleyExpress.exe" (
echo Uninstalling old Citrix client
"%ALLUSERSPROFILE%\Citrix\Citrix Receiver\TrolleyExpress.exe" /uninstall /cleanup
)

IF EXIST "C:\ProgramData\Citrix\Citrix Receiver\TrolleyExpress.exe" (
echo Uninstalling old Citrix client
"C:\ProgramData\Citrix\Citrix Receiver\TrolleyExpress.exe" /uninstall /cleanup
)

::Checking Un-Install ICA_Client on 64-bit OS
 
reg query HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall{388C130B-0079-46B4-A0D5-DC2DD7A89A7B} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {388C130B-0079-46B4-A0D5-DC2DD7A89A7B} /QB
)

 
reg query HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall{DAA13EB6-C53F-4038-9880-C310500B49E9} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {DAA13EB6-C53F-4038-9880-C310500B49E9} /QB
)

reg query HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall{956F3E9A-3AED-40F8-8522-5F6A524CFC3E} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {956F3E9A-3AED-40F8-8522-5F6A524CFC3E} /QB
)

reg query HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall{8F5F8B07-50AC-401F-A441-A37740851A5C} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {8F5F8B07-50AC-401F-A441-A37740851A5C} /QB
)

reg query HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall{2C42ED1E-6315-4E63-89E6-057EA114EBB8} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {2C42ED1E-6315-4E63-89E6-057EA114EBB8} /QB
)

reg query HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall{76E4A642-BC3E-438A-8450-0C15A36B5B18l} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {76E4A642-BC3E-438A-8450-0C15A36B5B18l} /QB
)

reg query HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall{4E21223F-8D6C-446E-9CD3-587D206A8400} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {4E21223F-8D6C-446E-9CD3-587D206A8400} /QB
)

reg query HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall{E92B7A19-5FD5-4AEE-9FEF-7AD5DD3A675E} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {E92B7A19-5FD5-4AEE-9FEF-7AD5DD3A675E} /QB
)

reg query HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall{DF1D5FEC-D67C-43C8-9230-41F5DF350196} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {DF1D5FEC-D67C-43C8-9230-41F5DF350196} /QB
)

reg query HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall{D989BCC0-757C-4FB6-893C-512DF4382656} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {D989BCC0-757C-4FB6-893C-512DF4382656} /QB
)

reg query HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall{7A1FB67F-A340-472A-97C3-A6AFFE078AAE} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {7A1FB67F-A340-472A-97C3-A6AFFE078AAE} /QB
)

reg query HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall{B2AE44CB-2AAB-4C08-A54B-D264BD604DA8} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {B2AE44CB-2AAB-4C08-A54B-D264BD604DA8} /QB
)

reg query HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall{E89956F9-5B89-470E-818D-BD46102D0A01} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {E89956F9-5B89-470E-818D-BD46102D0A01} /QB
)

reg query HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall{42ACCB45-3363-47E0-94E9-F0074CC8BC56} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {42ACCB45-3363-47E0-94E9-F0074CC8BC56} /QB
)

reg query HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall{2624B680-02BC-4CBC-839C-DA20DF6EF6EC} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {2624B680-02BC-4CBC-839C-DA20DF6EF6EC} /QB
)

reg query HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall{331741EC-DD63-4DA8-957E-D0C70412EF54} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {331741EC-DD63-4DA8-957E-D0C70412EF54} /QB
)

reg query HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall{388C130B-0079-46B4-A0D5-DC2DD7A89A7B} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {388C130B-0079-46B4-A0D5-DC2DD7A89A7B} /QB
)

::Checking Un-Install ICA_Client on 32-bit OS
 
reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{388C130B-0079-46B4-A0D5-DC2DD7A89A7B} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {388C130B-0079-46B4-A0D5-DC2DD7A89A7B} /QB
)

 
reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{DAA13EB6-C53F-4038-9880-C310500B49E9} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {DAA13EB6-C53F-4038-9880-C310500B49E9} /QB
)

reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{956F3E9A-3AED-40F8-8522-5F6A524CFC3E} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {956F3E9A-3AED-40F8-8522-5F6A524CFC3E} /QB
)

reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{8F5F8B07-50AC-401F-A441-A37740851A5C} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {8F5F8B07-50AC-401F-A441-A37740851A5C} /QB
)

reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{2C42ED1E-6315-4E63-89E6-057EA114EBB8} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {2C42ED1E-6315-4E63-89E6-057EA114EBB8} /QB
)

reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{76E4A642-BC3E-438A-8450-0C15A36B5B18l} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {76E4A642-BC3E-438A-8450-0C15A36B5B18l} /QB
)

reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{4E21223F-8D6C-446E-9CD3-587D206A8400} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {4E21223F-8D6C-446E-9CD3-587D206A8400} /QB
)

reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{E92B7A19-5FD5-4AEE-9FEF-7AD5DD3A675E} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {E92B7A19-5FD5-4AEE-9FEF-7AD5DD3A675E} /QB
)

reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{DF1D5FEC-D67C-43C8-9230-41F5DF350196} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {DF1D5FEC-D67C-43C8-9230-41F5DF350196} /QB
)

reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{D989BCC0-757C-4FB6-893C-512DF4382656} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {D989BCC0-757C-4FB6-893C-512DF4382656} /QB
)

reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{7A1FB67F-A340-472A-97C3-A6AFFE078AAE} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {7A1FB67F-A340-472A-97C3-A6AFFE078AAE} /QB
)

reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{B2AE44CB-2AAB-4C08-A54B-D264BD604DA8} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {B2AE44CB-2AAB-4C08-A54B-D264BD604DA8} /QB
)

reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{E89956F9-5B89-470E-818D-BD46102D0A01} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {E89956F9-5B89-470E-818D-BD46102D0A01} /QB
)

reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{42ACCB45-3363-47E0-94E9-F0074CC8BC56} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {42ACCB45-3363-47E0-94E9-F0074CC8BC56} /QB
)

reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{2624B680-02BC-4CBC-839C-DA20DF6EF6EC} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {2624B680-02BC-4CBC-839C-DA20DF6EF6EC} /QB
)

reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{331741EC-DD63-4DA8-957E-D0C70412EF54} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {331741EC-DD63-4DA8-957E-D0C70412EF54} /QB
)

reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{388C130B-0079-46B4-A0D5-DC2DD7A89A7B} /v UninstallString >NUL 2>&1
if %ERRORLEVEL%==0 (
echo Uninstalling old citrix client...
MsiExec.exe /X {388C130B-0079-46B4-A0D5-DC2DD7A89A7B} /QB
)
 
echo Installing Citrix Receiver 4.1
c:\temp\CitrixReceiver.exe /silent /includeSSON ENABLE_SSON=yes STORE0="Store;https://xxxx.xxx.com/Citrix/xxxxxx/discovery;on; Citrix Applications" ALLOWADDSTORE=A STARTMENUDIR="CitrixApps" LEGACYFTAICONS=True ADDLOCAL=ReceiverInside,ICA_Client,SSON,AM,SELFSERVICE,USB,DesktopViewer,Flash,Vd3d
REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Citrix\AuthManager /v ConnectionSecurityMode /t REG_SZ /d Any /f
REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Policies\Citrix /f /v EnableFTU /t REG_DWORD /d 0
REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432NODE\Citrix\Dazzle /f /v UseCategoryAsStartMenuPath /t REG_SZ /d True
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432NODE\Policies\Citrix\ICA Client\SSON" /f /v "Enable" /t REG_SZ /d "true"
REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\AuthManager /v ConnectionSecurityMode /t REG_SZ /d Any /f
REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Citrix /f /v EnableFTU /t REG_DWORD /d 0
REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\Dazzle /f /v UseCategoryAsStartMenuPath /t REG_SZ /d True
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Citrix\ICA Client\SSON" /f /v "Enable" /t REG_SZ /d "true"
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\xxxxx.xxxx.com"  /f /v "*" /t REG_DWORD /d 1

@IF EXIST reg.exe "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Citrix\ICA Client\Engine\Lockdown Profiles" (
    ::Deleting Lockdown Profiles on 64-bit OS
    reg.exe delete "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Citrix\ICA Client\Engine\Lockdown Profiles" /f >NUL
) ELSE (
    ::Deleting Lockdown Profiles on 32-bit OS
    reg.exe delete "HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\ICA Client\Engine\Lockdown Profiles" /f >NUL
)
—————————————————-end script———————————————————————
pause
:end
Comment
Watch Question
CERTIFIED EXPERT
Most Valuable Expert 2019
Most Valuable Expert 2018
Commented:
This problem has been solved!
Unlock 1 Answer and 4 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE