Run .HTA files from Custom Tools

4/26/2018 3617 Contributors

To run a .hta application from custom tools you will need to call MSHTA.EXE from your %WINDIR%\System32 directory. An example would be:

%WINDIR%\System32\mshta.exe C:\Temp\RemoteUninstall.hta %TARGET%



In the example above I have a Custom Tool defined which will run the RemoteUninstall.hta utility from my local C:\Temp directory. Since this particular .hta file expects the name of a computer to be passed as the first argument (parameter) I specify the variable %TARGET%. This way when I run this Custom Tool from Inventory the selected computer will be passed to the .hta file.