简体   繁体   中英

How to get rid of command line window when starting IISExpress?

Is there a chance to get rid of command line window when starting IISExpress (iisexpress.exe)? In the thread Use IIS Express in visual studio 2010 without sp1 and command window is determined, that it is not possible with a parameter of iisexpress.exe itself.

Are there any tricks with batch scripting or something like that?

I want to start IISExpress with a.bat file, but then the command windows should hide itself (because stopping the server is also possible with the tray icon).

Using PowerShell:

Start-Process .\iisexpress.exe -WindowStyle Hidden

Meanwhile I found a few ways to solve this. One way is a Windows Script, see Duncan Smart's Weblob or directly his GIT-Repository .

Another way is to build a Windows Form Application (or similar), and use the ProcessStartInfo class , which offers the ProcessWindowStyle.Hidden property.

What I did at last: I dropped IIS Express and switched to CassiniDev . It is a great webserver (amongst others available as console application and DLL-assembly) which allowed me to build be "self-hosted" website by importing a single DLL.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM