SAP 7.50 SAPUILandscape.xml dynamische Einträge

Antworten
PetCh01

SAP 7.50 SAPUILandscape.xml dynamische Einträge

Beitrag von PetCh01 » 07. Mär 2018, 16:40

Kompatibel mit aktueller SAP 7.50 PL04.

Voraussetzung:
- Ihr wollt eure SAP XML pro Maschine definieren und nicht pro User
- Installation SAP GUI Maschinenteil (Paket setze ich als vorhanden voraus)
- SAP muss einmalig, vollumfänglich mit all euren LogonPads an einem Client konfiguriert werden
- Danach exportiert ihr den gesamten Bereich von .\HKCU\Software\Sap (Das bleibt dann Final/Statisch)
- Wenn ihr wollt, könnt ihr die zb. Themesteile herauslösen aus der Reg.
- Ihr sichert euch die SAPUILandscape.xml des konfigurierten Clients (werdet ihr später brauchen)

##1##
LogonXML
1. Initial Core (Erstes LogonPad + User Settings)

Code: Alles auswählen

[SetupInfo]
Author                  = PetCh01
CreationDate            = 21.02.2018
InventoryID             = CPE20180221
Description             = SAP XML-UI STP
Method                  = Script
Tested on               = Win8.1 x64, Win10 x64
Dependencies            = 
Command line options    = /S2 /AW
Last Change             = 28.02.2018
Build                   = 0

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

[Setup]
Version=16.1
ShowCaption=1
BlockInput=1
Platform=X64

[Application]
ProductName=XML-UI-1 STP
DeveloperName=SAP
Version=1.0
Revision=0
SetupName=%Packagename% %SetupWizard%
Text1="%Packagename%", Arial, 32, , 000000, 25#, 25#, LEFT BOLD
BackgroundColor=404040,404040
CopyDialogRect=25#, -25#, 0, 0, NORMAL
Logo=Logo.bmp, -25#, -25#, 0, 0, FFFFFF
UninstallDisplayIcon=%App%\%SetupInfDir%\Setup.ico,0
UserKeyName=stiPackages\%DeveloperName%\%ProductName%
MachineKeyName=stiPackages\%DeveloperName%\%ProductName%\%Version%
UninstallKeyName=stiPackage %DeveloperName% %ProductName% %Version%
UninstallDisplayName=stiPackage %DeveloperName% %ProductName% %Version%
UninstallString=%ReinstallString% /U
ReinstallString="%CommonSetupDir%\Setup.exe" "%App%\%SetupInfDir%\Setup.inf"
ReinstallMode=1
SrcDir=..
ApplicationDir=%ProgramFilesDir%\stiPackages\%DeveloperName%\%ProductName%\%Version%
SetupInfDir=stiInstall
AskUninstallOld=0
ShellLinks=1
CommonShellLinks=1
CreateUnresolvableShellLinks=1
UseStringSection=Strings:09
UseSysStringSection=SysStrings:09
DateWarning=1
SizeWarning=1
Reboot=2
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 fuer:
InstallerDesc=Dienstprogramm zum Installieren einzelner Komponenten.
InstallerName=Installationsprogramm
SetupWizard=Installations-Assistent
Uninstallation=deinstallieren
ErrorText=Fehler
CallingText=beim Aufruf von

