您的位置:首页>>系统应用>>Windows XP>>阅读资讯:深入学习 详细讲解Rundll32.exe文件详解winexec(Pchar('StrCommand'),sw_Show);
其中"StrCommand"代表以下命令之一(使用Windows中的运行不要加引号):
"rundll32 shell32,Control_RunDLL" - 运行控制面板
"rundll32 shell32,OpenAs_RunDLL" - 打开"打开方式"窗口
"rundll32 shell32,ShellAboutA Info-Box" - 打开"关于"窗口
"rundll32 shell32,Control_RunDLL desk.cpl" - 打开"显示属性"窗口
"rundll32 user,cascadechildwindows" - 层叠全部窗口
"rundll32 user,tilechildwindows" - 最小化所有的子窗口
"rundll32 user,repaintscreen" - 刷新桌面
"rundll32 shell,shellexecute Explorer" - 重新运行Windows Explorer
"rundll32 keyboard,disable" - 锁写键盘
"rundll32 mouse,disable" - 让鼠标失效
"rundll32 user,swapmousebutton" - 交换鼠标按钮
"rundll32 user,setcursorpos" - 设置鼠标位置为(0,0)
"rundll32 user,wnetconnectdialog" - 打开"映射网络驱动器"窗口
字串7
www.yueluo.net
字串9
winexec('rundll32.exe shell32.dll, Control_RunDLL', 9);
{辅助选项 属性-键盘}
winexec('rundll32.exe shell32.dll, Control_RunDLL access.cpl, 1', 9);
{辅助选项 属性-声音}
winexec('rundll32.exe shell32.dll, Control_RunDLL access.cpl, 2', 9);
{辅助选项 属性-显示}
winexec('rundll32.exe shell32.dll, Control_RunDLL access.cpl, 3', 9);
{辅助选项 属性-鼠标}
winexec('rundll32.exe shell32.dll, Control_RunDLL access.cpl, 4', 9);
{辅助选项 属性-常规}
winexec('rundll32.exe shell32.dll, Control_RunDLL access.cpl, 5', 9);
{添加/删除程序 属性-安装/卸载}
winexec('rundll32.exe shell32.dll, Control_RunDLL Appwiz.cpl, 1', 9);
{添加/删除程序 属性-Windows安装程序}
winexec('rundll32.exe shell32.dll, Control_RunDLL Appwiz.cpl, 2', 9);
{添加/删除程序 属性-启动盘}
winexec('rundll32.exe shell32.dll, Control_RunDLL Appwiz.cpl, 3', 9);
{显示 属性-背景}
winexec('rundll32.exe shell32.dll, Control_RunDLL desk.cpl, 0', 9); 字串8
{显示 属性-屏幕保护程序}
winexec('rundll32.exe shell32.dll, Control_RunDLL desk.cpl, 1', 9);
{显示 属性-外观}
winexec('rundll32.exe shell32.dll, Control_RunDLL desk.cpl, 2', 9);
{显示 属性-设置}
winexec('rundll32.exe shell32.dll, Control_RunDLL desk.cpl, 3', 9);
{Internet 属性-常规}
winexec('rundll32.exe shell32.dll, Control_RunDLL Inetcpl.cpl, 0',
9);
{Internet 属性-安全}
winexec('rundll32.exe shell32.dll, Control_RunDLL Inetcpl.cpl, 1',
9);
{Internet 属性-内容}
winexec('rundll32.exe shell32.dll, Control_RunDLL Inetcpl.cpl, 2',
9);
{Internet 属性-连接}
winexec('rundll32.exe shell32.dll, Control_RunDLL Inetcpl.cpl, 3',
9);
{Internet 属性-程序}
winexec('rundll32.exe shell32.dll, Control_RunDLL Inetcpl.cpl, 4',
9);
{Internet 属性-高级}
winexec('rundll32.exe shell32.dll, Control_RunDLL Inetcpl.cpl, 5',
9);
{区域设置 属性-区域设置}
www.yueluo.net
使用方法:
点击“开始-程式-Ms-Dos方式”,进入Dos视窗,然後键入"rundll32.exe
user.exe,restartwindows",再按下回车键,这时你将看到,机器被重启了!怎么样,是不是很有趣?
当然,Rundll的功能绝不仅仅是重启你的机器。其实,Rundll者,顾名思义,执行Dll也,它的功能就是以命令列的方式呼叫Windows的动态链结库,Rundll32.exe与Rundll.exe的区别就在於前者是呼叫32位的链结库,而後者是运用於16位的链结库,它们的命令格式是:
RUNDLL.EXE ,,
这里要注意三点:1.Dll档案名中不能含有空格,比如该档案位於c:\Program
Files\目录,你要把这个路径改成c:\Progra~1\;2.Dll档案名与Dll入口点间的逗号不能少,否则程式将出错并且不会给出任何资讯!3.这是最重要的一点:Rundll不能用来呼叫含返回值参数的Dll,例如Win32API中的GetUserName(),GetTextFace()等。在Visual
Basic中,提供了一条执行外部程式的指令Shell,格式为:
Shell “命令列”
如果能配合Rundll32.exe用好Shell指令,会使您的VB程式拥有用其他方法难以甚至无法实现的效果:仍以重启为例,传统的方法需要你在VB工程中先建立一个模组,然後写入WinAPI的声明,最後才能在程式中呼叫。而现在只需一句: