Variable wird nicht aufgelöst

Unterstützung und Diskussion zur Installation von Empirum (Agentenverteilung, Depotserver ...)

Moderator: MVogt

Post Reply
Chef
Posts: 21
Joined: 10. Jul 2015, 10:36
Contact:

Variable wird nicht aufgelöst

Post by Chef » 15. Jul 2015, 09:37

Hallo zusammen,

in folgender Setup.inf verwende ich die Variable "offline". Diese ist auch für Entsprechende Clients gesetzt, wird allerdings nicht beim Ausführen der Setup.inf erkannt.

Code: Select all

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

[Environment]
CommonSetupDir=%CommonFilesDir%\Setup%SetupBits%
offline=%offline%
...
InstPara="%Src%\Client\i386\SetupClient.exe" /Q /disableofflinecapability /L "C:\EmpirumAgent\Packages\Microsoft\Microsoft Dynamics CRM\7.0.0000.3543\instlog.log"
InstParaOff="%Src%\Client\i386\SetupClient.exe" /Q /installofflinecapability /L "C:\EmpirumAgent\Packages\Microsoft\Microsoft Dynamics CRM\7.0.0000.3543\instlog.log"
UninstPara="%ProgramFilesDirx86%\%ProductName%\SetupClient.exe" /x /q /L "C:\EmpirumAgent\Packages\Microsoft\Microsoft Dynamics CRM\7.0.0000.3543\uninstlog.log"

[Install]
AddMeter 50
ReplaceEnv offline
If %offline% == "true" Then "inklOff" Else "onOnly" EndIf

[onOnly]
Call %InstPara%

[inklOff]
Call %InstParaOff%

So sieht die Client-Konfig aus:
2015-07-15_09-34-51.png
Client
(53.69 KiB) Downloaded 304 times
Ich bin ziemlich neu in der Empirum-Welt, ich hoffe ihr könnt mir weiterhelfen...

Vielen Dank!

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

Re: Variable wird nicht aufgelöst

Post by r.wiegel » 15. Jul 2015, 10:29

zum Testen:

Code: Select all

[Environment]
V_offline=%%%V_MachineValuesPath%\%ComputerName%.ini,%ComputerName%,offline%%

[Product]
ReplaceEnv V_offline
Echo V_offline:%V_offline%
Viele Grüße
Roman Wiegel
IT-Consultant

MR Datentechnik - Vertriebs- und Service GmbH

Chef
Posts: 21
Joined: 10. Jul 2015, 10:36
Contact:

Re: Variable wird nicht aufgelöst

Post by Chef » 15. Jul 2015, 11:01

Erstmal vielen Dank für die Antwort...
Und der Rest

[Install]
...
ReplaceEnv offline
If %offline% == "true" Then "inklOff" Else "onOnly" EndIf

kann so bleiben?

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

Re: Variable wird nicht aufgelöst

Post by r.wiegel » 15. Jul 2015, 11:26

Die letzte Abfrag schon. Der Unterschied zwischen zwei Aufrufen liegt an einem Parameter:
/disableofflinecapability
/installofflinecapability
Statt "True" hätte ich die Variable "offline" in der Console mit disableofflinecapability oder installofflinecapability (ComboBox) gesetzt.
Der Aufruf wäre dann:
[Install]
Call "%Src%\Client\i386\SetupClient.exe" /Q /%offline% /L "C:\EmpirumAgent\Packages\Microsoft\Microsoft Dynamics CRM\7.0.0000.3543\instlog.log"
...

ansonsten:

Code: Select all

[Install]
AddMeter 50
If %V_offline% == "true" Then "inklOff" Else "onOnly" EndIf

[onOnly]
Call "%Src%\Client\i386\SetupClient.exe" /Q /disableofflinecapability  /L "C:\EmpirumAgent\Packages\Microsoft\Microsoft Dynamics CRM\7.0.0000.3543\instlog.log"

[inklOff]
Call "%Src%\Client\i386\SetupClient.exe" /Q /installofflinecapability /L "C:\EmpirumAgent\Packages\Microsoft\Microsoft Dynamics CRM\7.0.0000.3543\instlog.log"
Viele Grüße
Roman Wiegel
IT-Consultant

MR Datentechnik - Vertriebs- und Service GmbH

Chef
Posts: 21
Joined: 10. Jul 2015, 10:36
Contact:

Re: Variable wird nicht aufgelöst

Post by Chef » 15. Jul 2015, 15:31

Ich habe das ganze jetzt mal etwas umgeschrieben & die Variable umbenannt (von "offline" in "CRM_offline")

Allerdings klappt es immer noch nicht...
Im Log der Installation wird der Aufruf der Setup.exe so angezeigt:

Code: Select all

Invoked with command line: "C:\EmpirumAgent\Packages\Microsoft\Microsoft Dynamics CRM\7.0.0000.3543\Client\i386\SetupClient.exe" /Q %C:\EmpirumAgent\Values\MachineValues\GOM\CMP00369.ini,CMP00369,CRM_offline% /L "C:\EmpirumAgent\Packages\Microsoft\Microsoft Dynamics CRM\7.0.0000.3543\instlog.log"

Code: Select all

[Environment]
V_CRM_offline=%%%V_MachineValuesPath%\%ComputerName%.ini,%ComputerName%,CRM_offline%%
...
InstPara="%Src%\Client\i386\SetupClient.exe" /Q %V_CRM_offline% /L "C:\EmpirumAgent\Packages\Microsoft\Microsoft Dynamics CRM\7.0.0000.3543\instlog.log"

[Product]
ReplaceEnv V_CRM_offline
Echo V_CRM_offline:%V_CRM_offline%
#Set:Product, DONTDELETE
#Set:Uninstall, DELETE

[Set:neoProduct]
If DoesRegKeyExist ("%RegUninstallKey%") == "1" Then "Reinstall" Else "Install" EndIf

[Reinstall]
AddMeter 33
AskKillProcesses 600, APP1
Call %UninstPara%
Sleep 3000
If DoesRegKeyExist ("%RegUninstallKey%") == "1" Then "Set:UninstallError" EndIf
AddMeter 33
Call %InstPara%
Sleep 3000
If DoesRegKeyExist ("%RegUninstallKey%") == "0" Then "Set:InstallError" EndIf

[Install]
AddMeter 50
Call %InstPara%
Sleep 3000
If DoesRegKeyExist ("%RegUninstallKey%") == "0" Then "Set:InstallError" EndIf
Hier die Variablenübersicht des Clients:
2015-07-15_15-28-35.png
(56.87 KiB) Downloaded 317 times

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

Re: Variable wird nicht aufgelöst

Post by r.wiegel » 15. Jul 2015, 15:48

das kann man noch testen, da die Variable nicht richtig aufgelöst wird:
ReplaceEnv InstPara

ich rate davon ab, eine verschachtelte Variabilisierung einzusetzen und würde wegen der Syntax auf %InstPara% verzichten.
Die Anzahl von Zeilen im Script ändert sich dabei nicht.
Viele Grüße
Roman Wiegel
IT-Consultant

MR Datentechnik - Vertriebs- und Service GmbH

Post Reply

Return to “Installation und Verteilung”

Who is online

Users browsing this forum: No registered users and 3 guests