Hello Sumit,
In order to achieve what you want, you can make use of the
"ASP.NET IIS Registration Tool" (Aspnet_regiis.exe). The executable can be found at the following location:
Code: Select all
C:\Windows\Microsoft.NET\Framework64\v4.0.30319
Now that we know the path to the "aspnet_regiis" executable, we can make use of the "/c" or "/k" command line switches. The /c argument tells the command processor to open, run the specified command, then close when it's done. You can also use the /k argument, which tells CMD.exe to open, run the specified command, then keep the window open.
With that being said, the script that will register ASP.NET IIS can look as it follows:
Code: Select all
cmd.exe /c "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i"
Save the above script with the .bat file extension. After doing so, you can add it to your project as a
"Temporary File" and then use a
"Launch File" custom action.
Hope this helps.
Kind regards,
Catalin