NT还是Windows98取得当前操作平台......
作者:陈立平 来源:yesky 2007年11月1日
关键字:
调用:
打开控制面板:ExecuteFile("shell32.dll,Control_RunDLL");
日期/时间设置:ExecuteFile("shell32.dll,Control_RunDLL timedate.cpl");
时区: ExecuteFile("shell32.dll,Control_RunDLL timedate.cpl,,/f");
ODBC: ExecuteFile("shell32.dll,Control_RunDLL odbccp32.cpl");
Outlook传真/电子邮件: ExecuteFile("shell32.dll,Control_RunDLL mlcfg32.cpl");
JoyStick: ExecuteFile("shell32.dll,Control_RunDLL joy.cpl,,0");
文件检索: ExecuteFile("shell32.dll,Control_RunDLL findfast.cpl");
区域设置: ExecuteFile("shell32.dll,Control_RunDLL intl.cpl,,0");
参数:0—区域设置页,1---数字页,2---货币页,3---时间页,4---日期页
打印机: ExecuteFile("shell32.dll,Control_RunDLL main.cpl @2");
字体: ExecuteFile("shell32.dll,Control_RunDLL main.cpl @3");
多媒体属性: ExecuteFile("shell32.dll,Control_RunDLL mmsys.cpl,,0");
参数0:取值[0..4],代表不同的选项页。
网络: ExecuteFile("shell32.dll,Control_RunDLL netcpl.cpl");
拨号网络: ExecuteFile("rnaui.dll,RnaWizard");
安装TCP/IP: ExecuteFile("setupapi.dll,InstallHinfSection MSTCP.Install 4 nettrans.inf");
显示属性: ExecuteFile("shell32.dll,Control_RunDLL desk.cpl,,0"); //取值[0..5]
添加删除程序: ExecuteFile("shell32.dll,Control_RunDLL appwiz.cpl,,1"); //取值[1,2,3]
Internet属性: ExecuteFile(,"shell32.dll,Control_RunDLL inetcpl.cpl,,0"); //取值[0..5]
4.创建快捷方式
uses ShlObj, ActiveX, ComObj, Registry;
...........................
Procedure SetLink(FolderNo: Integer; ACmdFile, Parameter, LinkName: string);
const
Folder: array[0..2] of string = ("Desktop", "Start Menu", "Programs");
var
MyObject : Iunknown;
MySLink : IShellLink;
MyPFile : IPersistFile;
FileName : string;
Directory : string;
WFileName : WideString;
MyReg : TRegIniFile;
begin
MyObject := CreateComObject(CLSID_ShellLink);
MySLink := MyObject as IShellLink;
MyPFile := MyObject as IPersistFile;
FileName := ACmdFile;
with MySLink do