Service Fabric Runtime Installation for Windows Fails

Susanta Kumar Swain 50 Reputation points Microsoft Employee
2023-02-17T13:20:27.56+00:00

I am following the steps mentioned here https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-get-started to setup Azure Service Fabric Cluster on my laptop. The very first step Install Service Fabric Runtime for Windows

is failing with below error. I ma running power shell in admin mode and ran the command Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force -Scope CurrentUser

Each time I try to install it creates a folder C:\Program Files\Microsoft Service Fabric* and fails. Have restarted my system in-between many times, uninstalled Visual Studio 2022 but that didn't help. Without this running I can't proceed for the seconds step (Install Service Fabric SDK). Also tried deleting the entries from register HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Service Fabric and HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Service Fabric but that didn't help much.

Service Fabric version: MicrosoftServiceFabric.9.1.1436.9590

Service Fabric SDK version: MicrosoftServiceFabricSDK.6.1.1436

17-02-2023 12:51:46,Info,Installing Service Fabric Runtime. Logs written to C:\WINDOWS\TEMP\InstallFabricRuntime_638122549060551486.log
17-02-2023 12:51:46,Info,Running extract in parallel.
17-02-2023 12:51:46,Info,Unpackaging autoextractor...
17-02-2023 12:51:46,Info,17-02-2023 18:21:46 Running Process: powershell.exe -NoProfile -Command Get-ExecutionPolicy -Scope CurrentUser with timeout 00:01:00
17-02-2023 12:51:46,Error,Exception type: System.ComponentModel.Win32Exception, Message: The system cannot find the file specified, Stack:    at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
   at Microsoft.ServiceFabric.InstallFabricRuntime.Utility.ExecuteCommand(String command, String arguments, TimeSpan timeout)
   at Microsoft.ServiceFabric.InstallFabricRuntime.Program.TrySetPowershellExecutionPolicy()
   at Microsoft.ServiceFabric.InstallFabricRuntime.Program.Main(String[] args)
Press enter to exit. Process will automatically close after 30 seconds.
17-02-2023 12:51:46,Info,Creating temporary runtime directory C:\Program Files\Microsoft Service Fabric.hsxgayfk.slk.
17-02-2023 12:51:46,Info,Extracting runtime cab to C:\Program Files\Microsoft Service Fabric.hsxgayfk.slk...
17-02-2023 12:51:46,Info,17-02-2023 18:21:46 Running Process: C:\WINDOWS\TEMP\MicrosoftServiceFabricAutoextractor.exe /L "C:\Program Files\Microsoft Service Fabric.hsxgayfk.slk" /E /Y with timeout 01:00:00
17-02-2023 12:51:51,Info,Successfully extracted cab file to C:\Program Files\Microsoft Service Fabric.hsxgayfk.slk
Azure Service Fabric
Azure Service Fabric
An Azure service that is used to develop microservices and orchestrate containers on Windows and Linux.
253 questions
0 comments No comments
{count} vote

Accepted answer
  1. deherman-MSFT 33,216 Reputation points Microsoft Employee
    2023-02-17T18:44:19.8733333+00:00

    @Susanta Kumar Swain

    Most likely the issue is caused by something missing in your PATH environment variable. Please check and add these to your PATH and see if it resolves your issue:

    C:\WINDOWS\system32

    C:\WINDOWS

    C:\WINDOWS\System32\WindowsPowerShell\v1.0\

    %SystemRoot%\system32

    %SystemRoot%

    %SYSTEMROOT%\system32\WindowsPowerShell\v1.0

    Hope this helps! Let me know if you are still having issues after adding these and we can work with you to investigate.


    Please don’t forget to "Accept the answer" wherever the information provided helps you, this can be beneficial to other community members.

    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Tetiana Tiutiunnyk 5 Reputation points Microsoft Employee
    2023-07-21T13:42:30.66+00:00

    For me what caused the issue was using PowerShell 7. Running installation in Windows PowerShell worked.

    1 person found this answer helpful.