why only first msi is getting installed??

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Message
Author
ak1990
Posts: 8
Joined: 12 Aug 2014 23:15

why only first msi is getting installed??

#1 Post by ak1990 » 12 Aug 2014 23:20

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???

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: why only first msi is getting installed??

#2 Post by foxidrive » 13 Aug 2014 01:35

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

ak1990
Posts: 8
Joined: 12 Aug 2014 23:15

Re: why only first msi is getting installed??

#3 Post by ak1990 » 13 Aug 2014 04:11

I am not getting any error while running this.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: why only first msi is getting installed??

#4 Post by foxidrive » 13 Aug 2014 04:13

So it ran ok.

ak1990
Posts: 8
Joined: 12 Aug 2014 23:15

Re: why only first msi is getting installed??

#5 Post by ak1990 » 13 Aug 2014 04:21

yes. But still installation of SQLNCLI MSI not happened.
Is there any way to force msi installation by ignoring errors?

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: why only first msi is getting installed??

#6 Post by foxidrive » 13 Aug 2014 04:35

What errors?

Compo
Posts: 600
Joined: 21 Mar 2014 08:50

Re: why only first msi is getting installed??

#7 Post by Compo » 13 Aug 2014 05:51

If necessary try including a logfile with sqlncli.msi by appending the following or similar:

Code: Select all

/Lie logfile.txt

ak1990
Posts: 8
Joined: 12 Aug 2014 23:15

Re: why only first msi is getting installed??

#8 Post by ak1990 » 13 Aug 2014 06:29

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.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: why only first msi is getting installed??

#9 Post by foxidrive » 13 Aug 2014 07:09

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 ?

ak1990
Posts: 8
Joined: 12 Aug 2014 23:15

Re: why only first msi is getting installed??

#10 Post by ak1990 » 13 Aug 2014 09:05

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

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: why only first msi is getting installed??

#11 Post by foxidrive » 13 Aug 2014 09:10

I asked a question above - and see this post:

viewtopic.php?p=36259#p36259

Compo
Posts: 600
Joined: 21 Mar 2014 08:50

Re: why only first msi is getting installed??

#12 Post by Compo » 13 Aug 2014 09:41

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

Dos_Probie
Posts: 233
Joined: 21 Nov 2010 08:07
Location: At My Computer

Re: why only first msi is getting installed??

#13 Post by Dos_Probie » 13 Aug 2014 17:03

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

Yury
Posts: 115
Joined: 28 Dec 2013 07:54

Re: why only first msi is getting installed??

#14 Post by Yury » 13 Aug 2014 21:55

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


???

ak1990
Posts: 8
Joined: 12 Aug 2014 23:15

Re: why only first msi is getting installed??

#15 Post by ak1990 » 14 Aug 2014 02:43

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

Post Reply