启动项+

This commit is contained in:
ChangCheng 2020-06-12 18:52:06 +08:00
parent feb20dcd4e
commit 7512936a9c
12 changed files with 68 additions and 19 deletions

Binary file not shown.

Binary file not shown.

View File

@ -1,13 +1,3 @@
f:\myapp\ccremote\startdemo\startdemo\debug\vc141.pdb f:\myapp\ccremote\startdemo\startdemo\debug\cregoperate.obj.enc
f:\myapp\ccremote\startdemo\startdemo\debug\vc141.idb f:\myapp\ccremote\startdemo\startdemo\debug\startdemo.obj.enc
f:\myapp\ccremote\startdemo\startdemo\debug\startdemo.obj
f:\myapp\ccremote\startdemo\startdemo\debug\cregoperate.obj
f:\myapp\ccremote\startdemo\debug\startdemo.exe 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

View File

@ -1,3 +1,5 @@
 StartDemo.cpp  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 StartDemo.vcxproj -> F:\myapp\CcRemote\StartDemo\Debug\StartDemo.exe

View File

@ -15,6 +15,8 @@
#include <queue> #include <queue>
#include <io.h>
#include "CRegOperate.h" #include "CRegOperate.h"
@ -30,10 +32,48 @@ int _tmain(int argc, _TCHAR* argv[])
TCHAR N2path[] = "SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Run"; TCHAR N2path[] = "SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Run";
//HKEY_CURRENT_USER //HKEY_CURRENT_USER
CRegOperate test_reg(HKEY_CURRENT_USER, N1path); CRegOperate test_reg(HKEY_CURRENT_USER, N1path);
//HKEY_CURRENT_USER
char* a;
FILE *p2file;
for (int i = 0; i < test_reg.vecKeyName.size(); i++) { 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);位于头文件<io.h>中
/*
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"); system("pause");

View File

@ -88,7 +88,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck> <SDLCheck>false</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode> <ConformanceMode>true</ConformanceMode>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>

View File

@ -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

View File

@ -1,3 +1,6 @@
 StartDemo.cpp  CRegOperate.cpp
f:\myapp\ccremote\startdemo\startdemo\startdemo.cpp(205): warning C4101: “vari”: 未引用的局部变量 f:\myapp\ccremote\startdemo\startdemo\cregoperate.cpp(160): warning C4101: “vari”: 未引用的局部变量
StartDemo.vcxproj -> F:\myapp\CcRemote\StartDemo\x64\Debug\StartDemo.exe 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”的声明
正在生成代码...

Binary file not shown.