With the new feature in Configuration Manager 1706 that makes it possible to launch Software center and show the correct application from a direct link in Software Center which is great! We can copy the link and email it to the user for instance.
I have a customer that wanted to send out a mail with a link for the users to start they upgrade to Windows 10 (Yes, with clear instructions before that this will happen so they know it is not a virus.)
We can only use the direct link to launch software center and show applications not packages or Task Sequences which is what I wanted to do.It will look like this example for the user, launched from Explorer.
Here is how I did it should be just fine doing it with PS App Deployment Toolkit as well.
I created a new application with the with the following files, I took the “Runsilent” utility from the “Web Service for OS Deployment” that my colleague Johan Schrewelius wrote which basically suppresses all dialog’s from Powershell for instance. It can be found here: https://gallery.technet.microsoft.com/Web-Service-for-OS-93b6ecb8
There are a couple of things to keep in mind.
- To launch the Task Sequence the application must be run with “Install as user” This will make it possible to use with PS App deployment toolkit as well and interact with the user for example.
- To make it succeed and not fail, I added a registry key to it which is written to current user in the registry that it is successfully launched.
Wrote a little Powershell script to launch a Task Sequence, I am sure I found the function on some blog a while back but cannot find it now 🙁
The script I used, just change the name to match the Task Sequence you want to run. I will create a registry key called CCMEXEC\TSHasrun which we can use as detection method. The script can be downloaded here: Callts.ps1
We then add that script to the same folder as Runsilent.exe to make it run silent and add it to the runsilent.ini file.
In the application we use “Runsilent.exe” as a command line and “Install for User” as displayed below.
Then I deploy the application to a collection as a available so they can launch it from the link whenever they like.
I hope this is useful to someone and I am sure it can be improved and used to do other things as well.