[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
ErrorText=Error
CallingText=launching

[SysStrings:07]
Users=Benutzer

[SysStrings:09]
Users=Users

[Environment]
CommonSetupDir=%CommonFilesDir%\Setup%SetupBits%
V_MachineValuesPath=\\%EmpirumServer%\Values$\MachineValues\%DomainName%
; Maschinenabhaengige Variablen
; machine dependent variables
SAP_7.50_GUI_LANGUAGE=%%%V_MachineValuesPath%\%ComputerName%.ini,%ComputerName%,SAP_7.50_GUI_LANGUAGE%%

Packagename=%DeveloperName% %ProductName% %Version%
Uninstallkey=SAP_XML-UI-1
DisplayVersion=%Version%

DateDD=left("%sysdate%",2)
DateMM=mid("%sysdate%",3,2)
DateYY=right("%sysdate%",4)
TimeHH=left("%LongSysTime%",2)
TimeMM=mid("%LongSysTime%",3,2)
TimeSS=right("%LongSysTime%",2)
InstLogFile=%APP%\Install.%TimeStamp%.log
UninstLogFile=%APP%\Uninstall.%TimeStamp%.log
RegUninstallKeyx64=HKLM,Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\%Uninstallkey%,UnInstallString
RegDisplayVersionx64=%%HKLM,Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\%Uninstallkey%,DisplayVersion%%

;Install normal
;InstParaI=not_available_for_this_package
;Uninstall Parameter
;InstParaU=not_available_for_this_package
;InstParaU1=not_available_for_this_package
;InstParaU2=not_available_for_this_package
;Install forced
;InstParaF=not_available_for_this_package
;Uninstall from local Repository (Issued via Microsoft Programs and Features)
;DeInstPara=not_available_for_this_package

DisplayVersionSAPGUI=7.50
RegDisplayVersionSAPGUI=%%HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\SAPGUI,DisplayVersion%%

SAPUILandscape=SAPUILandscape.xml

[Processes]


[Encryption]


[Disks]
1=%Disk1%

[Options]
Installer  = %InstallerName%, COPYALWAYS, Installer,  "%InstallerDesc%"
stiProduct = %ProductName%,   COPYALWAYS, stiProduct, "%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,                             , ALWAYS,                                             0
1:%SetupInfDir%\Logo.bmp,                              , NORMAL,                                             0
1:%SetupInfDir%\Setup.ico,                             , NORMAL,                                             0
1:stiSource\SAPUILandscape.xml,                        , OPTIONAL ALWAYS,                                    0

[AppNotExistMsg]
-Exit
-SetReboot 2
-ErrorLogMsg The application is not present. Uninstallation is not executed. Only setup.inf is deleted and package is unregistered. Exit!

[AppNotExistx64]
If DoesRegKeyExist ("%RegUninstallKeyx64%") == "0" Then "AppNotExistMsg" EndIf

[AppExistMsg]
ErrorLogMsg Application is already present. Installation is not executed. Only setup.inf is copied and package is registered. Exit!
SetReboot 2
Exit

[AppExistx64]
ReplaceENV RegDisplayVersionx64
If %RegDisplayVersionx64% >= %DisplayVersion% & DoesRegKeyExist ("HKLM,Software\%MachineKeyName%\Setup,ProductName") == "0" Then "AppExistMsg" EndIf

[stiProduct]
ReplaceEnv SAP_7.50_GUI_LANGUAGE
#AppExistx64, MACHINE DONTDELETE WINDOWS64
#Reg:OnUninstall, DELETE
#Set:stiProductx64,   DONTDELETE WINDOWS64
#Set:stiUninstallx64, DELETE     WINDOWS64
#Set:LANGUAGE, CLIENT DONTDELETE
#Ini:Product
#Reg:OnInstall, DONTDELETE
#Autoexec.bat:Product, MACHINE DONTDELETE
#Autoexec.bat:Product2, CLIENT DONTDELETE
#AppNotExistx64, MACHINE DELETE WINDOWS64




;~~~ x64 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Set:stiProductx64]
If "%SAP_7.50_GUI_LANGUAGE%" == "" Then "Set:NoLanguageAbort" EndIf
Set Wow6432Node=\Wow6432Node
;Check ob die Software bereits installiert wurde, dann Reinstallation!
If DoesRegKeyExist ("%RegUninstallKeyx64%") == "1" & %RegDisplayVersionx64% >= %DisplayVersion% Then "stiReinstallx64" Else "stiInstallx64" EndIf

[stiReinstallx64]
;Uninstallation
callhidden cmd /c rmdir /s /q "c:\programdata\saplogon\"
;Installation
#stiInstallx64


