我有delphi中用:shellexecute(handle,'open',PChar('%SystemRoot%\System32\calc.exe'),nil,nil,SW_SHOWNORMAL);调用计算器为什么不执行!????我在uses中已加上了shellapi!

解决方案 »

  1.   

    %SystemRoot%\System32是Windows环境变量Path中已指定的目录,调用该目录的程序直接运行即可,不需再指定路径
      

  2.   

    WinExec('calc.exe',SW_SHOW);来晚了,哎哦.......
      

  3.   

    ShellExecute(Handle, nil, 'calc.exe', nil, nil, SW_SHOWNORMAL);//%SystemRoot% //估计不能处理这样的格式~~
      

  4.   

    既然来了,就重复一遍:winexec('calc.exe', SW_NORMAL);^-^