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

Commented Unassigned: Deploy-application.exe not working [141]

$
0
0
Hi,
Earlier Deploy-application.exe is working well. But for some reason its not working with my new app deployment. I didn't do any think weired. I did use the script as i'm using before.
Please advise.
Comments: Download the latest beta version of the toolkit from the "Source Code" tab of this site and see if the updated Deploy-Application.exe and the Deploy-Application.exe.config files work for you.

Commented Unassigned: Test-PowerPoint [140]

$
0
0
I've tried the function but it didn't work.

After changing line 7028:
if ((appBounds.Bottom - appBounds.Top) == screenBounds.Height && (appBounds.Right - appBounds.Left) == screenBounds.Width)

to

if ((appBounds.Bottom + appBounds.Top) == screenBounds.Height && (appBounds.Right + appBounds.Left) == screenBounds.Width)

the function works as expected.

Debugging the C# code i noticed appBounds.Top and appBounds.Left are a negative values so they don't need to be subtracted but added.
Comments: Interesting. I remember doing a lot of testing with this function while developing it and did not have any problems with detecting PowerPoint in fullscreen mode. The way I did my testing, I would launch a test script. Wait for 10 seconds. Put PowerPoint in fullscreen mode, and then exit fullscreen mode in 10 seconds to see if the code detected fullscreen mode. Can you tell me how you tested the code in your scenario? I want to make sure we're on the same page in terms of how we test before I start looking at this code again.

New Post: Detect Active user / Locked Screen / Not Logged On user

$
0
0
Someone available to rewrite above code to some useable code for the AppDeployToolKit ?

New Post: Detect Active user / Locked Screen / Not Logged On user

$
0
0
I don't understand how the above code is not usable. Copy/paste the above code into your script. You can get rid of the Start-Sleep line. Then simply calling this line will give you the result you are looking for: [QueryUser.NotificationState]::GetState()

Then use an if statement of some sort to determine what to do based on the result you get. The result you get will be one of the following:
ScreenSaverOrLockedOrFastUserSwitching, FullScreenOrPresentationMode, RunningDirect3dFullScreen, PresentationMode, AcceptsNotifications, QuietTime, WindowsStoreAppRunning

New Post: Detect Active user / Locked Screen / Not Logged On user

$
0
0
Hi MMashwani...is it that simple....thanks for the update.
I will try...tnx

New Post: Show-InstallationRestartPrompt forced when non-interactive ?

$
0
0
Does anyone know how I can configure my script so it will restart if no user is logged on.
So not bypassing, but a forced restart if nobody is logged on.

Any ideas how ?

Edited Unassigned: sccm "available" vs "required" deployment [143]

$
0
0
Hi,

I'm running a flash player upgrade using the v3.5.0 kit which worked great during my tests.

more specifically the welcome screen:
```
Show-InstallationWelcome -CloseApps "iexplore,firefox" -forceCloseAppsCountdown 900 -BlockExecution -PersistPrompt
```

That works fine when deploying to a machine when the advertisement is "Available". This is good for testing.
```
[Initialization] :: The following user is the console user [[EMEA\mp2827]] (user with control of physical monitor, keyboard, and mouse). PSAppDeployToolkit 1/16/2015 12:43:01 1 (0x0001)
[Initialization] :: Unable to load COM Object [Microsoft.SMS.TSEnvironment]. Therefore, script is not currently running from a SCCM Task Sequence. PSAppDeployToolkit 1/16/2015 12:43:01 1 (0x0001)
[Initialization] :: Session 0 detected, process running in user interactive mode, user(s) logged in. PSAppDeployToolkit 1/16/2015 12:43:01 1 (0x0001)
[Initialization] :: Installation is running in [Interactive] mode. PSAppDeployToolkit 1/16/2015 12:43:01 1 (0x0001)

```
But when starting the actual deployment I want to set it as 'required' so the user gets it installed in any case.
```
[Initialization] :: The following users are logged on to the system: EMEA\mp2827 PSAppDeployToolkit 1/16/2015 13:52:14 1 (0x0001)
[Initialization] :: Current process is running under a system account [NT AUTHORITY\SYSTEM] PSAppDeployToolkit 1/16/2015 13:52:14 1 (0x0001)
[Initialization] :: The following user is the console user [[EMEA\mp2827]] (user with control of physical monitor, keyboard, and mouse). PSAppDeployToolkit 1/16/2015 13:52:14 1 (0x0001)
[Initialization] :: Unable to load COM Object [Microsoft.SMS.TSEnvironment]. Therefore, script is not currently running from a SCCM Task Sequence. PSAppDeployToolkit 1/16/2015 13:52:14 1 (0x0001)
[Initialization] :: Session 0 detected, process not running in user interactive mode: deployment mode set to [NonInteractive]. PSAppDeployToolkit 1/16/2015 13:52:14 1 (0x0001)
[Initialization] :: Installation is running in [NonInteractive] mode. PSAppDeployToolkit 1/16/2015 13:52:14 1 (0x0001)
```

