Batch Datei in Setup.inf aufrufen

Post Reply
John Carmack
Posts: 53
Joined: 11. Nov 2011, 15:12
Contact:

Batch Datei in Setup.inf aufrufen

Post by John Carmack » 29. May 2013, 17:35

Hallo Leute,

Ich habe hier die Software QuickTestPro von HP über die beiliegende MSI Datei paketiert.

Hier die Setup.inf

Code: Select all


[SetupInfo]
Author                  =administrator
CreationDate            =29.05.2013 10:11:09 
InventoryID             =
Description             = 
Method                  = MSI
Tested on               = 
Dependencies            = 
Command line options    =/S2
Last Change             = 
Build                   = 

[VarDefInfo]
; <Variable>, <Type: 0=Computer 1=User>, <Allow NULL values: 0=No 1=Yes>

[Setup]
Version=14.2
ShowCaption=1
BlockInput=0
Platform=*

[Requirements]

[Application]
ProductName=HP QuickTest Professional
DeveloperName=HP
Version=11.00.0000
Revision=0
SetupName=%ProductName% %Version% %SetupWizard%
Text1="%ProductName% %Version%",         Arial,           30, , 00FFFF, 4,    , LEFT BOLD ITALIC
Text2="%DeveloperName%",                 Arial,           24, , 00FFFF, 4,    , LEFT BOLD ITALIC
Text8="%Company%",                       Arial,           18, , 00FFFF, 4,  10, RIGHT BOLD ITALIC
Text9="%InstallationFor% %WindowsUser%", Arial,           16, , 007F00, 4, -18, BOTTOM ITALIC LEFT
BackgroundColor=FF0000,000000
CopyDialogRect=0%, 77%, 100%, 100%, HCENTER
UserKeyName=%DeveloperName%\%ProductName%
MachineKeyName=%DeveloperName%\%ProductName%\%Version%
UninstallKeyName=%DeveloperName% %ProductName% %Version%
UninstallDisplayName=%ProductName% %Version%
UninstallString=%ReinstallString% /U
ReinstallString="%CommonSetupDir%\Setup.exe" "%App%\%SetupInfDir%\Setup.inf"
ReinstallMode=1
SrcDir=..
ApplicationDir=%ProgramFilesDir%\%ProductName%
SetupInfDir=Install
DataDir=%Personal%
AskUninstallOld=1
ShellLinks=1
CommonShellLinks=1
CreateUnresolvableShellLinks=1
UseStringSection=Strings:09
UseSysStringSection=SysStrings:09
DateWarning=1
SizeWarning=0
Reboot=0
PreventExternalReboot=1
StartServicesOnReboot=0
CallTimeOut=3600
AbortAfterCallTimeOut=1
DisableCancelButton=1
ShowEndMessage=1
EndMessage=%EndMessageDesc%


[Strings:07]
Disk1=Installationsmedium 1
EndMessageDesc=Die Installation wurde erfolgreich abgeschlossen!
ErrorLogMessage=Die Installation/Deinstallation wurde mit einer Fehlermeldung abgebrochen!
InstallationFor=Installation für:
InstallerDesc=Dienstprogramm zum Installieren einzelner Komponenten.
InstallerName=Installationsprogramm
SetupWizard=Installations-Assistent
Uninstallation=deinstallieren

[Strings:09]
Disk1=Installation media 1
EndMessageDesc=Installation was completed successfully!
ErrorLogMessage=The installation/uninstallation aborted with an error message!
InstallationFor=Installation for:
InstallerDesc=Service program to install single components.
InstallerName=Setup program
SetupWizard=Installation Wizard
Uninstallation=Uninstallation

[SysStrings:07]
Users=Benutzer

[SysStrings:09]
Users=Users

[Environment]
V_MSIInstallerID=E178DCE31F606EA4D826D3D6E310C6B8
ReInstSuccessMessage1031=Die Konfiguration wurde erfolgreich abgeschlossen.
ReInstSuccessMessage1031_1=Die Konfiguration wurde abgeschlossen.
ReInstSuccessMessage1033=Configuration completed successfully.
ReInstSuccessMessage1033_1=Configuration completed.
MSILogFile=%Temp%\MSI_%ProductName%.%Version%.%Revision%.log
CommonSetupDir=%CommonFilesDir%\Setup%SetupBits%
V_MachineValuesPath=\\%EmpirumServer%\Values$\MachineValues\%DomainName%
V_UserValuesPath=%HKLM,"Software\matrix42\Software Depot","HomeServer"%\Values$\UserValues\%UserDomain%

