What files are necessary?

Hello,

New to the tool and fairly inexperienced with PS. I’m attempting to create a “master template” that I can use to start packaging various applications. I’ve searched for specifics on this forum, the old forum, and in other people’s blogs but haven’t come up with a detailed answer. Forgive me if my questions is “dumb”.

My question is…what files are necessary for the toolkit to function? What can I safely delete? I think i can delete the help file along with the extensions script if I’m not using it but I’m unsure. Enterprise storage is expensive and every little bit, no matter how little, helps.

Thanks,
James

everything below \Toolkit\ minus
-Deploy-Application.exe
-Deploy-Application.exe.config

For each package I rename Deploy-Application.ps1 to something resembling the application name.

Each package gets its own copy of the toolkit.
Do NOT try to have a master copy of the toolkit that all your packages use.
If you do breaking changes will break perfectly working packages.

FYI: there is a video on how to use the toolkit in the forums.

1 Like

Hi,

Creating a default package is ok. We did it.

Set-StrictMode -off
. “_Include\AppDeployToolkit\AppDeployToolkitMain.ps1”
Set-StrictMode -Version Latest

You will have to define some parameters in your main script:

Param (
	[Parameter(Mandatory=$True)]
	[ValidateSet('Install','Repair','Uninstall', 'MAJ')]
	[string]$DeploymentType = 'Install',
	[Parameter(Mandatory=$false)]
	[ValidateSet('Interactive','Silent','NonInteractive')]
	[string]$DeployMode = 'Interactive',
	[Parameter(Mandatory=$false)]
	[ValidateSet('Inactive','Active')] #Inactive = Ignore l'exclusion du poste, Active=Exclusion active si spécifiée	
	[Parameter(Mandatory=$false)]
	[switch]$AllowRebootPassThru,
	#(e.g. SCCM) if detected during an installation. If a 3010 code is passed to SCCM, the SCCM client will display a reboot prompt. 
	#If set to false, the 3010 return code will be replaced by a “0” (successful, no restart required).
	[Parameter(Mandatory=$false)]
	[switch]$TerminalServerMode #Changes to user install mode and back to user execute mode for installing/uninstalling applications on 
	#Remote Destkop Session Host/Citrix servers	
)

Those are variables, I am using in standard

[string]$scriptDirectory = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent 
set-variable -name var_Scriptactuel -visibility public -Scope Script -Value $MyInvocation.MyCommand.Name
set-variable -name var_ScriptactuelBaseName -visibility public -Scope Script -value ([io.fileinfo]"$var_Scriptactuel").Basename
Set-Variable -Name var_ParametresScriptBase -visibility public -Scope Script -value $null
set-variable -name Var_SourceFiles -visibility public -Scope Script -Value "$scriptDirectory\Sources"
set-variable -name InstTrousses -visibility public -Scope Script -Value "$env:programfiles\Organisation\InstTrousses"

In AppDeployToolkitConfig.xml, you may have to change some variables:
<Toolkit_LogPath>$InstTrousses\Journaux</Toolkit_LogPath>
<Toolkit_LogStyle>CMTrace</Toolkit_LogStyle>
<MSI_LogPath>$InstTrousses\Journaux</MSI_LogPath>

You may have to personnalize some more variables. You have to doing so before loading PSADTK.

Our packages are fully standard
In our main script we are creating some variables necessary to make PSADKT working. Then we are adding a variables file and then PSADTK,

Then you are up and running.

Thanks,

1 Like