Orge
8. November 2024 um 12:08
1
Hallo!
Anfängerfrage: Bei einem Paket aus dem Depot (Zoom) ergänzen wir bisher manuell zwei Registryeinträge in der Empirum-Setup.inf. Wie mache ich das mit der Produktautomatisierung?
Viele Grüße
Orge
Moin @Orge
hierfür kann ich das CustomSkript empfehlen:
# Add-ContentToCustomFunction
The `Add-ContentToCustomFunction` script was developed to allow automated injections of user scripts into the designated hook functions inside the PSADT-based packages.
It's main use case is the integration into the neo42 Application Package Center (APC) pipelines.
## Usage example within the APC
*It is recommended to have a central directory on the filesystem of the MMS/APC that contains all staticly served files such as scripts, images and other assets. We assume you have this directory set up and the path to it is defined in a global variable.*
1. Download the script to a filesystem accessable my the MMS Server
2. Add a `Script execution` task.
*Make sure the package is already extracted when this task is called*
3. Use the parameters as *reference*:
- **Type**: PowerShell
- **ExecutionPolicy**: Bypass
- **Scriptfile**: `<GLOBAL.MYSCRIPTSTORAGE>\ADD-CONTENTTOCUSTOMFUNCTION.PS1`
- **ScriptArguments**:
```
-DeployApplicationFile "<Phase.PackagePath>\<Run.Version>\Deploy-Application.ps1"
-FunctionName "CustomInstallAndReinstallAndSoftMigrationEnd"
This file has been truncated. show original
<#
.SYNOPSIS
Add content to a custom function.
.DESCRIPTION
Adds content to a custom function in a Deploy-Application.ps1 file.
The position of the content can be specified to be at the beginning or end of the custom function.
If the custom function is not found or any of the specified content is not valid PowerShell code, an error is thrown.
The content can be specified as a string or as a file containing the content.
.PARAMETER DeployApplicationFile
The Deploy-Application.ps1 file.
.PARAMETER Content
The content to add to the custom function. Must be valid PowerShell script.
.PARAMETER ContentFile
The file containing the content to add to the custom function. Must be valid PowerShell script.
.PARAMETER FunctionName
The name of the custom function to add content to.
.PARAMETER InsertAtEnd
Insert the content at the end of the custom function. Default is to insert at the beginning.
.EXAMPLE
Add-ContentToCustomFunction -DeployApplicationFile '$PWD\Deploy-Application.ps1' -Content 'Write-Host "Hello, World!"' -FunctionName 'CustomInstallAndReinstallAndSoftMigrationEnd' -InsertAtEnd
This file has been truncated. show original
Stipe
7. Januar 2025 um 20:33
3
Hallo,
die Verlinkung zum .pdf scheint nicht richtig hinterlegt zu sein.
Add-ContentToCustomFunction.pdf
Könntet ihr das bitte mal prüfen?
Gruß
Stipe
Hallo Stipe,
bei mir lässt sich die PDF ganz normal aufrufen.
Stipe
8. Januar 2025 um 09:59
6