winExec 和 shellExecute(use shellApi)
winexec 面临淘汰;
//注意下面的路径要加上""符合,不然无法注册
paths := 'regsvr32 "'+ExtractFilePath(Application.ExeName)+'dm.dll" /s';
//winexec 和 shellExecute 使用变量在delphi xe 下面的转换,在delphi7是使用Pchar
WinExec(PAnsiChar(AnsiString(paths)),SW_HIDE);
//下面是在delphi xe 下面的情况,关键是参数的类型转换问题;
//ShellExecute(0,'open',PWideChar(WideString(paths)),nil,nil,SW_NORMAL);