; Maschinenabhängige Variablen
; machine dependent variables
;VM_<Variable>=%%%V_MachineValuesPath%\%ComputerName%.ini,%ComputerName%,<Variable>%%

; Userabhängige Variablen
; user dependent variables
;VU_<Variable>=%%%V_UserValuesPath%\%WindowsUser%.ini,%WindowsUser%,<Variable>%%

; !!! Setzen der entsprechenden ReplaceEnv Befehle für die Variablen im Abschnitt [Product] nicht vergessen!!!
; !!! Don't forget to set the appropriate ReplaceEnv instructions for the variables in the section [Product]!!!

[Encryption]

[Disks]
1=%Disk1%

[Options]
Installer = %InstallerName%, COPYALWAYS, Installer, "%InstallerDesc%"
Product   = %ProductName%,   COPYALWAYS, Product,   "%ProductDesc%"

[Installer]
1:..\..\..\..\User\Setup.exe,          %CommonSetupDir%, OPTIONAL USEFILENAME DIRECTORY NOSIZEWARNING SETUP, 0
1:..\..\..\..\User\SetupDeu.chm,       %CommonSetupDir%, OPTIONAL USEFILENAME DIRECTORY NOSIZEWARNING SETUP, 0
1:..\..\..\..\User\SetupEnu.chm,       %CommonSetupDir%, OPTIONAL USEFILENAME DIRECTORY NOSIZEWARNING SETUP, 0
1:..\..\..\..\User\Mx42SynSem.dll,     %System%,         OPTIONAL USEFILENAME DIRECTORY NOSIZEWARNING SETUP WINDOWS32, 0
1:..\..\..\..\User\x64\Mx42SynSem.dll, %System%,         OPTIONAL USEFILENAME DIRECTORY NOSIZEWARNING SETUP WINDOWS64, 0
1:%SetupInfDir%\Setup.inf,                             , NORMAL,                                             0
1:%Temp%\Setup64.exe,                  %CommonSetupDir%\Setup.exe, OPTIONAL NOSIZEWARNING SETUP ALWAYS WINDOWS64,      0

[FileCheckMachine]
ReplaceEnv V_MachineValuesPath
If DoesFileExist ("%V_MachineValuesPath%\%ComputerName%.ini") == "0" Then "FileIsntThere" EndIf

[FileCheckClient]
ReplaceEnv V_UserValuesPath
If "%UserDomain%" <> "%ComputerName%" Then "CheckClientFile" EndIf

[CheckClientFile]
If DoesFileExist ("%V_UserValuesPath%\%WindowsUser%.ini") == "0" Then "FileIsntThere" EndIf

[FileIsntThere]
ErrorLogMsg Values$\MachineValues\%DomainName%\%ComputerName%.ini or Values$\UserValues\%UserDomain%\%WindowsUser%.ini not found!
Abort

[Product]
;#FileCheckMachine, MACHINE
;#FileCheckClient, CLIENT
;ReplaceEnv <Variable>

#Set:Product, DONTDELETE
#Reg:OnUninstallProduct, DELETE
#Reg:Product, DONTDELETE
#Ini:Product, DONTDELETE
#Security:Product
#Set:Uninstall, DELETE
#Set:ChangeMSISourcelist, DONTDELETE

[Set:Product]
Del "%MSILogFile%"
If DoesRegKeyExist ("HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{3ECD871E-06F1-4AE6-8D62-3D6D3E016C8B},UnInstallString") == "1" | DoesRegKeyExist ("HKLM,SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{3ECD871E-06F1-4AE6-8D62-3D6D3E016C8B},UnInstallString") == "1" Then "RepairMSI" Else "InstallMSI" EndIf

[RepairMSI]
AddMeter -1
Call MsiExec /Fvomus "%SRC%\HP_QuickTest_Professional.msi"   REBOOT=REALLYSUPPRESS ARPSYSTEMCOMPONENT=1 /qr /Li "%MSILogFile%"
If %ErrorLevel% == "3010" Then "RebootRequired" EndIf
If DoesTextInFileExist ("%ReInstSuccessMessage1031%", "%MSILogFile%") == "0" & DoesTextInFileExist ("%ReInstSuccessMessage1031_1%", "%MSILogFile%") == "0" & DoesTextInFileExist ("%ReInstSuccessMessage1033%", "%MSILogFile%") == "0" & DoesTextInFileExist ("%ReInstSuccessMessage1033_1%", "%MSILogFile%") == "0" Then "AbortMSIInst" EndIf
Del "%MSILogFile%"

[InstallMSI]
AddMeter -1
Call MsiExec /I "%SRC%\HP_QuickTest_Professional.msi"   REBOOT=REALLYSUPPRESS ARPSYSTEMCOMPONENT=1 /qr /Li "%MSILogFile%"
If %ErrorLevel% == "3010" Then "RebootRequired" EndIf
If DoesRegKeyExist ("HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{3ECD871E-06F1-4AE6-8D62-3D6D3E016C8B},UnInstallString") == "0" & DoesRegKeyExist ("HKLM,SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{3ECD871E-06F1-4AE6-8D62-3D6D3E016C8B},UnInstallString") == "0" Then "AbortMSIInst" EndIf
Del "%MSILogFile%"

[Set:Uninstall]
-Del "%MSILogFile%"
If DoesRegKeyExist ("HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{3ECD871E-06F1-4AE6-8D62-3D6D3E016C8B},UnInstallString") == "1" | DoesRegKeyExist ("HKLM,SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{3ECD871E-06F1-4AE6-8D62-3D6D3E016C8B},UnInstallString") == "1" Then "AbortMSIUnInst" EndIf
If %ErrorLevel% == "3010" Then "RebootRequired" EndIf
-Call MsiExec /X {3ECD871E-06F1-4AE6-8D62-3D6D3E016C8B} REBOOT=REALLYSUPPRESS /qr /Li "%MSILogFile%"
-AddMeter -1

[RebootRequired]
SetReboot 1

[AbortMSIInst]
ErrorLogMsg %ErrorLogMessage% ErrorLevel: %ErrorLevel%
Abort

[AbortMSIUnInst]
-Abort
-ErrorLogMsg %ErrorLogMessage% ErrorLevel: %ErrorLevel%

[SET:ChangeMSISourcelist]
ReplaceRegValue (HKCR,"Installer\Products\%V_MSIInstallerID%\Sourcelist","LastUsedSource","\\%EmpirumServer%","\\%%EmpirumServer%%", 1)
ReplaceRegValue (HKCR,"Installer\Products\%V_MSIInstallerID%\Sourcelist\Net","1","\\%EmpirumServer%","\\%%EmpirumServer%%", 1)

[Reg:OnUninstallProduct]

[Reg:Product]

[Ini:Product]

[Security:Product]

[Shell:Product]


Um QuickTestPro überhaupt installieren zu können brauche ich allerdings Software (zB. vcredist usw...) die vorher installiert sein muss damit "QTP" überhaupt installierbar ist.

Dazu hab ich mir eine Batch Datei gebaut die die Software nacheinander installiert.

An welche Stelle in der Setup.inf setze ich den Aufruf auf die Batch Datei damit das auch vorher installiert wird?

Code: Select all

Call "%SRC%\QTP_Requirements_Installer\Install.bat"

Hab schon ein wenig rumprobiert aber egal wohin ich den Aufruf setze starten beide Installationen (HP_QuickTest_Professional.msi und Install.bat) gleichzeitig.
Dementsprechend bricht alles ab da QTP ohne das die Anforderungen vorher installiert sein müssen nicht installierbar ist.


Danke!

User avatar
Hendrik_Ambrosius
Moderator
Moderator
Posts: 7962
Joined: 13. Dec 2004, 23:10
Location: Adendorf/Lüneburg

Re: Batch Datei in Setup.inf aufrufen

Post by Hendrik_Ambrosius » 30. May 2013, 09:24

Versuchen Sie mal call cmd.exe /c<batchfile>

Generell würde ich das NICHT in das Paket einbauen sondern separate Pakete erstellen und Abhängigkeiten definieren.
Hendrik Ambrosius / Senior Presales Consultant
Mobile: +49 172 408 4447 | hendrik.ambrosius@matrix42.com
Matrix42 GmbH | Elbinger Straße 7 | 60487 Frankfurt am Main | Germany | www.matrix42.com

Disclaimer: I participate in this forum on a voluntary basis. Views expressed are not necessarily those of Matrix42 or of the support team.

marc.schneider
Posts: 224
Joined: 29. Mar 2010, 12:26
Location: Magdeburg
Contact:

Re: Batch Datei in Setup.inf aufrufen

