Show-InstallationRestartPrompt, Title has no spaces between words

Topics: Archive - General
Aug 1, 2014 at 12:11 PM
Hi,

Great scripts, certainly helping us with making our deployments more controllable and informative for the end user, many thanks for the hard work.

I have a minor cosmetic query.

When using the Show-InstallationRestartPrompt, the title of the box is displaying with no spaces between the application name eg "Restart Required: VPNSoftwareUpgrade" Whereas on the Show-InstallationWelcome it is displayed correctly as "VPN Software Upgrade".

Should both be pulled from the $appName variable ? Am I missing something or is this a bug ?

Thanks.
Coordinator
Aug 1, 2014 at 9:03 PM
Hi there,

I can't reproduce this strangely, does it happen for every application?

Both prompts take the $installTitle variable so should be consistent.
Aug 4, 2014 at 10:20 AM
Hi

I just tried a vanilla copy of app deploy 3.1.4 and only added the $appName variable in the Deploy-Application.ps1.
# Variables: Application

$appVendor = ""
$appName = "Test for Spaces"
$appVersion = ""
$appArch = ""
$appLang = "EN"
$appRevision = "01"
$appScriptVersion = "1.0.0"
$appScriptDate = "01/01/2014"
$appScriptAuthor = "<author name>"
I then ran it without even adding the Show-InstallationRestartPrompt option this time, and again the Show-InstallationWelcome is ok, but the ShowInstallationPrompt removes the spaces in the title the same as the Show-InstallationRestartPrompt does.

I havent made any changes to the AppDeployToolkitMain.ps1 at all.

Thoughts ?
Aug 5, 2014 at 7:48 AM
Edited Aug 5, 2014 at 7:51 AM
Hi

Noticed this as well, took a quick look at the AppDeployToolkitMain.ps1,
Start-Process $PSHOME\powershell.exe -ArgumentList "-ExecutionPolicy Bypass -NoProfile -WindowStyle Hidden -File `"$scriptPath`" -ReferringApplication `"$installName`" -ShowInstallationRestartPrompt $installRestartPromptParameters" -WindowStyle Hidden -ErrorAction SilentlyContinue
It is calling another process for the reboot and $installTitle is resetting to "Microsoft InternetExplorer 11.0" from "Microsoft Internet Explorer 11.0" (for example).

You can check by adding the Write-Log here,
# Set the install name if the referring application parameter was specified
If ($ReferringApplication -ne "") {
    $installName = $ReferringApplication
    $installTitle = $ReferringApplication -replace "_"," "
    $installPhase = "Asynchronous"
}

Write-Log "TEST: $installTitle"
Also, the Asynchronous log is using this log name: PS_AppDeployToolkitMain_3.1.5.log, shouldn't this be the same as other log name but ends differently, for example, XXX_XXX_1.0_Asynchronous.log

I think the log name become "PS_AppDeployToolkitMain_3.1.5.log" because of this part,
# Set up sample variables if Dot Sourcing the script or app details have not been specified
If ((!$appVendor) -and (!$appName) -and (!$appVersion)) {
    $appVendor = "PS"
    $appName = $appDeployMainScriptFriendlyName
    $appVersion = $appDeployMainScriptVersion
    $appLang = $currentLanguage
    $appRevision = "01"
    $appArch = ""
}
/Andy
Aug 7, 2014 at 1:52 AM
Can Sean or Dan help on this part?

I think the Asynchronous function that call the reboot needs to be review and especially the log name, I think $appVendor, $appName and $appVersion need to be passed on.

/Andy
Coordinator
Aug 7, 2014 at 9:31 PM
Will look in to fixing this.
Coordinator
Aug 9, 2014 at 7:28 PM
This has been fixed in the latest commit and will be included in the next release.
Aug 11, 2014 at 3:10 AM
Hi Sean

There is a problem with the log filename because of these declarations,
[string] $appVendor = $Null,
[string] $appName = $Null,
[string] $appVersion = $Null,
The $appVendor, $appName and $appVersion from Deploy-Application.ps1 will be overwrite and go to this function,
# Set up sample variables if Dot Sourcing the script or app details have not been specified
If ((!$appVendor) -and (!$appName) -and (!$appVersion)) {
    $appVendor = "PS"
    $appName = $appDeployMainScriptFriendlyName
    $appVersion = $appDeployMainScriptVersion
    $appLang = $currentLanguage
    $appRevision = "01"
    $appArch = ""
}
/Andy
Aug 11, 2014 at 4:19 AM
Edited Aug 11, 2014 at 9:21 AM
The reboot is also not working.
Start-Process $PSHOME\powershell.exe -ArgumentList "-ExecutionPolicy Bypass -NoProfile -WindowStyle Hidden -File `"$scriptPath`" -ReferringApplication `"$installName`" -ShowInstallationRestartPrompt $installRestartPromptParameters" -WindowStyle Hidden -ErrorAction SilentlyContinue
The last few entries in the main log,
[11-08-2014 06:10:52] [Installation] Invoking Show-InstallationRestartPrompt asynchronously with no countdown...
[11-08-2014 06:10:52] [Post-Installation] PS_AppDeployToolkitMain_3.1.6 Installation completed with exit code [0].
[11-08-2014 06:10:52] [Post-Installation] ----------------------------------------------------------------------------------------------------------
The asynchronous log is now called: App_Deploy_Toolkit_Main.log
[11-08-2014 06:10:54] [Initialization] App_Deploy_Toolkit_Main setup started.
[11-08-2014 06:10:54] [Initialization] Script [C:\Temp\Release\AppDeployToolkit\AppDeployToolkitExtensions.ps1] dot-source invoked by [C:\Temp\Release\AppDeployToolkit\AppDeployToolkitMain.ps1]
[11-08-2014 06:10:54] [Initialization] App Deploy Toolkit Main script version is [3.1.6]
[11-08-2014 06:10:54] [Initialization] The following non-default parameters were passed to [App Deploy Toolkit Main]: [-appVendor App -appName Deploy -appVersion Toolkit -appArch Main -appLang 3.1.6 -ShowInstallationRestartPrompt -NoCountdown True ]
[11-08-2014 06:10:54] [Initialization] App Deploy Toolkit Extensions version is [1.0.0]
[11-08-2014 06:10:54] [Initialization] PowerShell version is [2.0 x86]
[11-08-2014 06:10:54] [Initialization] PowerShell host is [ConsoleHost version 2.0]
[11-08-2014 06:10:54] [Initialization] OS version is [Microsoft Windows 7 Enterprise  32-bit 6.1.7601]
[11-08-2014 06:10:54] [Initialization] Hardware platform is [Virtual:XXX]
[11-08-2014 06:10:54] [Initialization] Computer name is [XXX]
[11-08-2014 06:10:54] [Initialization] Current user is [KVAERNER-NO\XXX$]
[11-08-2014 06:10:54] [Initialization] Current Culture is [en-US] and UI language is [EN]
[11-08-2014 06:10:54] [Initialization] Deployment type is [Installation]
[11-08-2014 06:10:54] [Initialization] Script [C:\Temp\Release\AppDeployToolkit\AppDeployToolkitMain.ps1] invoked directly
Not sure what is the problem. :)

/Andy
Aug 13, 2014 at 2:22 AM
Hi Sean

Are you looking at this bug, or maybe something I did wrong?

Thanks.

/Andy
Coordinator
Aug 13, 2014 at 9:00 AM
Hi Andy,

I will get around to fixing this before the next release, just short for time at the moment. Not sure if you have tested the latest beta from the source code tab?

Sean
Aug 13, 2014 at 9:15 AM
Yea, the problem is in the latest source. The last commited changes is on Sunday and I downloaded the source and test on Monday. Don't see any other commit changes for the past few days. ;-)

/Andy
Coordinator
Aug 13, 2014 at 8:20 PM
OK this should be fixed now in the latest source - would appreciate someone running a test to confirm, thanks.
Aug 14, 2014 at 4:23 AM
Hi Sean

Everything seems to be ok now, wil give it a few more tests.

/Andy