它的文件格式 .msc.
 我用winexec试过那,不行!应该怎么做?谢谢!

解决方案 »

  1.   

      i:= winexec(pchar('%SystemRoot%\system32\eventvwr.msc'),1);
      if (i>31) then
         begin
          //事件查看器运行成功
         end
         else
         begin
          //事件查看器运行成功
           raise exception.Create('运行事件查看器失败!错误代码:'+inttostr(i));
         end;
      

  2.   

    i:=ShellExecute(handle,
                     'open',
                     'd:\winnt\system32\mmc.exe',
                     'd:\winnt\system32\eventvwr.msc',
                     nil,
                     sw_shownormal);
      if (i>32) then
         begin
          //事件查看器运行成功
         end
         else
         begin
          //事件查看器运行成功
           raise exception.Create('运行事件查看器失败!错误代码:'+inttostr(i));
         end;这样写为什么还是不对阿》》》》????
      

  3.   

    就这么简单的ShellExecute(handle, 'open', 'eventvwr.msc', '', '', 0);by LY http://lysoft.7u7.net
      

  4.   

    感谢 ly_liuyang(Liu Yang) 
    结速,给分