[stiInstallx64]
-SetReboot 1
Killprocess SapGui.exe
AddMeter 12

If DoesPathExist ("c:\programdata\saplogon") == "0" Then "SAPUILandscape" EndIf
If DoesFileExist ("c:\programdata\saplogon\SAPUILandscape.xml") == "1" Then "RenewSAPUILandscapeXML" EndIf
If DoesFileExist ("c:\programdata\saplogon\SAPUILandscape.xml") == "0" Then "CopySAPUILandscapeXML" EndIf
1:stiSource\SAPLanguage.ini, "c:\programdata\saplogon\SAPLanguage.ini", OPTIONAL USEFILENAME,  0


[Ini:Product]
"c:\programdata\saplogon\SAPLanguage.ini","SAPLANG",,"LANG=%SAP_7.50_GUI_LANGUAGE%"

[Set:LANGUAGE]
set SAP_LANGUAGE=%c:\programdata\saplogon\SAPLanguage.ini,SAPLANG,LANG%
ReplaceENV SAP_LANGUAGE

[SAPUILandscape]
Mkdir "c:\programdata\saplogon"

[RenewSAPUILandscapeXML]
Ren "c:\programdata\saplogon\SAPUILandscape.xml" "SAPUILandscape%TimeStamp%.xml"
Copy "%APP%\stiSource\SAPUILandscape.xml" "c:\programdata\saplogon\SAPUILandscape.xml"

[CopySAPUILandscapeXML]
Copy "%APP%\stiSource\SAPUILandscape.xml" "c:\programdata\saplogon\SAPUILandscape.xml"

[stiRebootRequired]
SetReboot 1

[Set:stiUninstallx64]
If DoesRegKeyExist ("%RegUninstallKeyx64%") ==  "1" Then "Set:AppUninstallx64" Else "Set:stiUninstallPlanBx64" EndIf

[Set:AppUninstallx64]
-SetReboot 1
sleep 2000
callhidden cmd /c rmdir /s /q "c:\programdata\saplogon\"
-callhidden cmd /c rmdir /s /q "c:\programdata\saplogon\"


[Set:stiUninstallPlanBx64]
ErrorLogMsg INFO: Uninstall PlanB is taken.
;NO PLAN B CONFIGURED
;If DoesRegKeyExist ("%RegUninstallKeyx64%") == "1" Then "Set:stiUninstallError" EndIf
;-Sleep 3000
;-Callhidden %InstParaU%
-ErrorLogMsg INFO: Uninstall PlanB is taken.
;~~~ x64 ENDE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Set:stiRebootForced]
SetReboot 5
ErrorLogMsg "Forcing system reboot..."
;call cmd /c shutdown.exe -r -f -t 5
AbortReboot "Forcing system reboot..."

[Set:NoLanguageAbort]
ErrorLogMsg ERROR: Computer variable SAP_7.50_GUI_LANGUAGE is not definied. Abort!
Abort ERROR: Computer variable SAP_7.50_GUI_LANGUAGE is not definied. Abort!

[Set:stiInstallError]
ErrorLogMsg %ErrorText% %ErrorLevel% %CallingText% %InstParaI%
Abort %ErrorText% %ErrorLevel% %CallingText% %InstParaI%

[Set:stiInstallErrorForce]
ErrorLogMsg %ErrorText% %ErrorLevel% %CallingText% %InstParaF%
Abort %ErrorText% %ErrorLevel% %CallingText% %InstParaF%


[Set:stiUninstallError]
ErrorLogMsg %ErrorText% %ErrorLevel% %CallingText% "%InstParaU%"
Abort %ErrorText% %ErrorLevel% %CallingText% "%InstParaU%"
-Abort %ErrorText% %ErrorLevel% %CallingText% "%InstParaU%"
-ErrorLogMsg %ErrorText% %ErrorLevel% %CallingText% "%InstParaU%"


;~~~~~~~~~~~~~~~~ Diff - Tuning ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