Now the interactive mode is disabled and my users do not get the option any longer to stop their work and properly close IE or FF.

Can anyone confirm if this is by design, or because otherwise is not possible or you have this fixed in 3.6? Because if we can't push out required applications without giving the end-user the option to close off some work before closing the application we need to update then that makes it not possible to user the required option in my eyes.

How do you suggest we work around this?

ps: complaints, I know. But I remain a big fan of this deployment kit, no doubt. It is the best thing around for the job! thanks again for the hard work

Maarten

Edited Unassigned: sccm "available" vs "required" deployment [142]

$
0
0
Hi,

I'm running a flash player upgrade using the v3.5.0 kit which worked great during my tests.

more specifically the welcome screen:
```
Show-InstallationWelcome -CloseApps "iexplore,firefox" -forceCloseAppsCountdown 900 -BlockExecution -PersistPrompt
```

That works fine when deploying to a machine when the advertisement is "Available". This is good for testing.
```
[Initialization] :: The following user is the console user [[EMEA\mp2827]] (user with control of physical monitor, keyboard, and mouse). PSAppDeployToolkit 1/16/2015 12:43:01 1 (0x0001)
[Initialization] :: Unable to load COM Object [Microsoft.SMS.TSEnvironment]. Therefore, script is not currently running from a SCCM Task Sequence. PSAppDeployToolkit 1/16/2015 12:43:01 1 (0x0001)
[Initialization] :: Session 0 detected, process running in user interactive mode, user(s) logged in. PSAppDeployToolkit 1/16/2015 12:43:01 1 (0x0001)
[Initialization] :: Installation is running in [Interactive] mode. PSAppDeployToolkit 1/16/2015 12:43:01 1 (0x0001)

```
But when starting the actual deployment I want to set it as 'required' so the user gets it installed in any case.
```
[Initialization] :: The following users are logged on to the system: EMEA\mp2827 PSAppDeployToolkit 1/16/2015 13:52:14 1 (0x0001)
[Initialization] :: Current process is running under a system account [NT AUTHORITY\SYSTEM] PSAppDeployToolkit 1/16/2015 13:52:14 1 (0x0001)
[Initialization] :: The following user is the console user [[EMEA\mp2827]] (user with control of physical monitor, keyboard, and mouse). PSAppDeployToolkit 1/16/2015 13:52:14 1 (0x0001)
[Initialization] :: Unable to load COM Object [Microsoft.SMS.TSEnvironment]. Therefore, script is not currently running from a SCCM Task Sequence. PSAppDeployToolkit 1/16/2015 13:52:14 1 (0x0001)
[Initialization] :: Session 0 detected, process not running in user interactive mode: deployment mode set to [NonInteractive]. PSAppDeployToolkit 1/16/2015 13:52:14 1 (0x0001)
[Initialization] :: Installation is running in [NonInteractive] mode. PSAppDeployToolkit 1/16/2015 13:52:14 1 (0x0001)
```

The "interactive mode" gets changed into "non-interactive' now and users no longer get the choise to properly stop their work in IE or FF. the browser is closed by the deployment without informing them.

Can anyone confirm if this is by design, or because otherwise is not possible or you have this fixed in 3.6? Because if we can't push out required applications without giving the end-user the option to close off some work before closing the application we need to update then that makes it not possible to user the required option in my eyes.

How do you suggest we work around this?

ps: complaints, I know. But I remain a big fan of this deployment kit, no doubt. It is the best thing around for the job! thanks again for the hard work

