Loading...

Import an application in MDT with a right-click

Reply A+ A-

In this post I will show you a different way to add an application in MDT using a right-click in your application folder.
This isn't the best way to do this but I like to find different ways to do an action.

I was working on MDT, and get this idea:
I have a folder containing my application sources. Would it be possible to import this app in MDT just with a right-click and context-menu in my app folder ?

That's why I created a quick script to do this.
Now let's us see how it works.

How to use it ?
1 / Application sources are in a folder called "Application".
2 / In this folder I created an "Application.xml" file. This file will contain application's information. You have to fill it with yours.
Application.xml file
3 / Now do a right-click in your application folder  
4 / Click on "Add this application in MDT".
How to tun the script using context-menu
5 / The PS1 script will import your application in your Deploymentshare.
Import application process - method 1
6 / Once it's done a messagebox is displayed.

Now let's check this application in MDT.
My application appears in MDT
Application General Tab
MDT Details Tab
In the rar file you will also find a "Add_this_application2.ps1"
This ps1 will allow you to use the same method but instead of using "application.xml" file you will have to fill informations in the pwoershell console, as below:
Import application process - method 2
To use this method you will have to remove parameters -NoExit -Command Set-Location -LiteralPath '%V' from the:
HKEY_CLASSES_ROOT\Directory\Background\shell\Add this application in MDT\command

How to get the script ?
1 / Download the "Add_Application_ContextMenu.rar
2 / Extract the RAR. You will get files "Add Application contextmenu.exe" and "Application.xml".
3 / Run the EXE file
4 / Copy the "Application.xml" file in application sources folder you want to import.
5 / Fill this xml file
6 / Right-click and click on the new context-menu part


How works the script ?
1 / You can find the "Add_this_application.ps1" in "C:\windows"
2 / Fill the $module variable with the path of the MicrosoftDeploymentToolkit module. Usually it's located under "C:\Program Files\Microsoft Deployment Toolkit\Bin"
3 / Fill the $deploymentshare variable with the path of your deploymentshare.
4 / You can also for an example delete the xml file and asks 

How works the exefile ?
The exe file runs a "Add_Structure.ps1" file. This file will configure your registry to add the "Add this application in MDT" item in the context-menu.
PS1 7416102614606206719

Enregistrer un commentaire

Accueil item

Award

Sponsors

Learn KQL in one month

You want to support me ?

Mes articles en français

Books in French


Stats