4.1.0 Commandline DeployMode / Dialog Problem

Praise to the developers
PSADT 4.1.0
is there any reason why you now have to activate DeployMode so that the dialogs appear? This wasn't the case with the previous versions 3.8.4, 4.0.5, and 4.0.6.

The old version didn't have Auto ('Interactive', 'Silent', 'NonInteractive') and it was detected automatically, which at least always worked with the earlier versions.
The new version is ('Auto', 'Interactive', 'NonInteractive', 'Silent').

Invoke-AppDeployToolkit.exe -DeploymentType Install -DeployMode Interactive
Invoke-AppDeployToolkit.exe -DeploymentType "Repair" -DeployMode Interactive
Invoke-AppDeployToolkit.exe -DeploymentType "Uninstall" -DeployMode Interactive

I just hope that I don't have to intercept the dialogs when it is installed via machine (SCCM/Intune)
$MyUser=(Get-ADTLoggedOnUser).Username if ($MyUser) {if (!$adtSession.UseDefaultMsi) { ..... } }

Too bad it doesn't work in SCCM anymore.
How do I change it so that I can install it silently on the machine and get the dialogs on the user.
[Initialization] :: This deployment explicitly requires interactivity, however there are no suitable logged on users available and this process is running non-interactively.

I can test intune later, but I can't use it like this in sccm - under the user dialogs, per machine silent

I added this to the ADT Session hashtable:

NoProcessDetection = $true

2 Likes

Great thanks, I didn't know, works now. Previously you didn't have to do anything or specify the -DeloyMode

Generally, if I understand correctly, you can use the listed values in the hash or in the script area like this

in the hash table

$adtSession = @{
NoProcessDetection = $true
}


function Install-ADTDeployment
{
$adtSession.NoProcessDetection = $true
$adtSession.DirSupportFiles
}

in the script area

Once Open-ADTSession has been called, the $adtSession hashtable is redefined to be a PSADT.Module.DeploymentSession object, and almost all properties/fields are immutable (imagine starting off logging to one folder and you can pull the rug out from under the toolkit by setting it to another location, etc).

As such, this is a "yes":

$adtSession = @{
    NoProcessDetection = $true
}

And this is a "no":

function Install-ADTDeployment
{
    $adtSession.NoProcessDetection = $true
}
2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.