Quantcast
Channel: PowerShell App Deployment Toolkit
Viewing all 2341 articles
Browse latest View live

Commented Unassigned: Powershell Application Toolkit Show-InstallationPrompt -ButtonLeftText "No" [191]

$
0
0


Ok so I have the following scripted:

Show-InstallationPrompt -Message 'You are about to remove Notepad++ 6.7.5 from your computer. Please select "OK" to continue. Thank you!' -ButtonLeftText "No" -ButtonRightText 'OK' -Icon Warning

When I select "OK" the script continues and the uninstall works perfect. The problem is that when I select "No", the script doesn't exit...it just runs the install as if I selected "OK".

According to the documentation:

Show-InstallationPrompt
Synopsis : Displays a custom installation prompt with the toolkit branding and optional buttons.
Description:
Any combination of Left, Middle or Right buttons can be displayed. The return value of the button clicked by the user is the button text specified.


So if "No" is selected it should return "No" and not allow the rest of the script to run...correct????

Can someone help me???
Comments: So I figured this out...probably endless ways to do this but I did the following...simple $Output=Show-InstallationPrompt -Message 'You are about to remove Notepad++ 6.7.5 from your computer. Please select "OK" to continue, or Exit to abort unistallation. Thank you!' -Icon Warning -ButtonLeftText 'Yes' -ButtonRightText 'Exit' If ($Output -eq 'Exit') { Exit-Script }

New Post: Progress bar rather than spinning icon?

$
0
0
Technically yes this is feasible. However the progress dialog is written in Windows Presentation Format to achieve the multi threaded UI that runs in parallel to the installation. Adding an indeterminate progress bar is not as straight forward as one would think especially if you are familiar with Windows Forms as with WPF you need to write custom code to essentially animate the progress bar. If someone from the community wants to contribute the code for this we can look at including it but for now it would not be a priority.

Am 23.03.2015 um 17:00 schrieb NakedNuts <[email removed]>:

From: NakedNuts

Hi Guys

Is there any way to customise PADT deployments to show a progress bar instead. I was considering using Write-Progress. Not sure if this would work or where to put it if I am honest.

Any chance this is possible?

Thanks in advance
NN

New Post: Is this a bug?

$
0
0
I noticed an anomaly in an attempt to isolate another anomaly.
## Build the Installation Name
If ($appArch) {
    [string]$installName = $appVendor + '_' + $appName + '_' + $appVersion + '_' + $appArch + '_' + $appLang + '_' + $appRevision
}
Else {
    [string]$installName = $appVendor + '_' + $appName + '_' + $appVersion + '_' + $appLang + '_' + $appRevision
}
[string]$installName = $installName.Trim('_') -replace '[_]+','_'
should resolve to (at least it does initially)
PS_Wireshark_1.12.4_EN_01
and if that is correct then
Write-Log -Message "[Custom-logging] :: [$installName] :: -CheckExist parameter was applied. Proceeding, please wait."
should resolve to
[03-24-2015 18:35:05.848] [Pre-Uninstallation] :: [Custom-logging] :: [PS_Wireshark_1.12.4_EN_01] :: -CheckExist parameter was applied. Proceeding, please wait.
instead it resolved to
[03-24-2015 18:35:05.848] [Pre-Uninstallation] :: [Custom-logging] :: [@{InstallSource=; UninstallString="C:\Program Files\Wireshark\uninstall.exe"; Is64BitApplication=False; ProductCode=Wireshark; InstallLocation=C:\Program Files\Wireshark; Publisher=The Wireshark developer community, http://www.wireshark.org; InstallDate=; DisplayVersion=1.12.4; DisplayName=Wireshark 1.12.4 (64-bit)}] :: -CheckExist parameter was applied. Proceeding, please wait.
When called via a custom function in the AppDeployToolkitExtensions.ps1

New Post: Is this a bug?

$
0
0
Disregard. I recycled the wrong variable. Problem solved.

New Post: Deployment Script: IE10 needs one reboot (x86 and X64)

$
0
0
I am curious how the installer works:

cmd.exe /c "C:\Windows\System32\dism.exe /online /add-package /packagepath:$dirfiles\IE10-neutral.Downloaded.cab /quiet /norestart"

It seems that I am missing something pretty big as I don't have that file anywhere.

If i run the ie setup the files are supposed to be located in TEMP, but they are not.

Is that essentially how you get the files, then put them all in your "Files" folder?

Commented Unassigned: ToolKit hangs when Show-InstallationWelcome is executed because non-Interactive mode does not get set [188]

$
0
0
I am using the 3.6.0 release with SCCM 2012 R2 CU3. The toolkit will completely hang due to the 2 exceptions I have pasted below.

* It worked when I installed to a 32-bit Win7 machine with UAC Off and local admin.
* Toolkit hung on 64-bit Win7 machine with UAC On and no local admin
* Toolkit hung during an OSD of a 64-bit Win7 Machine.

The deployment is configured like this:
* Installation Behavior: Install for system
* Logon requirement: Whether or not a user is logged in

```
[Pre-Installation] :: Error Record:
-------------

Message : Exception calling "ShowDialog" with "0" argument(s): "Showing
a modal dialog box or form when the application is not
running in UserInteractive mode is not a valid operation.
Specify the ServiceNotification or DefaultDesktopOnly style
to display a notification from a service application."
InnerException : System.InvalidOperationException: Showing a modal dialog box
or form when the application is not running in
UserInteractive mode is not a valid operation. Specify the
ServiceNotification or DefaultDesktopOnly style to display a
notification from a service application.
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at CallSite.Target(Closure , CallSite , Object )

FullyQualifiedErrorId : InvalidOperationException
ScriptStackTrace : at Show-WelcomePrompt<Process>, C:\WINDOWS\ccmcache\8y\
AppDeployToolkit\AppDeployToolkitMain.ps1: line 5554
at Show-InstallationWelcome<Process>, C:\WINDOWS\ccmcac
he\8y\AppDeployToolkit\AppDeployToolkitMain.ps1: line
4921
at <ScriptBlock>,
C:\WINDOWS\ccmcache\8y\Deploy-Application.ps1: line 102
at <ScriptBlock>, <No file>: line 1
at <ScriptBlock>, <No file>: line 1

PositionMessage : At C:\WINDOWS\ccmcache\8y\AppDeployToolkit\AppDeployToolkitMa
in.ps1:5554 char:3
+ $result = $formWelcome.ShowDialog()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Error Inner Exception(s):
-------------------------

Message : Showing a modal dialog box or form when the application is
not running in UserInteractive mode is not a valid operation.
Specify the ServiceNotification or DefaultDesktopOnly style
to display a notification from a service application.
InnerException :



Deploy Application 3/17/2015 3:06:16 PM 4208 (0x1070)

```

```
[Pre-Installation] :: Display Dialog Box with message: Error Record:
-------------

Message : Exception calling "ShowDialog" with "0" argument(s): "Showing
a modal dialog box or form when the application is not
running in UserInteractive mode is not a valid operation.
Specify the ServiceNotification or DefaultDesktopOnly style
to display a notification from a service application."
InnerException : System.InvalidOperationException: Showing a modal dialog box
or form when the application is not running in
UserInteractive mode is not a valid operation. Specify the
ServiceNotification or DefaultDesktopOnly style to display a
notification from a service application.
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at CallSite.Target(Closure , CallSite , Object )

FullyQualifiedErrorId : InvalidOperationException
ScriptStackTrace : at Show-WelcomePrompt<Process>, C:\WINDOWS\ccmcache\8y\
AppDeployToolkit\AppDeployToolkitMain.ps1: line 5554
at Show-InstallationWelcome<Process>, C:\WINDOWS\ccmcac
he\8y\AppDeployToolkit\AppDeployToolkitMain.ps1: line
4921
at <ScriptBlock>,
C:\WINDOWS\ccmcache\8y\Deploy-Application.ps1: line 102
at <ScriptBlock>, <No file>: line 1
at <ScriptBlock>, <No file>: line 1

PositionMessage : At C:\WINDOWS\ccmcache\8y\AppDeployToolkit\AppDeployToolkitMa
in.ps1:5554 char:3
+ $result = $formWelcome.ShowDialog()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Error Inner Exception(s):
-------------------------

Message : Showing a modal dialog box or form when the application is
not running in UserInteractive mode is not a valid operation.
Specify the ServiceNotification or DefaultDesktopOnly style
to display a notification from a service application.
InnerException :



... Show-DialogBox 3/17/2015 3:06:16 PM 4208 (0x1070)

```
Comments: Just to be clear, I am not using that switch. When I tested the deployment I had only 1 Internet Explorer window open. Here is line used. ``` Show-InstallationWelcome -CloseApps "iexplore=Internet Explorer" -CloseAppsCountdown 600 -BlockExecution ``` When I tested this with 3.6.1, the Welcome screen did not show, the application was closed and the installation continued. In the past the PSADT would interact with the user if they were logged in. I was testing this with the following system configuration: OS= Windows 7 Enterprise x64 User=Standard UAC=On PowerShell = 4.0 If you need me to provide logs let me know.

Commented Unassigned: ToolKit hangs when Show-InstallationWelcome is executed because non-Interactive mode does not get set [188]

$
0
0
I am using the 3.6.0 release with SCCM 2012 R2 CU3. The toolkit will completely hang due to the 2 exceptions I have pasted below.

* It worked when I installed to a 32-bit Win7 machine with UAC Off and local admin.
* Toolkit hung on 64-bit Win7 machine with UAC On and no local admin
* Toolkit hung during an OSD of a 64-bit Win7 Machine.

The deployment is configured like this:
* Installation Behavior: Install for system
* Logon requirement: Whether or not a user is logged in

```
[Pre-Installation] :: Error Record:
-------------

Message : Exception calling "ShowDialog" with "0" argument(s): "Showing
a modal dialog box or form when the application is not
running in UserInteractive mode is not a valid operation.
Specify the ServiceNotification or DefaultDesktopOnly style
to display a notification from a service application."
InnerException : System.InvalidOperationException: Showing a modal dialog box
or form when the application is not running in
UserInteractive mode is not a valid operation. Specify the
ServiceNotification or DefaultDesktopOnly style to display a
notification from a service application.
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at CallSite.Target(Closure , CallSite , Object )

FullyQualifiedErrorId : InvalidOperationException
ScriptStackTrace : at Show-WelcomePrompt<Process>, C:\WINDOWS\ccmcache\8y\
AppDeployToolkit\AppDeployToolkitMain.ps1: line 5554
at Show-InstallationWelcome<Process>, C:\WINDOWS\ccmcac
he\8y\AppDeployToolkit\AppDeployToolkitMain.ps1: line
4921
at <ScriptBlock>,
C:\WINDOWS\ccmcache\8y\Deploy-Application.ps1: line 102
at <ScriptBlock>, <No file>: line 1
at <ScriptBlock>, <No file>: line 1

PositionMessage : At C:\WINDOWS\ccmcache\8y\AppDeployToolkit\AppDeployToolkitMa
in.ps1:5554 char:3
+ $result = $formWelcome.ShowDialog()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Error Inner Exception(s):
-------------------------

Message : Showing a modal dialog box or form when the application is
not running in UserInteractive mode is not a valid operation.
Specify the ServiceNotification or DefaultDesktopOnly style
to display a notification from a service application.
InnerException :



Deploy Application 3/17/2015 3:06:16 PM 4208 (0x1070)

```

```
[Pre-Installation] :: Display Dialog Box with message: Error Record:
-------------

Message : Exception calling "ShowDialog" with "0" argument(s): "Showing
a modal dialog box or form when the application is not
running in UserInteractive mode is not a valid operation.
Specify the ServiceNotification or DefaultDesktopOnly style
to display a notification from a service application."
InnerException : System.InvalidOperationException: Showing a modal dialog box
or form when the application is not running in
UserInteractive mode is not a valid operation. Specify the
ServiceNotification or DefaultDesktopOnly style to display a
notification from a service application.
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at CallSite.Target(Closure , CallSite , Object )

FullyQualifiedErrorId : InvalidOperationException
ScriptStackTrace : at Show-WelcomePrompt<Process>, C:\WINDOWS\ccmcache\8y\
AppDeployToolkit\AppDeployToolkitMain.ps1: line 5554
at Show-InstallationWelcome<Process>, C:\WINDOWS\ccmcac
he\8y\AppDeployToolkit\AppDeployToolkitMain.ps1: line
4921
at <ScriptBlock>,
C:\WINDOWS\ccmcache\8y\Deploy-Application.ps1: line 102
at <ScriptBlock>, <No file>: line 1
at <ScriptBlock>, <No file>: line 1

PositionMessage : At C:\WINDOWS\ccmcache\8y\AppDeployToolkit\AppDeployToolkitMa
in.ps1:5554 char:3
+ $result = $formWelcome.ShowDialog()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Error Inner Exception(s):
-------------------------

Message : Showing a modal dialog box or form when the application is
not running in UserInteractive mode is not a valid operation.
Specify the ServiceNotification or DefaultDesktopOnly style
to display a notification from a service application.
InnerException :



... Show-DialogBox 3/17/2015 3:06:16 PM 4208 (0x1070)

```
Comments: BTW. It looks like 3.6.1 has the fix mentioned in https://psappdeploytoolkit.codeplex.com/workitem/172 and the issue is still occurring for me.

Closed Unassigned: Powershell Application Toolkit Show-InstallationPrompt -ButtonLeftText "No" [191]

$
0
0


Ok so I have the following scripted:

Show-InstallationPrompt -Message 'You are about to remove Notepad++ 6.7.5 from your computer. Please select "OK" to continue. Thank you!' -ButtonLeftText "No" -ButtonRightText 'OK' -Icon Warning

When I select "OK" the script continues and the uninstall works perfect. The problem is that when I select "No", the script doesn't exit...it just runs the install as if I selected "OK".

According to the documentation:

Show-InstallationPrompt
Synopsis : Displays a custom installation prompt with the toolkit branding and optional buttons.
Description:
Any combination of Left, Middle or Right buttons can be displayed. The return value of the button clicked by the user is the button text specified.


So if "No" is selected it should return "No" and not allow the rest of the script to run...correct????

Can someone help me???

Commented Unassigned: ToolKit hangs when Show-InstallationWelcome is executed because non-Interactive mode does not get set [188]

$
0
0
I am using the 3.6.0 release with SCCM 2012 R2 CU3. The toolkit will completely hang due to the 2 exceptions I have pasted below.

* It worked when I installed to a 32-bit Win7 machine with UAC Off and local admin.
* Toolkit hung on 64-bit Win7 machine with UAC On and no local admin
* Toolkit hung during an OSD of a 64-bit Win7 Machine.

The deployment is configured like this:
* Installation Behavior: Install for system
* Logon requirement: Whether or not a user is logged in

```
[Pre-Installation] :: Error Record:
-------------

Message : Exception calling "ShowDialog" with "0" argument(s): "Showing
a modal dialog box or form when the application is not
running in UserInteractive mode is not a valid operation.
Specify the ServiceNotification or DefaultDesktopOnly style
to display a notification from a service application."
InnerException : System.InvalidOperationException: Showing a modal dialog box
or form when the application is not running in
UserInteractive mode is not a valid operation. Specify the
ServiceNotification or DefaultDesktopOnly style to display a
notification from a service application.
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at CallSite.Target(Closure , CallSite , Object )

FullyQualifiedErrorId : InvalidOperationException
ScriptStackTrace : at Show-WelcomePrompt<Process>, C:\WINDOWS\ccmcache\8y\
AppDeployToolkit\AppDeployToolkitMain.ps1: line 5554
at Show-InstallationWelcome<Process>, C:\WINDOWS\ccmcac
he\8y\AppDeployToolkit\AppDeployToolkitMain.ps1: line
4921
at <ScriptBlock>,
C:\WINDOWS\ccmcache\8y\Deploy-Application.ps1: line 102
at <ScriptBlock>, <No file>: line 1
at <ScriptBlock>, <No file>: line 1

PositionMessage : At C:\WINDOWS\ccmcache\8y\AppDeployToolkit\AppDeployToolkitMa
in.ps1:5554 char:3
+ $result = $formWelcome.ShowDialog()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Error Inner Exception(s):
-------------------------

Message : Showing a modal dialog box or form when the application is
not running in UserInteractive mode is not a valid operation.
Specify the ServiceNotification or DefaultDesktopOnly style
to display a notification from a service application.
InnerException :



Deploy Application 3/17/2015 3:06:16 PM 4208 (0x1070)

```

```
[Pre-Installation] :: Display Dialog Box with message: Error Record:
-------------

Message : Exception calling "ShowDialog" with "0" argument(s): "Showing
a modal dialog box or form when the application is not
running in UserInteractive mode is not a valid operation.
Specify the ServiceNotification or DefaultDesktopOnly style
to display a notification from a service application."
InnerException : System.InvalidOperationException: Showing a modal dialog box
or form when the application is not running in
UserInteractive mode is not a valid operation. Specify the
ServiceNotification or DefaultDesktopOnly style to display a
notification from a service application.
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at CallSite.Target(Closure , CallSite , Object )

FullyQualifiedErrorId : InvalidOperationException
ScriptStackTrace : at Show-WelcomePrompt<Process>, C:\WINDOWS\ccmcache\8y\
AppDeployToolkit\AppDeployToolkitMain.ps1: line 5554
at Show-InstallationWelcome<Process>, C:\WINDOWS\ccmcac
he\8y\AppDeployToolkit\AppDeployToolkitMain.ps1: line
4921
at <ScriptBlock>,
C:\WINDOWS\ccmcache\8y\Deploy-Application.ps1: line 102
at <ScriptBlock>, <No file>: line 1
at <ScriptBlock>, <No file>: line 1

PositionMessage : At C:\WINDOWS\ccmcache\8y\AppDeployToolkit\AppDeployToolkitMa
in.ps1:5554 char:3
+ $result = $formWelcome.ShowDialog()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Error Inner Exception(s):
-------------------------

Message : Showing a modal dialog box or form when the application is
not running in UserInteractive mode is not a valid operation.
Specify the ServiceNotification or DefaultDesktopOnly style
to display a notification from a service application.
InnerException :



... Show-DialogBox 3/17/2015 3:06:16 PM 4208 (0x1070)

```
Comments: Sure, share your log. Are you using anything like ServiceUI.exe to show UI elements in the user session when the install runs in the SYSTEM context via SCCM?

New Post: Show-InstallationPrompt Fails to display on specific conditions PSADTv3.5 & v3.6

$
0
0
Apparently there was is a variable $InstallName in the AppDeployToolkitMain.ps1 that I was unaware existed and I learned the hard way the effects of inadvertently recycling/ re-purposing variables that have already been declared. I renamed the variable $InstallName in my Deploy-Application.ps1 to $InstallDisplayName and problem solved.

New Post: Messages displayed in the (Primary) Language of the current Logged on User

$
0
0
What was the error? Can't really help without that information. The ISE probably loads functions and make them available for you to use no matter where you choose to use them. However, when you deploy a script, you have to make sure you use a function after you have declared it. Make sure you're using the Get-RegistryKey function after the section where functions are declared.

New Post: Messages displayed in the (Primary) Language of the current Logged on User

$
0
0

OK I will do that.

It just says failed in Software center.

Where can I find the Errorlog?

When I start the script manual I can find a log under c:\windows\Logs\Software?

But deploying with SCCM the log is not made in c:\windows\Logs\Software.

Regards Edwin

New Post: Messages displayed in the (Primary) Language of the current Logged on User

$
0
0
The log file will be in what ever location you configured in your XMl configuration file. I don't see any reason why there would not be a log file unless you specifically disabled it.

Commented Unassigned: ToolKit hangs when Show-InstallationWelcome is executed because non-Interactive mode does not get set [188]

$
0
0
I am using the 3.6.0 release with SCCM 2012 R2 CU3. The toolkit will completely hang due to the 2 exceptions I have pasted below.

* It worked when I installed to a 32-bit Win7 machine with UAC Off and local admin.
* Toolkit hung on 64-bit Win7 machine with UAC On and no local admin
* Toolkit hung during an OSD of a 64-bit Win7 Machine.

The deployment is configured like this:
* Installation Behavior: Install for system
* Logon requirement: Whether or not a user is logged in

```
[Pre-Installation] :: Error Record:
-------------

Message : Exception calling "ShowDialog" with "0" argument(s): "Showing
a modal dialog box or form when the application is not
running in UserInteractive mode is not a valid operation.
Specify the ServiceNotification or DefaultDesktopOnly style
to display a notification from a service application."
InnerException : System.InvalidOperationException: Showing a modal dialog box
or form when the application is not running in
UserInteractive mode is not a valid operation. Specify the
ServiceNotification or DefaultDesktopOnly style to display a
notification from a service application.
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at CallSite.Target(Closure , CallSite , Object )

FullyQualifiedErrorId : InvalidOperationException
ScriptStackTrace : at Show-WelcomePrompt<Process>, C:\WINDOWS\ccmcache\8y\
AppDeployToolkit\AppDeployToolkitMain.ps1: line 5554
at Show-InstallationWelcome<Process>, C:\WINDOWS\ccmcac
he\8y\AppDeployToolkit\AppDeployToolkitMain.ps1: line
4921
at <ScriptBlock>,
C:\WINDOWS\ccmcache\8y\Deploy-Application.ps1: line 102
at <ScriptBlock>, <No file>: line 1
at <ScriptBlock>, <No file>: line 1

PositionMessage : At C:\WINDOWS\ccmcache\8y\AppDeployToolkit\AppDeployToolkitMa
in.ps1:5554 char:3
+ $result = $formWelcome.ShowDialog()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Error Inner Exception(s):
-------------------------

Message : Showing a modal dialog box or form when the application is
not running in UserInteractive mode is not a valid operation.
Specify the ServiceNotification or DefaultDesktopOnly style
to display a notification from a service application.
InnerException :



Deploy Application 3/17/2015 3:06:16 PM 4208 (0x1070)

```

```
[Pre-Installation] :: Display Dialog Box with message: Error Record:
-------------

Message : Exception calling "ShowDialog" with "0" argument(s): "Showing
a modal dialog box or form when the application is not
running in UserInteractive mode is not a valid operation.
Specify the ServiceNotification or DefaultDesktopOnly style
to display a notification from a service application."
InnerException : System.InvalidOperationException: Showing a modal dialog box
or form when the application is not running in
UserInteractive mode is not a valid operation. Specify the
ServiceNotification or DefaultDesktopOnly style to display a
notification from a service application.
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at CallSite.Target(Closure , CallSite , Object )

FullyQualifiedErrorId : InvalidOperationException
ScriptStackTrace : at Show-WelcomePrompt<Process>, C:\WINDOWS\ccmcache\8y\
AppDeployToolkit\AppDeployToolkitMain.ps1: line 5554
at Show-InstallationWelcome<Process>, C:\WINDOWS\ccmcac
he\8y\AppDeployToolkit\AppDeployToolkitMain.ps1: line
4921
at <ScriptBlock>,
C:\WINDOWS\ccmcache\8y\Deploy-Application.ps1: line 102
at <ScriptBlock>, <No file>: line 1
at <ScriptBlock>, <No file>: line 1

PositionMessage : At C:\WINDOWS\ccmcache\8y\AppDeployToolkit\AppDeployToolkitMa
in.ps1:5554 char:3
+ $result = $formWelcome.ShowDialog()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Error Inner Exception(s):
-------------------------

Message : Showing a modal dialog box or form when the application is
not running in UserInteractive mode is not a valid operation.
Specify the ServiceNotification or DefaultDesktopOnly style
to display a notification from a service application.
InnerException :



... Show-DialogBox 3/17/2015 3:06:16 PM 4208 (0x1070)

```
Comments: Hi, Have you tried to use ForceCloseAppsCountdown instead of CloseAppsCountDown. ForceCloseAppsCountdown Option to provide a countdown in seconds until the specified applications are automatically closed regardless of whether deferral is allowed. CloseAppsCountdown Option to provide a countdown in seconds until the specified applications are automatically closed. This only takes effect if deferral is now allowed or has expired. /Thomas

New Post: Progress bar rather than spinning icon?

$
0
0
PowerSheller wrote:
Technically yes this is feasible. However the progress dialog is written in Windows Presentation Format to achieve the multi threaded UI that runs in parallel to the installation. Adding an indeterminate progress bar is not as straight forward as one would think especially if you are familiar with Windows Forms as with WPF you need to write custom code to essentially animate the progress bar. If someone from the community wants to contribute the code for this we can look at including it but for now it would not be a priority. Am 23.03.2015 um 17:00 schrieb NakedNuts <[email removed]>: From: NakedNuts Hi Guys Is there any way to customise PADT deployments to show a progress bar instead. I was considering using Write-Progress. Not sure if this would work or where to put it if I am honest. Any chance this is possible? Thanks in advance NN
The PSADT leverages the "Ellipse" style progress indicator, the "Marquee" although different in appearance is similar in function in that it will spin as along as the "Function Show-InstallationProgress {}" is initialized. That said, how difficult would it be to modify "Function Show-InstallationProgress {}" to leverage a Marquee style progress indicator as opposed to Ellipse? The example below is from an Autoit based Deployment Toolkit (of sorts) which functions in the same capacity as the PSADT "Function Show-InstallationProgress {}".

MarqueeProgress

Commented Unassigned: ToolKit hangs when Show-InstallationWelcome is executed because non-Interactive mode does not get set [188]

$
0
0
I am using the 3.6.0 release with SCCM 2012 R2 CU3. The toolkit will completely hang due to the 2 exceptions I have pasted below.

* It worked when I installed to a 32-bit Win7 machine with UAC Off and local admin.
* Toolkit hung on 64-bit Win7 machine with UAC On and no local admin
* Toolkit hung during an OSD of a 64-bit Win7 Machine.

The deployment is configured like this:
* Installation Behavior: Install for system
* Logon requirement: Whether or not a user is logged in

```
[Pre-Installation] :: Error Record:
-------------

Message : Exception calling "ShowDialog" with "0" argument(s): "Showing
a modal dialog box or form when the application is not
running in UserInteractive mode is not a valid operation.
Specify the ServiceNotification or DefaultDesktopOnly style
to display a notification from a service application."
InnerException : System.InvalidOperationException: Showing a modal dialog box
or form when the application is not running in
UserInteractive mode is not a valid operation. Specify the
ServiceNotification or DefaultDesktopOnly style to display a
notification from a service application.
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at CallSite.Target(Closure , CallSite , Object )

FullyQualifiedErrorId : InvalidOperationException
ScriptStackTrace : at Show-WelcomePrompt<Process>, C:\WINDOWS\ccmcache\8y\
AppDeployToolkit\AppDeployToolkitMain.ps1: line 5554
at Show-InstallationWelcome<Process>, C:\WINDOWS\ccmcac
he\8y\AppDeployToolkit\AppDeployToolkitMain.ps1: line
4921
at <ScriptBlock>,
C:\WINDOWS\ccmcache\8y\Deploy-Application.ps1: line 102
at <ScriptBlock>, <No file>: line 1
at <ScriptBlock>, <No file>: line 1

PositionMessage : At C:\WINDOWS\ccmcache\8y\AppDeployToolkit\AppDeployToolkitMa
in.ps1:5554 char:3
+ $result = $formWelcome.ShowDialog()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Error Inner Exception(s):
-------------------------

Message : Showing a modal dialog box or form when the application is
not running in UserInteractive mode is not a valid operation.
Specify the ServiceNotification or DefaultDesktopOnly style
to display a notification from a service application.
InnerException :



Deploy Application 3/17/2015 3:06:16 PM 4208 (0x1070)

```

```
[Pre-Installation] :: Display Dialog Box with message: Error Record:
-------------

Message : Exception calling "ShowDialog" with "0" argument(s): "Showing
a modal dialog box or form when the application is not
running in UserInteractive mode is not a valid operation.
Specify the ServiceNotification or DefaultDesktopOnly style
to display a notification from a service application."
InnerException : System.InvalidOperationException: Showing a modal dialog box
or form when the application is not running in
UserInteractive mode is not a valid operation. Specify the
ServiceNotification or DefaultDesktopOnly style to display a
notification from a service application.
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at CallSite.Target(Closure , CallSite , Object )

FullyQualifiedErrorId : InvalidOperationException
ScriptStackTrace : at Show-WelcomePrompt<Process>, C:\WINDOWS\ccmcache\8y\
AppDeployToolkit\AppDeployToolkitMain.ps1: line 5554
at Show-InstallationWelcome<Process>, C:\WINDOWS\ccmcac
he\8y\AppDeployToolkit\AppDeployToolkitMain.ps1: line
4921
at <ScriptBlock>,
C:\WINDOWS\ccmcache\8y\Deploy-Application.ps1: line 102
at <ScriptBlock>, <No file>: line 1
at <ScriptBlock>, <No file>: line 1

PositionMessage : At C:\WINDOWS\ccmcache\8y\AppDeployToolkit\AppDeployToolkitMa
in.ps1:5554 char:3
+ $result = $formWelcome.ShowDialog()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Error Inner Exception(s):
-------------------------

Message : Showing a modal dialog box or form when the application is
not running in UserInteractive mode is not a valid operation.
Specify the ServiceNotification or DefaultDesktopOnly style
to display a notification from a service application.
InnerException :



... Show-DialogBox 3/17/2015 3:06:16 PM 4208 (0x1070)

```
Comments: ForceCloseAppsCountdown has the same effect. I am not using anything to show UI elements. I thought another method was being used in the Toolkit to display UI elements to the user session from the SYSTEM context. On my 64-bit machines the script is detecting non-interactive. On my x86 machines it run interactively. I have attached the x64 log.

Commented Unassigned: ToolKit hangs when Show-InstallationWelcome is executed because non-Interactive mode does not get set [188]

$
0
0
I am using the 3.6.0 release with SCCM 2012 R2 CU3. The toolkit will completely hang due to the 2 exceptions I have pasted below.

* It worked when I installed to a 32-bit Win7 machine with UAC Off and local admin.
* Toolkit hung on 64-bit Win7 machine with UAC On and no local admin
* Toolkit hung during an OSD of a 64-bit Win7 Machine.

The deployment is configured like this:
* Installation Behavior: Install for system
* Logon requirement: Whether or not a user is logged in

```
[Pre-Installation] :: Error Record:
-------------

Message : Exception calling "ShowDialog" with "0" argument(s): "Showing
a modal dialog box or form when the application is not
running in UserInteractive mode is not a valid operation.
Specify the ServiceNotification or DefaultDesktopOnly style
to display a notification from a service application."
InnerException : System.InvalidOperationException: Showing a modal dialog box
or form when the application is not running in
UserInteractive mode is not a valid operation. Specify the
ServiceNotification or DefaultDesktopOnly style to display a
notification from a service application.
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at CallSite.Target(Closure , CallSite , Object )

FullyQualifiedErrorId : InvalidOperationException
ScriptStackTrace : at Show-WelcomePrompt<Process>, C:\WINDOWS\ccmcache\8y\
AppDeployToolkit\AppDeployToolkitMain.ps1: line 5554
at Show-InstallationWelcome<Process>, C:\WINDOWS\ccmcac
he\8y\AppDeployToolkit\AppDeployToolkitMain.ps1: line
4921
at <ScriptBlock>,
C:\WINDOWS\ccmcache\8y\Deploy-Application.ps1: line 102
at <ScriptBlock>, <No file>: line 1
at <ScriptBlock>, <No file>: line 1

PositionMessage : At C:\WINDOWS\ccmcache\8y\AppDeployToolkit\AppDeployToolkitMa
in.ps1:5554 char:3
+ $result = $formWelcome.ShowDialog()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Error Inner Exception(s):
-------------------------

Message : Showing a modal dialog box or form when the application is
not running in UserInteractive mode is not a valid operation.
Specify the ServiceNotification or DefaultDesktopOnly style
to display a notification from a service application.
InnerException :



Deploy Application 3/17/2015 3:06:16 PM 4208 (0x1070)

```

```
[Pre-Installation] :: Display Dialog Box with message: Error Record:
-------------

Message : Exception calling "ShowDialog" with "0" argument(s): "Showing
a modal dialog box or form when the application is not
running in UserInteractive mode is not a valid operation.
Specify the ServiceNotification or DefaultDesktopOnly style
to display a notification from a service application."
InnerException : System.InvalidOperationException: Showing a modal dialog box
or form when the application is not running in
UserInteractive mode is not a valid operation. Specify the
ServiceNotification or DefaultDesktopOnly style to display a
notification from a service application.
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at CallSite.Target(Closure , CallSite , Object )

FullyQualifiedErrorId : InvalidOperationException
ScriptStackTrace : at Show-WelcomePrompt<Process>, C:\WINDOWS\ccmcache\8y\
AppDeployToolkit\AppDeployToolkitMain.ps1: line 5554
at Show-InstallationWelcome<Process>, C:\WINDOWS\ccmcac
he\8y\AppDeployToolkit\AppDeployToolkitMain.ps1: line
4921
at <ScriptBlock>,
C:\WINDOWS\ccmcache\8y\Deploy-Application.ps1: line 102
at <ScriptBlock>, <No file>: line 1
at <ScriptBlock>, <No file>: line 1

PositionMessage : At C:\WINDOWS\ccmcache\8y\AppDeployToolkit\AppDeployToolkitMa
in.ps1:5554 char:3
+ $result = $formWelcome.ShowDialog()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Error Inner Exception(s):
-------------------------

Message : Showing a modal dialog box or form when the application is
not running in UserInteractive mode is not a valid operation.
Specify the ServiceNotification or DefaultDesktopOnly style
to display a notification from a service application.
InnerException :



... Show-DialogBox 3/17/2015 3:06:16 PM 4208 (0x1070)

```
Comments: Here is the x86 log that is working. Btw, the Application is using the same deployment type for both architectures in SCCM 2012 R2.

Source code checked in, #10667b73fc85c84428fc2a8f5ce7331e38f2c28a

$
0
0
Changed Zero-Config MSI Deployment to simplify it. Clean up Deploy-Application.ps1 modifications Fixed issue where script would hang when removing deferals (cause: Remove-RegistryKey did not have -Recurse parameter specified)

New Post: Messages displayed in the (Primary) Language of the current Logged on User

$
0
0
I still have Default setting in the XAppDeployToolkitConfig.xml:
<MSI_LogPath>$envWinDir\Logs\Software</MSI_LogPath>
When I start the script manualy with Powershell ISE the logfiles gets there.
With SCCM it won't. And I understand why now.

I think the answer is in your Earlier post:
mmashwani wrote:
However, when you deploy a script, you have to make sure you use a function after you have declared it. Make sure you're using the Get-RegistryKey function after the section where functions are declared.
Because I have the
$HKULanguages = Get-RegistryKey -SID $HKUSID "HKEY_CURRENT_USER\Control Panel\International\User Profile" -Value 'Languages'
Just below the # Override the detected language if the override option was specified in the XML config file Section of the AppDeployToolkitMain.ps1
Which is before the #region Function Get-RegistryKey

Can you give me advise?
I need the Get-registrykey function (especially the Get-RegistryKey -SID) to fill in the Variables (which is earlier then the Get-registrykey function)
  • or must I use other default windows Commands instead... ?

New Post: Messages displayed in the (Primary) Language of the current Logged on User

$
0
0
Move your code towards the end of AppDeployToolkitMain.ps1 right after all of the functions have been defined.
Viewing all 2341 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>