Maarten

New Post: Show-InstallationRestartPrompt forced when non-interactive ?

$
0
0
I got the solution already from another post:
#nobody logged on
If ($deployModeNonInteractive) {
   Execute-Process "Shutdown" -Arguments "/R /F /T 10"
} else {
}

New Post: Detect Active user / Locked Screen / Not Logged On user

$
0
0
Hi I tried the following script
$UserNotificationStateSource = @'
using System;
using System.Runtime.InteropServices;
namespace QueryUser
{
    public class NotificationState
    {
        // http://msdn.microsoft.com/en-us/library/bb762533(v=vs.85).aspx
        public enum UserNotificationState
        {
            ScreenSaverOrLockedOrFastUserSwitching=1, FullScreenOrPresentationMode=2, RunningDirect3dFullScreen=3, PresentationMode=4, AcceptsNotifications=5, QuietTime=6, WindowsStoreAppRunning=7
        }
        // Only for Vista or above
        [DllImport("shell32.dll")]
        static extern int SHQueryUserNotificationState(out UserNotificationState pquns);
        public static UserNotificationState GetState()
        {
            UserNotificationState state;
            int returnVal = SHQueryUserNotificationState(out state);
            return state; 
        }
    }
}
'@
If (-not ([System.Management.Automation.PSTypeName]'QueryUser.NotificationState').Type) {
    Add-Type -TypeDefinition $UserNotificationStateSource -Language CSharp
}


$time = Get-date
$test = [QueryUser.NotificationState]::GetState()
$output = "$($test) - $($time)"
$output |Out-File -FilePath c:\test.log -Append

# Then use an if statement of some sort to determine what to do based on the result you get. 
# ScreenSaverOrLockedOrFastUserSwitching, FullScreenOrPresentationMode, RunningDirect3dFullScreen, PresentationMode, AcceptsNotifications, QuietTime, WindowsStoreAppRunning
I schedule it in my Windows 7 task scheduler and run as SYSTEM every 5 minutes.
My log file contains:
FullScreenOrPresentationMode - 01/16/2015 17:46:42
FullScreenOrPresentationMode - 01/16/2015 17:49:32
FullScreenOrPresentationMode - 01/16/2015 17:53:22
FullScreenOrPresentationMode - 01/16/2015 17:58:22
FullScreenOrPresentationMode - 01/16/2015 18:03:22
FullScreenOrPresentationMode - 01/16/2015 18:08:22
FullScreenOrPresentationMode - 01/16/2015 18:13:22
FullScreenOrPresentationMode - 01/16/2015 18:18:22
FullScreenOrPresentationMode - 01/16/2015 18:23:56
And it doesn't matter if I am logged on or not or if the screen is locked :-(

New Post: software that needs reboot

$
0
0
When using the exit script 1641 you need to change -AllowRebootPassThru to true and change the user experience in SCCM to accomidate that change. See below.

The software install program might force a device restart – The client is told that the installation will force a restart.
Configuration Manager client will force a mandatory device restart – The client will always perform a restart.

Here is an article on how SCCM handles the error code.

http://www.petervanderwoude.nl/post/working-with-the-restart-behavior-of-applications-in-configmgr-2012/

New Post: Check for pending reboot

$
0
0
That is office politics. I do not deal with that.

This is why I currently only LOG the info.
I only use the info when someone tells me my package failed so that I can say that the machine probably needed to be rebooted first. (i.e. https://www.google.ca/search?q=.net+4.5+error+5100 )

And then we have a discussion about what could be done to prevent it.

Like I said: office politics.

New Post: Detect Active user / Locked Screen / Not Logged On user

$
0
0
What happens if you schedule it to run as a user and not as SYSTEM?

New Post: Detect Active user / Locked Screen / Not Logged On user

$
0
0
I think the above code will only work if run as a user.

However, I just realized the Get-LoggedOnUser function already in the toolkit will provide the information you are looking for. Look at the property called "ConnectState" returned by the function. This property can hold one of the following values: Active, Connected, ConnectQuery, Shadow, Disconnected, Idle, Listen, Reset, Down, Init.

The one's you are interested in are these:
Active: Logged in and using
Disconnected: logged in but the screen is locked or user is detached

New Post: Detect Active user / Locked Screen / Not Logged On user

$
0
0
Also, you can check to see if LogonUI.exe is running. If computer is locked, then LogonUI.exe will be running.

Closed Unassigned: sccm "available" vs "required" deployment [142]

$
0
0
Hi,

I'm running a flash player upgrade using the v3.5.0 kit which worked great during my tests.

more specifically the welcome screen:
```
Show-InstallationWelcome -CloseApps "iexplore,firefox" -forceCloseAppsCountdown 900 -BlockExecution -PersistPrompt
```

That works fine when deploying to a machine when the advertisement is "Available". This is good for testing.
```
[Initialization] :: The following user is the console user [[EMEA\mp2827]] (user with control of physical monitor, keyboard, and mouse). PSAppDeployToolkit 1/16/2015 12:43:01 1 (0x0001)
[Initialization] :: Unable to load COM Object [Microsoft.SMS.TSEnvironment]. Therefore, script is not currently running from a SCCM Task Sequence. PSAppDeployToolkit 1/16/2015 12:43:01 1 (0x0001)
[Initialization] :: Session 0 detected, process running in user interactive mode, user(s) logged in. PSAppDeployToolkit 1/16/2015 12:43:01 1 (0x0001)
[Initialization] :: Installation is running in [Interactive] mode. PSAppDeployToolkit 1/16/2015 12:43:01 1 (0x0001)

```
But when starting the actual deployment I want to set it as 'required' so the user gets it installed in any case.
```
[Initialization] :: The following users are logged on to the system: EMEA\mp2827 PSAppDeployToolkit 1/16/2015 13:52:14 1 (0x0001)
[Initialization] :: Current process is running under a system account [NT AUTHORITY\SYSTEM] PSAppDeployToolkit 1/16/2015 13:52:14 1 (0x0001)
[Initialization] :: The following user is the console user [[EMEA\mp2827]] (user with control of physical monitor, keyboard, and mouse). PSAppDeployToolkit 1/16/2015 13:52:14 1 (0x0001)
[Initialization] :: Unable to load COM Object [Microsoft.SMS.TSEnvironment]. Therefore, script is not currently running from a SCCM Task Sequence. PSAppDeployToolkit 1/16/2015 13:52:14 1 (0x0001)
[Initialization] :: Session 0 detected, process not running in user interactive mode: deployment mode set to [NonInteractive]. PSAppDeployToolkit 1/16/2015 13:52:14 1 (0x0001)
[Initialization] :: Installation is running in [NonInteractive] mode. PSAppDeployToolkit 1/16/2015 13:52:14 1 (0x0001)
```

The "interactive mode" gets changed into "non-interactive' now and users no longer get the choise to properly stop their work in IE or FF. the browser is closed by the deployment without informing them.

Can anyone confirm if this is by design, or because otherwise is not possible or you have this fixed in 3.6? Because if we can't push out required applications without giving the end-user the option to close off some work before closing the application we need to update then that makes it not possible to user the required option in my eyes.

How do you suggest we work around this?

ps: complaints, I know. But I remain a big fan of this deployment kit, no doubt. It is the best thing around for the job! thanks again for the hard work

Maarten
Comments: duplicate post, deleting this one

New Post: Check for pending reboot

$
0
0
It might be or not office politics, a code is a code and then it might still good to share our experience and the way some problem are handle by different organisation. It is evident the computer need to be restart but if you are sending a package to thousands computers and 100 -200 computers need to be reboot then you need to plan something on your package.

Reviewed: PowerShell App Deployment Toolkit v3.5.0 (Jan 17, 2015)

$
0
0
Rated 5 Stars (out of 5) - Awesome Job!!! Really really excellent!

Created Unassigned: Bad German translation [144]

$
0
0
I've played around with the Toolkit and really like it.

However, parts of the (probably automated) German translation are really bad. I've updated our config.xml file and attached the changes to this post.

Maybe you can add this to your next release.

Greetings from Austria,
Martin

New Post: disallow run registry entry (-blick-execution)

$
0
0
for anyone whos looking for the location of the correct registry entry:

"hklm\software\Microsoft\Windows NT\currentVersion\image file execution options\"
Viewing all 2341 articles
Browse latest View live


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