[Reg:OnInstall]
-HKLM,"SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\stiPackage SAP YourOldLogonPAD1 1",,0x00000010
HKLM,"SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\%Uninstallkey%",,0x00000010
HKLM,"SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\%Uninstallkey%","DisplayName",0x00000000,"SAP XML-UI-1 STP 1.0"
HKLM,"SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\%Uninstallkey%","Publisher",0x00000000,"STI-Group"
HKLM,"SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\%Uninstallkey%","DisplayVersion",0x00000000,"1.0"
HKLM,"SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\%Uninstallkey%","PaketVersion",0x00000000,"2018.03"
HKLM,"SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\%Uninstallkey%","URLInfoAbout",0x00000000,"http://www.sti-group.com"
HKLM,"SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\%Uninstallkey%","UninstallString",0x00000000,"C:\Program Files (x86)\SAP\FrontEnd\SAPgui\SAPgui.exe -doesnotexist"
HKLM,"SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\%Uninstallkey%","DisplayIcon",0x00000000,"C:\Program Files (x86)\SAP\FrontEnd\SAPgui\SAPgui.exe"
HKLM,"SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\%Uninstallkey%","SystemComponent",0x00010001,1
HKLM,"SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\%Uninstallkey%","EstimatedSize",0x00010001,2910
HKCU,"Software\SAP",,0x00000010
HKCU,"Software\SAP\General",,0x00000010
HKCU,"Software\SAP\General","Language",0x00000000,"%SAP_LANGUAGE%"
;Fill in here the export of HKCU\Software\SAP entries
-HKCU,"Environment","SAPLOGON_INI_FILE",0x00000000
-HKU,"Environment","SAPLOGON_INI_FILE",0x00000000


[Reg:OnUninstall]
-HKLM,"SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\%Uninstallkey%",,0x00000010


[Autoexec.bat:Product]
-Set SAPLOGON_INI_FILE=

[Autoexec.bat:Product2]
-Set SAPLOGON_INI_FILE=
2. DeineTodo:
- RegWerte exportieren, umwandeln und unter ";Fill in here the export of HKCU\Software\SAP entries" hinzufügen
- Empirumvariable muss nach einbinden des Paketes für den,die Clients gesetzt werden "SAP_7.50_GUI_LANGUAGE" zb. DE oder EN
- Den Regteil "HKCU,"Software\SAP\General","Language",0x00000000" lasst ihr weg (Falls Empirumvariable genutzt wird).
- die Source muss folgende Datei enthalten "SAPLanguage.ini" mit Inhalt:

Code: Alles auswählen

[SAPLANG]
LANG=
- die Source muss folgende Datei enthalten "SAPUILandscape.xml" mit Inhalt:

Code: Alles auswählen

<?xml version="1.0" encoding="UTF-8"?>
<Landscape updated="2018-02-21T08:50:33Z" version="1" generator="SAP GUI for Windows v7500.2.4.128">
<Workspaces>
<Workspace uuid="ZZ" name="Local">
<Item uuid="AA" serviceid="BB"/>
</Workspace>
</Workspaces>
<Services>
<Service type="SAPGUI" uuid="BB" name="YY" systemid="YY" msid="YY" server="YY" sncop="-1" sapcpg="YY" dcpg="YY"/>
</Services>
<Messageservers><Messageserver uuid="YY" name="ZZ" host="ZZ"/></Messageservers>
</Landscape>

- Für die Initialkonfig räumt ihr alle LogonPads aus der XML raus, die nicht im CORE sein sollen
- Workspace und Messageservers sind statisch und bleiben erhalten
- Die Werte ZZ und YY sind die staischen, füllt eure ein
- Die Werte AA und BB sind die dynamischen der jeweiligen IDS aus eurer Clientkonfiguration "SAPUILandscape.xml"
- Die "angepasste" erstellte Datei legt ihr in eure Source für dieses Paket


##2##
XML Einträge schießen und entfernen

Voraussetzung:
- Obiges Paket im installierten Zustand
- <Item> und <Service> Einträge die ihr schießen wollt

