简体   繁体   English

Windows注册表,如何添加本机程序以执行启动?

[英]Windows Registry, how to add your Native-Program for boot-executing?

I have done my Native program for Windows. 我已经完成了Windows的Native程序。

( which, I've compiled with #pragma comment(linker, "/SUBSYSTEM:NATIVE" )). (我用#pragma comment(linker, "/SUBSYSTEM:NATIVE" )编译)。

I want to add my program to auto-executing list, how can I do it? 我想将我的程序添加到自动执行列表中,我该怎么办?

My exact questions are: 我的确切问题是:

1). 1)。 How can I do it in Windows Registry ( I have googled about BootExecute/SetupExecute table, but Setup is empty and BootExecute has only: *autocheck autochk ** ). 如何在Windows注册表中执行此操作(我已经使用Google搜索了BootExecute / SetupExecute表,但安装程序为空,BootExecute只有:* autocheck autochk **)。 So I was confused of empty tables ( cause , if it's empty, where are another auto-exec programs in Windows, which ntdll.dll does load ? ) 所以我对空表感到困惑(因为,如果它是空的,Windows中的另一个自动执行程序,ntdll.dll确实加载了吗?)

2). 2)。 Does it matter what is the version of the executable program: for 32/64 bits system ? 什么是可执行程序的版本是否重要: 对于32/64位系统

I have put it in %windir%\\system32 , but there is also %windir%\\WOW64 folder. 我把它放在%windir%\\ system32中 ,但也有%windir%\\ WOW64文件夹。

Should I highlight this detail in Registry or Windows loads each driver from both folders and just simply highlight them as *32 or 64 bits program in taskmgr? 我应该在注册表或Windows中突出显示这个细节,从两个文件夹加载每个驱动程序,只需在taskmgr中将它们突出显示为* 32或64位程序?

3). 3)。 Are there any other ways to do that? 有没有其他方法可以做到这一点?

1) You need to place it to BootExecute registry value. 1)您需要将其放入BootExecute注册表值。 It's a multi-string value, and you need to keep whatever strings are already there (normally only "autocheck autochk *") and just append your program name with no extension. 它是一个多字符串值,你需要保留已经存在的任何字符串(通常只有“autocheck autochk *”)并且只是附加你的程序名称而没有扩展名。

2) You should compile 32 bit binary for 32 bit OS, and 64 bit binary for 64 bit OS. 2)你应该为32位操作系统编译32位二进制文​​件,为64位操作系统编译64位二进制文​​件。 Binary should be placed into %windir%\\system32 二进制文件应放入%windir%\\ system32

3) That's the only way as far as I know 3)据我所知,这是唯一的方法

PS - for an example install any file system or registry defragmenter that has Boot Defrag feature, enable it, and see how it modifies BootExecute. PS - 例如,安装具有引导碎片整理功能的任何文件系统或注册表碎片整理程序,启用它,并查看它如何修改BootExecute。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将 exe 路径添加到 Windows 注册表,以在本机模式下执行? - How to add an exe path to the windows registry, to get executed on the native mode? 如何获得IzPack将程序添加到Windows注册表? - How do I get IzPack to add my program to the Windows Registry? 如何在Windows ARP中控制已安装的应用程序(添加或删除程序) - How to control your installed app in windows ARP(Add or Remove program) 如何将Python添加到Windows注册表? - How to add Python to Windows registry? 如何在Windows中模拟注册表以进行程序测试? - How to emulate registry in Windows for program testing? Windows 7注册表:如何按程序时间表(批处理)编辑注册表项? - Windows 7 registry: how to edit a registry key by program schedule (batch)? 如何和在注册表中编写内容以在Windows启动时自动重新启动程序 - How and What to write in Registry to Auto-Restart a Program on Windows Startup 如何计时在Windows中执行的程序? - How do I time a program executing in Windows? 如何在Windows注册表中为单个键添加多个值 - How to add several values for a single key in Windows Registry 如何在本机Windows程序中实现kill开关 - How to implement a kill switch in a native windows program
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM