Call(Hidden) schlägt fehl

Post Reply
SBSTN
Posts: 3
Joined: 14. Jun 2018, 10:55
Contact:

Call(Hidden) schlägt fehl

Post by SBSTN » 20. Jan 2021, 11:36

Hallo Zusammen,
Ich baue gerade an einem Paket welches unsere diversen Dell Laptops mit BIOS Updates versorgen soll.
(Vollständige Setup.inf am Ende dieses Posts.)

Ursprünglich habe ich mit einer Ablage der BIOS Updates auf unserem Fileserver gearbeitet, sodass die Variable BIOSUpdatePath dorthin zeigte. Die Tests mit dieser Variante verliefen erfolgreich.
Da zum Installationszeitpunkt aber nicht immer eine Netzwerkverbindung besteht, bin ich davon abgewichen und kopiere alle verfügbaren Updates mit auf den Client. Seit dieser Anpassung schlägt die Ausführung in der folgenden Zeile mit einem Fehlercode 2 fehl.

Code: Select all

CallHidden %BiosUpdatePath% /s /l="%LogPath%\BiosUpdate.log"
Ich sehe dass die Variable korrekt befüllt wird, dennoch läuft der Call(Hidden) Aufruf auf einen Fehler.
In einer anderen Revision habe ich versucht die BIOS Datei in das %APP% Verzeichnis zu kopieren sobald das Modell identifiziert wurde, aber auch hier scheitert es an der Ausführung.
Als Gegentest habe ich die BIOS Datei mit einer Notepad.exe ersetzt, das änderte jedoch nichts am Ergebnis.

Mittlerweile glaube Ich dass Ich betriebsblind geworden bin und irgendetwas übersehe.
- Berechtigungen passen
- Dateinamen und Pfade sind korrekt
- Dateien sind intakt

Ich würde mich über jeglichen Input freuen, vielleicht findet sich ja noch jemand der dieses Problem schon gelöst hat!

Hier die vollständige Setup.inf:

Code: Select all

[SetupInfo]
Author                  = SNIP
CreationDate            = 14.01.2021
InventoryID             = 
Description             = This package installs BIOS Updates for Dell laptops.
Method                  = 
Tested on               = 
Dependencies            = 
Command line options    = 
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=BIOS Updater
DeveloperName=Dell
Version=0.1
Revision=0
SetupName=%ProductName% %Version% %SetupWizard%
Text1="%ProductName% %Version%",         Arial,           30, , 2170F3, 4,    , LEFT BOLD ITALIC
Text2="%DeveloperName%",                 Arial,           24, , 2170F3, 4,    , LEFT BOLD ITALIC
Text8="%Company%",                       Arial,           18, , 2170F3, 4,  10, RIGHT BOLD ITALIC
Text9="%InstallationFor% %WindowsUser%", Arial,           16, , 2170F3, 4, -18, BOTTOM ITALIC LEFT
BackgroundColor=EFEFEF,000000
CopyDialogRect=0%, 0%, 100%, 100%, HCENTER VCENTER

; Register all installations in common registry key
UserKeyName=$Matrix42Packages$\%DeveloperName%\%ProductName%
MachineKeyName=$Matrix42Packages$\%DeveloperName%\%ProductName%\%Version%
UninstallKeyName=Matrix42 - %DeveloperName% %ProductName% %Version%
UninstallDisplayName=Matrix42 - %DeveloperName% %ProductName% %Version%
UninstallString=%ReinstallString% /U
ReinstallString="%CommonSetupDir%\Setup.exe" "%App%\%SetupInfDir%\Setup.inf"
; UninstallDisplayIcon="%ApplicationDir%\%SetupInfDir%\Setup.ico",0
UninstallOptions=NOREMOVE NOREPAIR NOMODIFY
ReinstallMode=1
SrcDir=..

ApplicationDir=%ProgramFilesDir%\%ProductName%

SetupInfDir=Install
DataDir=%Personal%
AskUninstallOld=1
ShellLinks=1
CommonShellLinks=0
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]
CommonSetupDir=%CommonFilesDir%\Setup%SetupBits%
V_MachineValuesPath=\\%EmpirumServer%\Values$\MachineValues\%DomainName%
V_UserValuesPath=%HKLM,"Software\matrix42\Software Depot","HomeServer"%\Values$\UserValues\%UserDomain%

LogPath=C:\DellBiosUpdater

; 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:%Temp%\Setup64.exe,                  %CommonSetupDir%\Setup.exe, OPTIONAL ALWAYS NOSIZEWARNING SETUP WINDOWS64,     0
1:..\..\..\..\User\Setup64.exe,        %CommonSetupDir%\Setup.exe, OPTIONAL ALWAYS NOSIZEWARNING SETUP WINDOWS64,     0
1:%SetupInfDir%\Setup.inf,                             , ALWAYS,                                             0
; 1:%SetupInfDir%\Setup.ico,                             , NORMAL,                                           0
; 1:%SetupInfDir%\Logo.bmp,                              , NORMAL,                                           0

[Product]
; ReplaceEnv <Variable>

#Set:CheckHardware
#Set:TryUpdate

[Set:CheckHardware]
MkDir %LogPath%
CallHidden cmd.exe /c wmic computersystem get manufacturer > "%LogPath%\hersteller.log"
If DoesTextInFileExist ("Dell Inc.", "%LogPath%\hersteller.log") == "1" Then "CheckModel" else "WrongHardware"  EndIf

[WrongHardware]
ErrorLogMsg "Detected hardware manufacturer is not Dell Inc."
Exit

[CheckModel]
CallHidden cmd.exe /c wmic csproduct get Name > "%LogPath%\model.log"

; Do not modify anything above this line.
; Add models below.

; Latitude
If DoesTextInFileExist ("Latitude 5290","%LogPath%\model.log") == "1" Then "Latitude5290" Endif
If DoesTextInFileExist ("Latitude 5480","%LogPath%\model.log") == "1" Then "Latitude5480" Endif
If DoesTextInFileExist ("Latitude 7290","%LogPath%\model.log") == "1" Then "Latitude7290" Endif
; Do not modify the line below.


; Add a section for each model.
[Latitude5290]
Set Model = Latitude5290

[Latitude5480]
Set Model = Latitude5480

[Latitude7290]
Set Model = Latitude7290

; Don't change anything below this line.
[AbortSystemType]
ErrorLogMsg "This package is not setup for this model. Please add instructions and BIOS file in repository."
Exit

[Set:TryUpdate]
If DoesFileExist ("%LogPath%\PreUpdateBiosVersion.log") == "1" Then "CheckFlashSuccess" EndIf
CallHidden cmd.exe /c wmic BIOS get SMBiosBiosVersion /VALUE | find "=" > "%LogPath%\PreUpdateBiosVersion.log"
Set BiosUpdatePath = %SRC%\BIOSReposity\%Model%.exe
CallHidden %BiosUpdatePath% /s /l="%LogPath%\BiosUpdate.log"
WaitWhileProcessExists %Model%.exe,30
WaitUntilFileExists "%LogPath%\BiosUpdate.log",270
If DoesFileExist ("%LogPath%\BiosUpdate.log") == "0" Then "Abort" EndIf
If DoesTextInFileExist ("Error: The AC adapter","%LogPath%\BiosUpdate.log") == "1" Then "NotConnectedToPower" EndIf
If DoesTextInFileExist ("New BIOS is the same as the current BIOS.","%LogPath%\BiosUpdate.log") == "1" Then "AlreadyUpToDate" EndIf
If DoesTextInFileExist ("Exit Code = 2 (Reboot Required)","%LogPath%\BiosUpdate.log") == "1" Then "RebootFlash"

[NotConnectedToPower]
Abort "The AC adapter and battery must be plugged in before the system BIOS can be flashed."

[Abort]
Abort "Something went wrong. Please check local logfiles."

[AlreadyUpToDate]
ErrorLogMsg "New BIOS is the same as the current BIOS. Nothing to do."
Exit

[CheckFlashSuccess]
CallHidden cmd.exe /c wmic BIOS get SMBiosBiosVersion /VALUE | find "=" > "%LogPath%\PostUpdateBiosVersion.log"
Set PreBiosVer=ReadTextFile ("%LogPath%\PreUpdateBiosVersion.log")
Set PostBiosVer=ReadTextFile ("%LogPath%\PostUpdateBiosVersion.log")
If %PostBiosVer% == %PreBiosVer% == "1" Then "Abort" EndIf
ErrorLogMsg "BIOS successfully flashed."
RD %LogPath%
Exit

[RebootFlash]
SetReboot 5
AbortReboot "Reboot required to flash BIOS."

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

Re: Call(Hidden) schlägt fehl

Post by Hendrik_Ambrosius » 22. Jan 2021, 17:00

Mal mit Anführungszeichen versuchen?

CallHidden "%BiosUpdatePath%" /s /l="%LogPath%\BiosUpdate.log"
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.

SBSTN
Posts: 3
Joined: 14. Jun 2018, 10:55
Contact:

Re: Call(Hidden) schlägt fehl

Post by SBSTN » 03. Feb 2021, 09:01

Danke für die Idee, aber leider hat das auch nicht zur Lösung geführt.
Ein ähnliches Verhalten habe Ich nur in einem Fall beobachten können bei dem der Antivirus dazwischen gefunkte und eine Datei löschte.

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

Re: Call(Hidden) schlägt fehl

Post by Hendrik_Ambrosius » 03. Feb 2021, 09:41

Dann würde ich in der setup.inf eine Batchdatei nach %APP% oder so kopieren und die dann via CALL aufrufen.
Lässt sich auch gut testen: Erst mal nur CALL CMD.EXE einbauen und die Batchdatei manuell starten > Fehlermeldungen?
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.

Post Reply

Return to “Paketierung”

Who is online

Users browsing this forum: No registered users and 5 guests