Page 1 of 2

why only first msi is getting installed??

Posted: 12 Aug 2014 23:20
by ak1990
Hi my batch file is as below. Here first msi installation is getting successful but second msi file is not getting installed.

@echo Removing Old versions of IndCas Controls:
@echo .
@ECHO Removing Old version of IndCas
RMDIR "%ALLUSERSPROFILE%\start Menu\Programs\RBCI Individual Cas\" /S /Q

@echo Installing updated IndCas:
MD "%ALLUSERSPROFILE%\Start Menu\Programs\RBCI Individual Cas"
COPY "\\s3w01234\apps\yyb0\ClientSetup_Migration\shortcut\*.*" "%ALLUSERSPROFILE%\start Menu\Programs\RBCI Individual Cas" /Y

msiexec.exe /i "\\s3w01234\Apps\YYB0\ClientSetup_Migration\Client Components\SQLNC\Win7\sqlncli.msi" ALLUSERS=1 /q /norestart
msiexec.exe /i "\\s3w01234\Apps\YYB0\ClientSetup_Migration\Client Components\PBCLTRT125.msi" ALLUSERS=1 /q /norestart


What changes are required here???

Re: why only first msi is getting installed??

Posted: 13 Aug 2014 01:35
by foxidrive
Test this and report any error messages on the console. It will pause after each msiexec command.

Code: Select all

@echo Removing Old versions of IndCas Controls:
@echo .
@ECHO Removing Old version of IndCas
RMDIR "%ALLUSERSPROFILE%\start Menu\Programs\RBCI Individual Cas\" /S /Q

@echo Installing updated IndCas:
MD "%ALLUSERSPROFILE%\Start Menu\Programs\RBCI Individual Cas"
COPY "\\s3w01234\apps\yyb0\ClientSetup_Migration\shortcut\*.*" "%ALLUSERSPROFILE%\start Menu\Programs\RBCI Individual Cas" /Y

msiexec.exe /i "\\s3w01234\Apps\YYB0\ClientSetup_Migration\Client Components\SQLNC\Win7\sqlncli.msi" ALLUSERS=1 /q /norestart
pause
msiexec.exe /i "\\s3w01234\Apps\YYB0\ClientSetup_Migration\Client Components\PBCLTRT125.msi" ALLUSERS=1 /q /norestart
pause

Re: why only first msi is getting installed??

Posted: 13 Aug 2014 04:11
by ak1990
I am not getting any error while running this.

Re: why only first msi is getting installed??

Posted: 13 Aug 2014 04:13
by foxidrive
So it ran ok.

Re: why only first msi is getting installed??

Posted: 13 Aug 2014 04:21
by ak1990
yes. But still installation of SQLNCLI MSI not happened.
Is there any way to force msi installation by ignoring errors?

Re: why only first msi is getting installed??

Posted: 13 Aug 2014 04:35
by foxidrive
What errors?

Re: why only first msi is getting installed??

Posted: 13 Aug 2014 05:51
by Compo
If necessary try including a logfile with sqlncli.msi by appending the following or similar:

Code: Select all

/Lie logfile.txt

Re: why only first msi is getting installed??

Posted: 13 Aug 2014 06:29
by ak1990
Hi

I have change my batch as follows.

@echo Removing Old versions of IndCas Controls:
@echo .
@ECHO Removing Old version of IndCas
RMDIR "%ALLUSERSPROFILE%\start Menu\Programs\RBCI Individual Cas\" /S /Q

@echo Installing updated IndCas:
MD "%ALLUSERSPROFILE%\Start Menu\Programs\RBCI Individual Cas"
COPY "\\s3w05430\apps\YYB0\ClientSetup_Migration_New\shortcut\*.*" "%ALLUSERSPROFILE%\start Menu\Programs\RBCI Individual Cas" /Y

msiexec.exe /i "\\s3w05430\apps\YYB0\ClientSetup_Migration_New\win7_new\sqlncli.msi" ALLUSERS=1 /q /norestart
msiexec.exe /i "\\s3w05430\apps\YYB0\ClientSetup_Migration_New\RBCIIndCas_Win7\PBCLTRT125.msi" ALLUSERS=1 /q /norestart

Here i am not getting any errors but slqncli.msi is not getting installed..
What should i change in my batch code.?
P.S: After adding "pause" also result is same.

Re: why only first msi is getting installed??

Posted: 13 Aug 2014 07:09
by foxidrive
Take out the /q from both msiexec lines and add pause after each one.

Run the batch file and then look at the screen to see what it displayed when you run it.

What have you called the batch file? Have you called it msiexec.bat ?

Re: why only first msi is getting installed??

Posted: 13 Aug 2014 09:05
by ak1990
If i remove /q then it will display user interface and installation will be successful but as per client's demand we dont want to display these user interface option while installation

Re: why only first msi is getting installed??

Posted: 13 Aug 2014 09:10
by foxidrive
I asked a question above - and see this post:

viewtopic.php?p=36259#p36259

Re: why only first msi is getting installed??

Posted: 13 Aug 2014 09:41
by Compo
The problem as I see it, even though you didn't bother using a log file in order to identify a problem is that the file you are installing has a EULA which requires acceptance. For this you will need to include the following:

Code: Select all

IACCEPTSQLNCLILICENSETERMS=YES

Re: why only first msi is getting installed??

Posted: 13 Aug 2014 17:03
by Dos_Probie
Well you have been given excellent advise and you seem to either don't understand or just choose to ignore it.
Foxidrive has stated to remove the quiet switch "/q" with a pause to see what the error is and Compo has advised you to add the log switch to spot any installer errors and also to use a eula switch. I am not aware of the "/norestart" switch with a .msi file but am with a .msu file which you are not installing, also If you don't want any UI displayed and Quiet you should be using "/qn" switch with the eula switch to avoid any user interaction.

~DP

Re: why only first msi is getting installed??

Posted: 13 Aug 2014 21:55
by Yury

Code: Select all

start "" /wait msiexec.exe /i "\\s3w01234\Apps\YYB0\ClientSetup_Migration\Client Components\SQLNC\Win7\sqlncli.msi" ALLUSERS=1 /q /norestart
start "" msiexec.exe /i "\\s3w01234\Apps\YYB0\ClientSetup_Migration\Client Components\PBCLTRT125.msi" ALLUSERS=1 /q /norestart


???

Re: why only first msi is getting installed??

Posted: 14 Aug 2014 02:43
by ak1990
Hi

I have updated my code as follows

Code: Select all

@echo Removing Old versions of IndCas Controls:
@echo .
@ECHO Removing Old version of IndCas
RMDIR "%ALLUSERSPROFILE%\start Menu\Programs\RBCI Individual Cas\" /S /Q

@echo Installing updated IndCas:
MD "%ALLUSERSPROFILE%\Start Menu\Programs\RBCI Individual Cas"
COPY "\\s3w05430\apps\YYB0\ClientSetup_Migration_New\shortcut\*.*"  "%ALLUSERSPROFILE%\start Menu\Programs\RBCI Individual Cas" /Y

start "" /wait msiexec.exe /i "\\s3w05430\apps\YYB0\ClientSetup_Migration_New\win7_new\sqlncli.msi" ALLUSERS=1 IACCEPTSQLNCLILICENSETERMS=YES /qn /norestart
start "" msiexec.exe /i "\\s3w05430\apps\YYB0\ClientSetup_Migration_New\RBCIIndCas_Win7\PBCLTRT125.msi" ALLUSERS=1 /q /norestart



MOD EDIT: PLEASE USE CODE TAGS!!!!!!

Here SQLNCLI.msi is getting installed but PBCLTRT125.msi is not installed.
When I manually tried to install it I got one error message with "Retry", "Ignore" and "cancel" button stating that pbjvm125.dll is file is missing. By clicking on IGNORE its getting installed and working successfully. What code should I add to do That?

As per Client's demand he dont want UI while running batch file.
How to create "log file"?
P.S: This is the first batch file I created till now so I have no technical knowledge about it.

Thanks in Advance.

AK