Skip to content

Commit

Permalink
Update Readme and other changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
WanpengQian committed Nov 22, 2023
1 parent 270fb02 commit a1a4cab
Show file tree
Hide file tree
Showing 7 changed files with 145 additions and 134 deletions.
31 changes: 30 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,30 @@
# RRKS
# RemoveRegisterKeyService

This repository contains two programs designed for managing the Windows Registry key responsible for the Terminal Server Grace Period.

## RemoveRegisterKeyService

`RemoveRegisterKeyService` is a Windows service program that removes the values of the following Registry key:

```
SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\GracePeriod
```

After deleting the values, it restarts the `TermService` service. The program has the following settings:

- **Interval:** The default is 1440 minutes (1 day). After the service starts, it executes once after 10 minutes. Subsequently, it checks at this interval.
- **Key:** Specifies the Registry key to check and delete.

## ServiceInstaller

`ServiceInstaller` is a GUI program that facilitates the installation, uninstallation, and viewing of the event log for `RemoveRegisterKeyService`.

### Build Information

- **Built with:** Visual Studio 2022, C#, and .NET 4.8.

### Compatibility

Tested with Windows Server 2016 and 2019.

Feel free to contribute, report issues, or provide feedback!
6 changes: 3 additions & 3 deletions RemoveRegisterKeyService/App.config
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="RemoveRegisterKeyService.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="RemoveRegisterKeyService.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
</sectionGroup>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
</startup>
<applicationSettings>
<RemoveRegisterKeyService.Properties.Settings>
Expand Down
10 changes: 5 additions & 5 deletions RemoveRegisterKeyService/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion RemoveRegisterKeyService/RemoveRegisterKeyService.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<OutputType>WinExe</OutputType>
<RootNamespace>RemoveRegisterKeyService</RootNamespace>
<AssemblyName>RemoveRegisterKeyService</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
Expand Down
14 changes: 0 additions & 14 deletions RemoveRegisterKeyService/Settings.cs
Original file line number Diff line number Diff line change
@@ -1,28 +1,14 @@
namespace RemoveRegisterKeyService.Properties {


// このクラスでは設定クラスでの特定のイベントを処理することができます:
// SettingChanging イベントは、設定値が変更される前に発生します。
// PropertyChanged イベントは、設定値が変更された後に発生します。
// SettingsLoaded イベントは、設定値が読み込まれた後に発生します。
// SettingsSaving イベントは、設定値が保存される前に発生します。
internal sealed partial class Settings {

public Settings() {
// // 設定の保存と変更のイベント ハンドラーを追加するには、以下の行のコメントを解除します:
//
// this.SettingChanging += this.SettingChangingEventHandler;
//
// this.SettingsSaving += this.SettingsSavingEventHandler;
//
}

private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) {
// SettingChangingEvent イベントを処理するコードをここに追加してください。
}

private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) {
// SettingsSaving イベントを処理するコードをここに追加してください。
}
}
}
Loading

0 comments on commit a1a4cab

Please sign in to comment.