I'm trying to add the InstallName to Installation Progress popup:
I changed the single quotes:
ProgressPrompt = @{
# Default message displayed in the progress bar.
Message = @{
Install = 'Installation of [$($adtSession.InstallName)] in progress. Please wait…'
to double quotes:
ProgressPrompt = @{
# Default message displayed in the progress bar.
Message = @{
Install = "Installation of [$($adtSession.InstallName)] in progress. Please wait…"
Now I get:
Open-ADTSession : The following error occurred while Windows PowerShell was loading the 'Z:\\Clickshare_v446r1\Strings\strings.psd1' script data file:
At line:76 char:43
+ ... Install = "Installation of [$($adtSession.InstallName)] in pr ...
+ ~~~~~~~~~~~~~~~~~~~~~~~
Property references are not allowed in restricted language mode or a Data section.
I thought strings.psd1 would be evaluated at run time. Not at load time.
Does anybody know a workaround?
UPDATE: I have opened a Feature request for this.
Nothing like that's been implemented due to the technical complexity of it. It's only come up once or twice before so it's not something many people are trying to do. I'll leave the feature request there but not sure we'll get to it for the 4.2.0 release cycle.
Wondering if you write the $adtSession.InstallName content into another variable (e.g. $InstallName) before the ProgressPrompt is called so you can then reuse $InstallName within the dialog
e.g.
$InstallName = $adtSession.InstallName
then try
ProgressPrompt = @{
# Default message displayed in the progress bar.
Message = @{
Install = "Installation of [$($InstallName)] in progress. Please wait…"
@Adrian_Scott, the double quotes are are forbidden in psd1 files.
@mjr4077au, if it's too much work, push it to v4.3. I'll live.
My bad, thanks for enlightening me
It's not that its too much work, its just not priority among other pieces of work. Take your screenshot for instance; I'd never bother to put the InstallName into that message purely because its redundant given the title of the prompt. This is why I've just genuinely seen no need for it.
For most people, yes.
In my case, we rename the front scripts.
So Invoke-AppDeployToolkit.ps1 becomes ClickShare_v446.ps1
And I set $adtSession.InstallName to the filename of front script, minus the file extension.
So the line would say:
Installation of [ClickShare_v446] in progress. Please wait…
I swear you change stuff for the sake of changing stuff
. Showing something like ClickShare_v446 with an underscore to the user is fairly ugly I'd think
There is a reason why.
The "ClickShare Desktop App V4.46.0.4 v446r1" is the cute name for "non-literate" users
The `ClickShare_v446r1' string is the one that us techies use for the:
- App name in Intune/SCCM
- filename of the merged log file
- Filename of the front script.
- part of the filename for all docs for the app
- Foldername for the source files
- part of the filename for the ActiveSetup script or EXE for the app (if applicable)
- etc.
Depending on who packages the app, you could have ClickShare_v446r1 or BarcoClickShare_v446r1. or even ClickShare_v4460r1.
We do stuff 10-15 years before MS does it. E.g. We had app detection and supercedence with SMS. So when MS came out with it with SCCM, we were like: Who cares. Our way does not lock us into your walled garden and is faster and more reliable.