diff --git a/TegraRcmGUI/DialogTab03.cpp b/TegraRcmGUI/DialogTab03.cpp index 9eb4abf..f3b0296 100644 --- a/TegraRcmGUI/DialogTab03.cpp +++ b/TegraRcmGUI/DialogTab03.cpp @@ -194,10 +194,19 @@ void DialogTab03::CleanRegestry() { if (lnRes != ERROR_FILE_NOT_FOUND) { //Remove regestry value - lnRes = RegDeleteValueA(hKey, key.c_str()); + lnRes = RegOpenKeyEx(HKEY_CURRENT_USER, + _T("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run"), + 0L, KEY_WRITE, + &hKey); - // Create new shortcut - CreateLink(); + if (lnRes != ERROR_FILE_NOT_FOUND) + { + //Remove regestry value + lnRes = RegDeleteValueA(hKey, subkey.c_str()); + + // Create new shortcut + CreateLink(); + } } } } \ No newline at end of file diff --git a/TegraRcmGUI/DialogTab03.h b/TegraRcmGUI/DialogTab03.h index 0fd25e0..8b55158 100644 --- a/TegraRcmGUI/DialogTab03.h +++ b/TegraRcmGUI/DialogTab03.h @@ -1,10 +1,4 @@ #pragma once -//#define _WIN32_DCOM -//#include -//#include -//#pragma comment(lib, "taskschd.lib") -//#pragma comment(lib, "comsupp.lib") - #include #include "TegraRcmGUIDlg.h" #include "TegraRcm.h" diff --git a/TegraRcmGUI/TegraRcmGUI.rc b/TegraRcmGUI/TegraRcmGUI.rc index a09adbd..16c3c62 100644 Binary files a/TegraRcmGUI/TegraRcmGUI.rc and b/TegraRcmGUI/TegraRcmGUI.rc differ