diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..87d3da1
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+################################################################################
+# Данный GITIGNORE-файл был автоматически создан Microsoft(R) Visual Studio.
+################################################################################
+
+/.vs
+/Release
+/CapsWitch
+/x64/Release
diff --git a/CapsWitch.vcxproj b/CapsWitch.vcxproj
index a5431ad..12b3f90 100644
--- a/CapsWitch.vcxproj
+++ b/CapsWitch.vcxproj
@@ -34,7 +34,7 @@
Application
false
- v141_xp
+ v143
true
MultiByte
diff --git a/CapsWitch.vcxproj.user b/CapsWitch.vcxproj.user
new file mode 100644
index 0000000..88a5509
--- /dev/null
+++ b/CapsWitch.vcxproj.user
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/main.c b/main.c
index 842e137..3f23fa1 100644
--- a/main.c
+++ b/main.c
@@ -24,6 +24,23 @@ Settings = { 1, TRUE, FALSE, 0 };
int main(int argc, char** argv)
{
+ // Register the application for automatic restart.
+ // An empty string ("") indicates that the application will restart
+ // with the same command-line arguments as originally provided.
+ // Windows will only restart the application if it terminates unexpectedly.
+ // If the user closes the application normally, no restart will occur.
+ HRESULT hr = RegisterApplicationRestart(L"", 0);
+ #if _DEBUG
+ if (SUCCEEDED(hr))
+ {
+ printf("Application restart registered successfully.\n");
+ }
+ else
+ {
+ printf("Failed to register application restart. Error: 0x%08X\n", hr);
+ }
+ #endif
+
if (importSettingsFromFile(argv[1], &Settings) == -1) { return 1; }
HANDLE hMutex = CreateMutex(0, 0, "CapsWitch");