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: Onevinn – Applications (schrewelius.it)
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.
Great post Jörgen. Not sure but this might be the other blog post you mentioned: https://powersheller.wordpress.com/2012/05/24/sccm-2012-execute-task-sequence-with-powershell/
I love this, thanks a lot Jörgen!
mini typo/change
“‘n the application we use “Runsilent.exe” as a command line and “Install as User” as displayed below.’
to be
‘In the application we use “Runsilent.exe” as a command line and “Install FOR User” as displayed below.’
Hi,
Thanks for the feedback and that you like it! 😀
Regards,
Jörgen
Any chance we could get the silent.exe released in GitHub? Security groups are always wary of unknown executables…
Cambiar a español
I am a follower of your blog, it is very helpful.
I write to you because I follow the steps of this article to create an application that calls a task and it does not work for me, the funny thing is that before I worked with another application and now it does not work with either one.
My environment is SCCM 1810 and Windows 10 1709, do you know why it fails?
Thanks for your help