Oct 31 2022 08:38 PM
Dear Community Members,
We have an odd requirement to create a Windows 10 Kiosk Setup to turn into kiosk running different apps.
I was able to set up the PC to a multi-app kiosk mode, with no Auto-start apps as a staging phase. By manipulating them devices from the staging phase to different groups, I was able to push out the required kiosk app base on requirement.
As part of this approach, I am also using multiple kiosk profiles to configure different apps to auto start. Although I was able to execute that, in reality it doesn't work. I think the PC must be confused with so many different kiosk profiles, even it was told to exclude one or the other.
I am taking a different approach by just applying one neutral kiosk profile at the staging phase, with no auto-start apps configured. Then after I move the PC to different groups to get apps installed, I want to execute a command to quickly set app to auto-start with the Windows boot.
Can anyone provide some advice on such command?
Thanks.
Nov 01 2022 01:21 AM
Nov 01 2022 02:59 PM
Basically, after you move the machine from the "generic" staging group, you can trigger an Intune sync for policy sooner than the default schedule, at which time it should pick up its new deployments and profiles.
Take a look at these links for information on possible approaches:
Force Intune policy sync from a PowerShell script - MSEndpointMgr
Forcing an MDM sync from a Windows 10 client – Out of Office Hours (oofhours.com)
Please like and mark this thread as answered if it's helpful, thanks!
Nov 03 2022 05:24 AM
Nov 03 2022 12:46 PM
Nov 05 2022 05:26 AM - edited Nov 05 2022 05:27 AM
Does this help. For sure you have to customize this script. If you have questions or if you need support let me know.
$appPath = 'C:/...../app.exe'
$trigger = New-ScheduledTaskTrigger -AtLogon
$user = "NT AUTHORITY\SYSTEM" # Specify the account that runs the app
$action = New-ScheduledTaskAction -Execute $appPath # Specify what program to add arguments use -Argument ""
Register-ScheduledTask -TaskName "RunAppAfterLogin" -Trigger $trigger -User $user -Action $action -Force # Specify the name of the task to run with system permissions use -RunLevel Highest
Nov 11 2022 03:52 AM
Nov 14 2022 03:32 AM
Thanks for the script. It is really good.
Only one question, do you know what do I do with the path to a store app?
I am using a free store app called Appspace, a signage app.
It is saved in C:\Program Files\WindowsApps. But it does not have an executable.
So how do I define a Windows Store App path?
Thanks!
Nov 14 2022 03:54 AM
I have done the script with a path to WindowsApps folder.
I am not sure whether I have done the path right (whether I have found the right executables). But the first error I encountered is a permission error because WindowsApp folder is protected hidden folder.
I have used the -RunLevel Highest but seems not effective.
Here is the script:
$appPath = 'C:\Program Files\WindowsApps\AppspaceInc.Appspace_2.54.0.0_x64__7nb6hsg4cq4xc'
$trigger = New-ScheduledTaskTrigger -AtLogOn
$user = "NT AUTHORITY\SYSTEM"
$action = New-ScheduledTaskAction -Execute $appPath
Register-ScheduledTask -TaskName "RunAppAfterLogin" -Trigger $trigger -User $user -Action $action -Force -RunLevel Highest
Below is the output from debug.
Register-ScheduledTask : Access is denied.
At line:6 char:1
+ Register-ScheduledTask -TaskName "RunAppAfterLogin" -Trigger $trigger ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (PS_ScheduledTask:Root/Microsoft/...S_ScheduledTask) [Register-ScheduledTask], CimException
+ FullyQualifiedErrorId : HRESULT 0x80070005,Register-ScheduledTask
Any advice?
Thanks.
Nov 14 2022 04:00 AM
Actually, I just tried the iTunes, also permission denied.
So maybe it is referring to the permission to run the scheduled task, not necessarily the path to apps?
{ $appPath = 'C:\Program Files\iTunes\iTunes.exe'
$trigger = New-ScheduledTaskTrigger -AtLogOn
$user = "NT AUTHORITY\SYSTEM"
$action = New-ScheduledTaskAction -Execute $appPath
Register-ScheduledTask -TaskName "RunAppAfterLogin" -Trigger $trigger -User $user -Action $action -Force -RunLevel Highest }
Register-ScheduledTask : Access is denied.
At line:6 char:1
+ Register-ScheduledTask -TaskName "RunAppAfterLogin" -Trigger $trigger ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (PS_ScheduledTask:Root/Microsoft/...S_ScheduledTask) [Register-ScheduledTask], CimException
+ FullyQualifiedErrorId : HRESULT 0x80070005,Register-ScheduledTask