Post by marc.schneider » 30. May 2013, 14:46

Hallo John Carmack,

poste doch mal die Batch. Die scheint nämlich nicht auf die Ausführung der Programme zu warten und gibt die Steuerung sofort wieder an die setup.inf zurück.
Ich tippe evtl. darauf, dass Du auch in der Batch die Programme mit "Call" aufrufst...???

Beste Grüße aus Magdeburg
Marc
--
Ärztekammer Sachsen-Anhalt
39120 Magdeburg
http://www.aeksa.de
--

John Carmack
Posts: 53
Joined: 11. Nov 2011, 15:12
Contact:

Re: Batch Datei in Setup.inf aufrufen

Post by John Carmack » 03. Jun 2013, 14:29

@ Hendrik Ambrosius

Hallo, und danke für den Tipp...
Nur leider hab ich das noch nie gemacht und ich weiß leider auch nicht wie ich Abhängigkeiten definiere!



@ Marc Schneider

Hier die batch Datei.
Die "Abhängigkeiten" werden ganz einfach nacheinander installiert!

Code: Select all

cd "%src%\QTP_Requirements_Installer\1_vcredist_2005_x86QTP(8.0.59193)"
vcredist.msi /passive /norestart

cd "%src\QTP_Requirements_Installer\2_vstor3.0(9.0.21022.123)"
trin_trir.msi /passive /norestart

cd "%src\QTP_Requirements_Installer\3_vstor3.0SP1-KB949258-x86-(9.0.30729.1)"
HotFixInstaller.exe /passive /norestart

cd "%src\QTP_Requirements_Installer"

"4_Microsoft Script Debugger10en.exe" /q

MSIEXEC.EXE /i "5_WSE 3.0 for Microsoft .NET Redistributable Runtime MSI.msi" ALLUSERS=1 /q/n

"6_soapsdk.msi" /passive /norestart

Die Programme rufe ich nicht mit "Call" auf - Aber die Batch datei in der Setup.inf:

Code: Select all

[InstallMSI]
AddMeter -1

Call "%src%\QTP_Requirements_Installer\install.bat"

Call MsiExec /I "%SRC%\HP_QuickTest_Professional.msi"   REBOOT=REALLYSUPPRESS ARPSYSTEMCOMPONENT=1 /qr /Li "%MSILogFile%"
If %ErrorLevel% == "3010" Then "RebootRequired" EndIf
If DoesRegKeyExist ("HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{3ECD871E-06F1-4AE6-8D62-3D6D3E016C8B},UnInstallString") == "0" & DoesRegKeyExist ("HKLM,SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{3ECD871E-06F1-4AE6-8D62-3D6D3E016C8B},UnInstallString") == "0" Then "AbortMSIInst" EndIf
Del "%MSILogFile%"
Jedenfalls startet beides gleichzeitig!
Die "Install.bat" und die eigentliche QTP Installation...
Last edited by John Carmack on 03. Jun 2013, 14:52, edited 1 time in total.

User avatar
r.wiegel
Posts: 896
Joined: 05. Feb 2010, 13:45
Location: Regensburg
Contact:

Re: Batch Datei in Setup.inf aufrufen

Post by r.wiegel » 03. Jun 2013, 14:50

%src%\

kennt das Batch-Script die Variable %SRC% oder muss der Wert übergeben werden?
Das lässt sich mit mit der Echo-Ausgabe im Script prüfen:
echo %src%
pause
Viele Grüße
Roman Wiegel
IT-Consultant

MR Datentechnik - Vertriebs- und Service GmbH

John Carmack
Posts: 53
Joined: 11. Nov 2011, 15:12
Contact:

Re: Batch Datei in Setup.inf aufrufen

Post by John Carmack » 03. Jun 2013, 14:52

Hi,

Sorry...

das "Call ""%src\QTP_Requirements_Installer\install.bat""
hab ich grad per Hand nachgetragen.... Das ist kein Copy&Paste aus der Batch Datei.
Somit mein Fehler und kein Fehler in der Setup.inf bzw Batch Datei.

Die BatchDatei funktioniert!
Die Setup.inf funktioniert!

Nur beides in einem und nacheinander geht nicht!
Es wird beides gleichzeitig ausgeführt....

marc.schneider
Posts: 224
Joined: 29. Mar 2010, 12:26
Location: Magdeburg
Contact:

Re: Batch Datei in Setup.inf aufrufen

