diff --git a/StartDemo/.vs/StartDemo/v15/.suo b/StartDemo/.vs/StartDemo/v15/.suo index 95cea3b..f9dc69b 100644 Binary files a/StartDemo/.vs/StartDemo/v15/.suo and b/StartDemo/.vs/StartDemo/v15/.suo differ diff --git a/StartDemo/Debug/StartDemo.exe b/StartDemo/Debug/StartDemo.exe index 6983e21..c49ecf0 100644 Binary files a/StartDemo/Debug/StartDemo.exe and b/StartDemo/Debug/StartDemo.exe differ diff --git a/StartDemo/StartDemo/Debug/StartDemo.Build.CppClean.log b/StartDemo/StartDemo/Debug/StartDemo.Build.CppClean.log index 69a2289..1c7282c 100644 --- a/StartDemo/StartDemo/Debug/StartDemo.Build.CppClean.log +++ b/StartDemo/StartDemo/Debug/StartDemo.Build.CppClean.log @@ -1,13 +1,3 @@ -f:\myapp\ccremote\startdemo\startdemo\debug\vc141.pdb -f:\myapp\ccremote\startdemo\startdemo\debug\vc141.idb -f:\myapp\ccremote\startdemo\startdemo\debug\startdemo.obj -f:\myapp\ccremote\startdemo\startdemo\debug\cregoperate.obj +f:\myapp\ccremote\startdemo\startdemo\debug\cregoperate.obj.enc +f:\myapp\ccremote\startdemo\startdemo\debug\startdemo.obj.enc f:\myapp\ccremote\startdemo\debug\startdemo.exe -f:\myapp\ccremote\startdemo\debug\startdemo.ilk -f:\myapp\ccremote\startdemo\debug\startdemo.pdb -f:\myapp\ccremote\startdemo\startdemo\debug\startdemo.tlog\cl.command.1.tlog -f:\myapp\ccremote\startdemo\startdemo\debug\startdemo.tlog\cl.read.1.tlog -f:\myapp\ccremote\startdemo\startdemo\debug\startdemo.tlog\cl.write.1.tlog -f:\myapp\ccremote\startdemo\startdemo\debug\startdemo.tlog\link.command.1.tlog -f:\myapp\ccremote\startdemo\startdemo\debug\startdemo.tlog\link.read.1.tlog -f:\myapp\ccremote\startdemo\startdemo\debug\startdemo.tlog\link.write.1.tlog diff --git a/StartDemo/StartDemo/Debug/StartDemo.log b/StartDemo/StartDemo/Debug/StartDemo.log index a23be1c..e575947 100644 --- a/StartDemo/StartDemo/Debug/StartDemo.log +++ b/StartDemo/StartDemo/Debug/StartDemo.log @@ -1,3 +1,5 @@  StartDemo.cpp -f:\myapp\ccremote\startdemo\startdemo\startdemo.cpp(35): warning C4018: “<”: 有符号/无符号不匹配 +f:\myapp\ccremote\startdemo\startdemo\startdemo.cpp(39): warning C4018: “<”: 有符号/无符号不匹配 +f:\myapp\ccremote\startdemo\startdemo\startdemo.cpp(58): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. + d:\windows kits\10\include\10.0.17763.0\ucrt\stdio.h(208): note: 参见“fopen”的声明 StartDemo.vcxproj -> F:\myapp\CcRemote\StartDemo\Debug\StartDemo.exe diff --git a/StartDemo/StartDemo/Debug/cregoperate.obj.enc b/StartDemo/StartDemo/Debug/cregoperate.obj.enc deleted file mode 100644 index f54566d..0000000 Binary files a/StartDemo/StartDemo/Debug/cregoperate.obj.enc and /dev/null differ diff --git a/StartDemo/StartDemo/Debug/startdemo.obj.enc b/StartDemo/StartDemo/Debug/startdemo.obj.enc deleted file mode 100644 index fc860a2..0000000 Binary files a/StartDemo/StartDemo/Debug/startdemo.obj.enc and /dev/null differ diff --git a/StartDemo/StartDemo/StartDemo.cpp b/StartDemo/StartDemo/StartDemo.cpp index a69cc9a..d0b1593 100644 --- a/StartDemo/StartDemo/StartDemo.cpp +++ b/StartDemo/StartDemo/StartDemo.cpp @@ -15,6 +15,8 @@ #include +#include + #include "CRegOperate.h" @@ -30,10 +32,48 @@ int _tmain(int argc, _TCHAR* argv[]) TCHAR N2path[] = "SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Run"; //HKEY_CURRENT_USER CRegOperate test_reg(HKEY_CURRENT_USER, N1path); + //HKEY_CURRENT_USER - + char* a; + FILE *p2file; for (int i = 0; i < test_reg.vecKeyName.size(); i++) { - _tprintf(TEXT("%s\n"),test_reg.vecKeyName[i].c_str()); + + a = (char*)(test_reg.vecKeyName[i].c_str()); + if (a[0] == 0x22) + { + a = a + 1; + for (size_t i = 0; i < strlen(a); i++) + { + if (a[i] == 0x22) + { + a[i] = 0x00; + a[i+1] = 0x00; + break; + } + } + + if (_access(a, 0)==0) + { + //rename(a, newname); + } + } + + } + + //int _access(const char *pathname, int mode);位于头文件中 + /* + 返回0存在 -1不存在 + mode的值和含义如下所示: + 00——只检查文件是否存在 + 02——写权限 + 04——读权限 + 06——读写权限 + */ + + char s[] = "C:\\Program Files\\Realtek\\Audio\\HDA\\RtkAudioService64.exe"; + if (_access(s, 0)==0) + { + _tprintf(TEXT("%s,%s\n"), s, "存在"); } system("pause"); diff --git a/StartDemo/StartDemo/StartDemo.vcxproj b/StartDemo/StartDemo/StartDemo.vcxproj index b2c0efd..e75fce5 100644 --- a/StartDemo/StartDemo/StartDemo.vcxproj +++ b/StartDemo/StartDemo/StartDemo.vcxproj @@ -88,7 +88,7 @@ Level3 Disabled - true + false WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) true MultiThreadedDebug diff --git a/StartDemo/StartDemo/x64/Debug/StartDemo.Build.CppClean.log b/StartDemo/StartDemo/x64/Debug/StartDemo.Build.CppClean.log new file mode 100644 index 0000000..eec1958 --- /dev/null +++ b/StartDemo/StartDemo/x64/Debug/StartDemo.Build.CppClean.log @@ -0,0 +1,14 @@ +f:\myapp\ccremote\startdemo\startdemo\x64\debug\vc141.pdb +f:\myapp\ccremote\startdemo\startdemo\x64\debug\vc141.idb +f:\myapp\ccremote\startdemo\startdemo\x64\debug\startdemo.obj +f:\myapp\ccremote\startdemo\startdemo\x64\debug\cregoperate.obj +f:\myapp\ccremote\startdemo\x64\debug\startdemo.exe +f:\myapp\ccremote\startdemo\x64\debug\startdemo.ilk +f:\myapp\ccremote\startdemo\x64\debug\startdemo.pdb +f:\myapp\ccremote\startdemo\startdemo\x64\debug\startdemo.obj.enc +f:\myapp\ccremote\startdemo\startdemo\x64\debug\startdemo.tlog\cl.command.1.tlog +f:\myapp\ccremote\startdemo\startdemo\x64\debug\startdemo.tlog\cl.read.1.tlog +f:\myapp\ccremote\startdemo\startdemo\x64\debug\startdemo.tlog\cl.write.1.tlog +f:\myapp\ccremote\startdemo\startdemo\x64\debug\startdemo.tlog\link.command.1.tlog +f:\myapp\ccremote\startdemo\startdemo\x64\debug\startdemo.tlog\link.read.1.tlog +f:\myapp\ccremote\startdemo\startdemo\x64\debug\startdemo.tlog\link.write.1.tlog diff --git a/StartDemo/StartDemo/x64/Debug/StartDemo.log b/StartDemo/StartDemo/x64/Debug/StartDemo.log index 431f3f0..e4d4915 100644 --- a/StartDemo/StartDemo/x64/Debug/StartDemo.log +++ b/StartDemo/StartDemo/x64/Debug/StartDemo.log @@ -1,3 +1,6 @@ - StartDemo.cpp -f:\myapp\ccremote\startdemo\startdemo\startdemo.cpp(205): warning C4101: “vari”: 未引用的局部变量 - StartDemo.vcxproj -> F:\myapp\CcRemote\StartDemo\x64\Debug\StartDemo.exe + CRegOperate.cpp +f:\myapp\ccremote\startdemo\startdemo\cregoperate.cpp(160): warning C4101: “vari”: 未引用的局部变量 + StartDemo.cpp +f:\myapp\ccremote\startdemo\startdemo\startdemo.cpp(58): error C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. + d:\windows kits\10\include\10.0.17763.0\ucrt\stdio.h(208): note: 参见“fopen”的声明 + 正在生成代码... diff --git a/StartDemo/StartDemo/x64/Debug/StartDemo.tlog/unsuccessfulbuild b/StartDemo/StartDemo/x64/Debug/StartDemo.tlog/unsuccessfulbuild new file mode 100644 index 0000000..e69de29 diff --git a/StartDemo/x64/Debug/StartDemo.exe b/StartDemo/x64/Debug/StartDemo.exe deleted file mode 100644 index 8ab543e..0000000 Binary files a/StartDemo/x64/Debug/StartDemo.exe and /dev/null differ