Code: Alles auswählen

[SetupInfo]
Author                  = PetCh01
CreationDate            = 28.02.2018
InventoryID             = CPE20180228V
Description             = SAP XML-UI STP-VPN
Method                  = Script
Tested on               = Win8.1 x64, Win10 x64
Dependencies            = 
Command line options    = /S2
Last Change             = 28.02.2018
Build                   = 0

[Setup]
Version=16.1
ShowCaption=1
BlockInput=1
Platform=X64

[Application]
ProductName=XML-UI-2 STP-VPN
DeveloperName=SAP
Version=1.0
Revision=0
SetupName=%Packagename% %SetupWizard%
Text1="%Packagename%", Arial, 32, , 000000, 25#, 25#, LEFT BOLD
BackgroundColor=404040,404040
CopyDialogRect=25#, -25#, 0, 0, NORMAL
Logo=Logo.bmp, -25#, -25#, 0, 0, FFFFFF
UninstallDisplayIcon=%App%\%SetupInfDir%\Setup.ico,0
UserKeyName=stiPackages\%DeveloperName%\%ProductName%
MachineKeyName=stiPackages\%DeveloperName%\%ProductName%\%Version%
UninstallKeyName=stiPackage %DeveloperName% %ProductName% %Version%
UninstallDisplayName=stiPackage %DeveloperName% %ProductName% %Version%
UninstallString=%ReinstallString% /U
ReinstallString="%CommonSetupDir%\Setup.exe" "%App%\%SetupInfDir%\Setup.inf"
ReinstallMode=1
SrcDir=..
ApplicationDir=%ProgramFilesDir%\stiPackages\%DeveloperName%\%ProductName%\%Version%
SetupInfDir=stiInstall
AskUninstallOld=0
ShellLinks=1
CommonShellLinks=1
CreateUnresolvableShellLinks=1
UseStringSection=Strings:09
UseSysStringSection=SysStrings:09
DateWarning=1
SizeWarning=1
Reboot=2
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 fuer:
InstallerDesc=Dienstprogramm zum Installieren einzelner Komponenten.
InstallerName=Installationsprogramm
SetupWizard=Installations-Assistent
Uninstallation=deinstallieren
ErrorText=Fehler
CallingText=beim Aufruf von

[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
ErrorText=Error
CallingText=launching

[SysStrings:07]
Users=Benutzer

[SysStrings:09]
Users=Users

[Environment]
CommonSetupDir=%CommonFilesDir%\Setup%SetupBits%

Packagename=%DeveloperName% %ProductName% %Version%
Uninstallkey=SAP_XML-UI-2
DisplayVersion=%Version%

DateDD=left("%sysdate%",2)
DateMM=mid("%sysdate%",3,2)
DateYY=right("%sysdate%",4)
TimeHH=left("%LongSysTime%",2)
TimeMM=mid("%LongSysTime%",3,2)
TimeSS=right("%LongSysTime%",2)
InstLogFile=%APP%\Install.%TimeStamp%.log
UninstLogFile=%APP%\Uninstall.%TimeStamp%.log
RegUninstallKeyx64=HKLM,Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\%Uninstallkey%,UnInstallString
RegDisplayVersionx64=%%HKLM,Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\%Uninstallkey%,DisplayVersion%%

;Install normal
;InstParaI=not_available_for_this_package
;Uninstall Parameter
;InstParaU=not_available_for_this_package
;InstParaU1=not_available_for_this_package
;InstParaU2=not_available_for_this_package
;Install forced
;InstParaF=not_available_for_this_package
;Uninstall from local Repository (Issued via Microsoft Programs and Features)
;DeInstPara=not_available_for_this_package

[Processes]


[Encryption]


[Disks]
1=%Disk1%

[Options]
Installer  = %InstallerName%, COPYALWAYS, Installer,  "%InstallerDesc%"
stiProduct = %ProductName%,   COPYALWAYS, stiProduct, "%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:%SetupInfDir%\Logo.bmp,                              , NORMAL,                                             0
1:%SetupInfDir%\Setup.ico,                             , NORMAL,                                             0

[AppNotExistMsg]
-Exit
-SetReboot 2
-ErrorLogMsg The application is not present. Uninstallation is not executed. Only setup.inf is deleted and package is unregistered. Exit!

[AppNotExistx64]
If DoesRegKeyExist ("%RegUninstallKeyx64%") == "0" Then "AppNotExistMsg" EndIf

[AppExistMsg]
ErrorLogMsg Application is already present. Installation is not executed. Only setup.inf is copied and package is registered. Exit!
SetReboot 2
Exit

[AppExistx64]
ReplaceENV RegDisplayVersionx64
If %RegDisplayVersionx64% >= %DisplayVersion% & DoesRegKeyExist ("HKLM,Software\%MachineKeyName%\Setup,ProductName") == "0" Then "AppExistMsg" EndIf

[stiProduct]
#AppExistx64, MACHINE DONTDELETE WINDOWS64
#Reg:OnUninstall, DELETE
#Set:stiProductx64,   DONTDELETE WINDOWS64
#Set:stiUninstallx64, DELETE     WINDOWS64
#Set:Product
#Reg:Product, DONTDELETE
#Ini:Product
#AppNotExistx64, MACHINE DELETE WINDOWS64



;~~~ x64 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Set:stiProductx64]
Set Wow6432Node=\Wow6432Node
;Check ob die Software bereits installiert wurde, dann Reinstallation!
If DoesRegKeyExist ("%RegUninstallKeyx64%") == "1" & %RegDisplayVersionx64% >= %DisplayVersion% Then "stiReinstallx64" Else "stiInstallx64" EndIf


[stiReinstallx64]
;Uninstallation
;Installation
#stiInstallx64


[stiInstallx64]
-SetReboot 1
Killprocess SapGui.exe
AddMeter 12

If DoesFileExist ("c:\programdata\saplogon\SAPUILandscape.xml") == "0" Then "Set:NoLogonXMLAbort" EndIf

UpdateXML ("c:\programdata\saplogon\SAPUILandscape.xml","/Landscape/Workspaces/Workspace/Item[@uuid='AA']","serviceid","BB")
UpdateXML ("c:\programdata\saplogon\SAPUILandscape.xml","/Landscape/Services/Service[@uuid='BB']","type","SAPGUI")
UpdateXML ("c:\programdata\saplogon\SAPUILandscape.xml","/Landscape/Services/Service[@uuid='BB']","name","ZZ")
UpdateXML ("c:\programdata\saplogon\SAPUILandscape.xml","/Landscape/Services/Service[@uuid='BB']","systemid","ZZ")
UpdateXML ("c:\programdata\saplogon\SAPUILandscape.xml","/Landscape/Services/Service[@uuid='BB']","mode","ZZ")
UpdateXML ("c:\programdata\saplogon\SAPUILandscape.xml","/Landscape/Services/Service[@uuid='BB']","server","ZZ")
UpdateXML ("c:\programdata\saplogon\SAPUILandscape.xml","/Landscape/Services/Service[@uuid='BB']","sncop","ZZ")
UpdateXML ("c:\programdata\saplogon\SAPUILandscape.xml","/Landscape/Services/Service[@uuid='BB']","sapcpg","ZZ")
UpdateXML ("c:\programdata\saplogon\SAPUILandscape.xml","/Landscape/Services/Service[@uuid='BB']","dcpg","ZZ")


[stiRebootRequired]
SetReboot 1

[Set:stiUninstallx64]
If DoesRegKeyExist ("%RegUninstallKeyx64%") ==  "1" Then "Set:AppUninstallx64" Else "Set:stiUninstallError" EndIf

[Set:AppUninstallx64]
-SetReboot 1
DeleteXml ("c:\programdata\saplogon\SAPUILandscape.xml", "/Landscape/Workspaces/Workspace/Item[@uuid='AA']")
DeleteXml ("c:\programdata\saplogon\SAPUILandscape.xml", "Landscape/Services/Service[@uuid='BB']")
-DeleteXml ("c:\programdata\saplogon\SAPUILandscape.xml", "Landscape/Services/Service[@uuid='BB']")
-DeleteXml ("c:\programdata\saplogon\SAPUILandscape.xml", "/Landscape/Workspaces/Workspace/Item[@uuid='AA']")
sleep 2000


;~~~ x64 ENDE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Set:stiRebootForced]
SetReboot 5
ErrorLogMsg "Forcing system reboot..."
;call cmd /c shutdown.exe -r -f -t 5
AbortReboot "Forcing system reboot..."

[Set:stiInstallError]
ErrorLogMsg %ErrorText% %ErrorLevel% %CallingText% %InstParaI%
Abort %ErrorText% %ErrorLevel% %CallingText% %InstParaI%

[Set:stiInstallErrorForce]
ErrorLogMsg %ErrorText% %ErrorLevel% %CallingText% %InstParaF%
Abort %ErrorText% %ErrorLevel% %CallingText% %InstParaF%

[Set:NoLogonXMLAbort]
ErrorLogMsg ERROR: SAP GUI not installed or SAPUILandscape.xml is misssing. Abort!
Abort ERROR: SAP GUI not installed or SAPUILandscape.xml is misssing. Abort!

[Set:stiUninstallError]
ErrorLogMsg %ErrorText% %ErrorLevel% %CallingText% "%InstParaU%"
Abort %ErrorText% %ErrorLevel% %CallingText% "%InstParaU%"
-Abort %ErrorText% %ErrorLevel% %CallingText% "%InstParaU%"
-ErrorLogMsg %ErrorText% %ErrorLevel% %CallingText% "%InstParaU%"


;~~~~~~~~~~~~~~~~ Diff - Tuning ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[Set:Product]


[Reg:Product]
HKLM,"SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\%Uninstallkey%",,0x00000010
HKLM,"SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\%Uninstallkey%","DisplayName",0x00000000,"SAP XML-UI-2 STP-VPN 1.0"
HKLM,"SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\%Uninstallkey%","Publisher",0x00000000,"STI-Group"
HKLM,"SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\%Uninstallkey%","DisplayVersion",0x00000000,"1.0"
HKLM,"SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\%Uninstallkey%","PaketVersion",0x00000000,"2018.03"
HKLM,"SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\%Uninstallkey%","URLInfoAbout",0x00000000,"http://www.sti-group.com"
HKLM,"SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\%Uninstallkey%","UninstallString",0x00000000,"C:\Program Files (x86)\SAP\FrontEnd\SAPgui\SAPgui.exe -doesnotexist"
HKLM,"SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\%Uninstallkey%","DisplayIcon",0x00000000,"C:\Program Files (x86)\SAP\FrontEnd\SAPgui\SAPgui.exe"
HKLM,"SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\%Uninstallkey%","SystemComponent",0x00010001,1
HKLM,"SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\%Uninstallkey%","EstimatedSize",0x00010001,910


[Reg:OnUninstall]
-HKLM,"SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\%Uninstallkey%",,0x00000010


[Ini:Product]
@Eure ToDo
- Die Werte AA und BB sind die dynamischen der jeweiligen IDS aus eurer Clientkonfiguration "SAPUILandscape.xml"
- Regwerte für die Paketregistrierung nach Bedarf anpassen
- Paket duplizieren und entsprechend IDs anpassen für all eure gewünschten Logonpads


Ich habe mir auch überlegt das alles in einem Paket mit Empirumvariablen zu bauen, habe mich daber dann für diese Lösung entschieden, da ich hierbei bequem über den Servicestore auch "Berechtigungen" schießen kann und wieder wegnehmen, ohne ein reinstall an zu stoßen. Ist Geschmackssache. Wer genau das sucht, wird hier eine Lösung haben ;-)

Antworten

Zurück zu „Biete“

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast