-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Fix Set-Service -Status Stopped runs failed on the service with dependencies #5525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
b2103c1
Fix the Set-Service -Status Stopped issue when the service has depend…
zhenggu 56d2b2b
remove ServiceIsDependentOn for it is not used.
zhenggu f802e93
remove one blank
zhenggu e265545
Merge branch 'master' of https://github.com/PowerShell/PowerShell
zhenggu f1e071f
add test case: Set-Service can run -Status Stopped to stop a service …
zhenggu e248428
add the status of the service after run "-Status stopped", and change…
zhenggu d7e3a64
add a TestServie for Set-Service testing
zhenggu b2f84e9
remove force flag
zhenggu 18e5a58
correct one comment
zhenggu a12be35
Revert "remove force flag"
zhenggu ee0b9b3
remove TestService written by c
zhenggu 59605f1
add a existing check for spooler before start testing
zhenggu fac8483
add skip step when cannot find service spooler
zhenggu a623b94
add a c# version of TestService
zhenggu 7087f06
add TestService into Publish-PSTestTools
zhenggu b2added
add new test case with TestService
zhenggu a672eef
make the code format unique
zhenggu def8fe2
put testservice setup in BeforeAll and cleanup in AfterAll
zhenggu ff45184
remove some useless comments
zhenggu ed14f7f
fix one bug
zhenggu b31d813
fix one bug
zhenggu 69d014c
Add copyright for csharp files, divide one it statement to three ones
zhenggu 057e640
[Feature]
adityapatwardhan 3379733
[Feature] fix one runtime issue
zhenggu da52a86
[Feature] fix one runtime issue
zhenggu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
| using System.ServiceProcess; | ||
|
|
||
| namespace TestService | ||
| { | ||
| static class Program | ||
| { | ||
| static void Main() | ||
| { | ||
| ServiceBase[] ServicesToRun; | ||
| ServicesToRun = new ServiceBase[] | ||
| { | ||
| new Service1() | ||
| }; | ||
| ServiceBase.Run(ServicesToRun); | ||
| } | ||
| } | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
| using System.ServiceProcess; | ||
|
|
||
| namespace TestService | ||
| { | ||
| public partial class Service1 : ServiceBase | ||
| { | ||
| public Service1() | ||
| { | ||
| InitializeComponent(); | ||
| } | ||
|
|
||
| protected override void OnStart(string[] args) | ||
| { | ||
| } | ||
|
|
||
| protected override void OnStop() | ||
| { | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <Import Project="..\..\Test.Common.props"/> | ||
|
|
||
| <PropertyGroup> | ||
| <Description>Very tiny windows service to do service testing</Description> | ||
| <AssemblyName>TestService</AssemblyName> | ||
| <OutputType>Exe</OutputType> | ||
| <RuntimeIdentifiers>win7-x86;win7-x64</RuntimeIdentifiers> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="Microsoft.Windows.Compatibility" Version="2.0.0" /> | ||
| </ItemGroup> | ||
|
|
||
| </Project> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should remove the resource string from RESX file it is no longer used.