Post by marc.schneider » 03. Jun 2013, 15:11

Hallo,
versuch mal, in die Batch ein paar DEBUG-Infos einzubauen. So z.B.

Code: Select all

    cd "%src%\QTP_Requirements_Installer\1_vcredist_2005_x86QTP(8.0.59193)"

rem zeigt den aktuellen Pfad an
cd

rem startet das Programm "separat" und wartet auf das Ausführungsende
start /WAIT vcredist.msi /passive /norestart

rem Hier sollte eine "0" erscheinen
echo Error: %ERRORLEVEL%
pause

rem ...und so weiter ;-)

    cd "%src\QTP_Requirements_Installer\2_vstor3.0(9.0.21022.123)"
    trin_trir.msi /passive /norestart

    cd "%src\QTP_Requirements_Installer\3_vstor3.0SP1-KB949258-x86-(9.0.30729.1)"
    HotFixInstaller.exe /passive /norestart

    cd "%src\QTP_Requirements_Installer"

    "4_Microsoft Script Debugger10en.exe" /q

    MSIEXEC.EXE /i "5_WSE 3.0 for Microsoft .NET Redistributable Runtime MSI.msi" ALLUSERS=1 /q/n

    "6_soapsdk.msi" /passive /norestart
Nun solltest Du auf jeden Fall sehen, woran es liegt.

Viel Erfolg
Marc
--
Ärztekammer Sachsen-Anhalt
39120 Magdeburg
http://www.aeksa.de
--

John Carmack
Posts: 53
Joined: 11. Nov 2011, 15:12
Contact:

Re: Batch Datei in Setup.inf aufrufen

Post by John Carmack » 05. Jun 2013, 13:32

Hi,
danke erst mal...

@ Marc

warum sollte ich das machen?

Die Batch Datei funktioniert an sich einwandfrei!
Die Setup.inf mit der (msi) QTP Installation (ohne "Call" auf die Batch) funktioniert auch.

Nur sobad ich in die Setup.inf einen Call auf die Batch Datei starte und die Setup.inf danach ausführe starten beide installationen gleichzeitig.

Warum?

marc.schneider
Posts: 224
Joined: 29. Mar 2010, 12:26
Location: Magdeburg
Contact:

Re: Batch Datei in Setup.inf aufrufen

Post by marc.schneider » 05. Jun 2013, 15:05

...naja, weil z.B. im falschen Verzeichnis gestartet wird, eine Variable fehlt oder oder oder. Das würde man dann evtl. sehen ;-)

Beste Grüße
Marc
--
Ärztekammer Sachsen-Anhalt
39120 Magdeburg
http://www.aeksa.de
--

John Carmack
Posts: 53
Joined: 11. Nov 2011, 15:12
Contact:

Re: Batch Datei in Setup.inf aufrufen

Post by John Carmack » 06. Jun 2013, 16:32

Jetzt verstehe ich es :lol:

Es geht! (falscher Pfad :oops: )

@ Hendrik Ambrosius

Wo kann ich mir das "definieren von Abhängigkeiten" anschauen?
Wie geht das bzw wo kann ich mir das durchlesen?

DANKE!!!

User avatar
Hendrik_Ambrosius
Moderator
Moderator
Posts: 7962
Joined: 13. Dec 2004, 23:10
Location: Adendorf/Lüneburg

Re: Batch Datei in Setup.inf aufrufen

Post by Hendrik_Ambrosius » 06. Jun 2013, 22:04

Hendrik Ambrosius / Senior Presales Consultant
Mobile: +49 172 408 4447 | hendrik.ambrosius@matrix42.com
Matrix42 GmbH | Elbinger Straße 7 | 60487 Frankfurt am Main | Germany | www.matrix42.com

Disclaimer: I participate in this forum on a voluntary basis. Views expressed are not necessarily those of Matrix42 or of the support team.

marc.schneider
Posts: 224
Joined: 29. Mar 2010, 12:26
Location: Magdeburg
Contact:

Re: Batch Datei in Setup.inf aufrufen

Post by marc.schneider » 07. Jun 2013, 08:45

Prima! Es sind immer die einfachen Sachen, die einen aufhalten!

Beste Grüße aus Magdeburg in der Elbe :(
Marc
--
Ärztekammer Sachsen-Anhalt
39120 Magdeburg
http://www.aeksa.de
--

Post Reply

Return to “Paketierung”

Who is online

Users browsing this forum: No registered users and 10 guests