Skip to content

Commit

Permalink
Reverted WMI dll loading issue fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
lextm committed Apr 14, 2023
1 parent f1bf858 commit 9a566d8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Microsoft.Web.Administration/IisExpressServerManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,6 @@ private Version GetIisExpressVersion()

internal override bool GetSiteState(Site site)
{
var tool = CertificateInstallerLocator.AlternativeFileName ?? CertificateInstallerLocator.FileName;
try
{
using var process = new Process
Expand All @@ -316,7 +315,7 @@ internal override bool GetSiteState(Site site)
UseShellExecute = true,
FileName = "cmd",
Arguments =
$"/c \"\"{tool}\" /config:\"{site.FileContext.FileName}\" /siteId:{site.Id}\"",
$"/c \"\"{CertificateInstallerLocator.FileName}\" /config:\"{site.FileContext.FileName}\" /siteId:{site.Id}\"",
CreateNoWindow = true,
WindowStyle = ProcessWindowStyle.Hidden
}
Expand Down Expand Up @@ -423,7 +422,6 @@ private void StartInner(Site site, bool restart)

internal override void Stop(Site site)
{
var tool = CertificateInstallerLocator.AlternativeFileName ?? CertificateInstallerLocator.FileName;
try
{
using var process = new Process();
Expand All @@ -434,7 +432,7 @@ internal override void Stop(Site site)
start.UseShellExecute = true;
start.FileName = "cmd";
start.Arguments =
$"/c \"\"{tool}\" /k /config:\"{site.FileContext.FileName}\" /siteId:{site.Id}\"";
$"/c \"\"{CertificateInstallerLocator.FileName}\" /k /config:\"{site.FileContext.FileName}\" /siteId:{site.Id}\"";
start.CreateNoWindow = true;
start.WindowStyle = ProcessWindowStyle.Hidden;
process.Start();
Expand Down

0 comments on commit 9a566d8

Please sign in to comment.