我调用ShellExecute()打开explorer,譬如:
ShellExecute(NULL, "open", "explorer.exe", "c:\\windows", NULL, SW_SHOW);为什么总是在新的explorer.exe进程中打开文件夹呢?
我检查了文件夹选项。其中的“在单独的进程中打开文件夹窗口”是没有勾选的。
但为什么我调用ShellExecute()也好,
WinExec("explorer.exe   \"C:\\Windows\"",SW_SHOWNORMAL);也好
总是会创建1个新的explorer.exe进程? 郁闷~我手动点开文件夹的话,是没有创建新进程的。
郁闷windows

解决方案 »

  1.   

    试下这样
    ShellExecute(NULL, "explorer", "c:\\windows", NULL, NULL, SW_SHOW);
      

  2.   

    ShellExecute(NULL, "explore", "c:\\windows", NULL, NULL, SW_SHOW);
    是这样,explore多了一个r
      

  3.   

    那就这样ShellExecute(NULL, "open", "explorer.exe", "/n,/root,c:\\windows", NULL, SW_SHOW);
      

  4.   

    WIN7下OK,只是XP下会打开文件夹列表
      

  5.   

    ShellExecute(NULL, "open", "explorer.exe", "/n,/root,c:\\windows", NULL, SW_SHOW);还是会有1个单独的explorer.exe进程出来我怀疑是某些设置的问题。因为有的机器不会这样
      

  6.   

    我在WIN2008下试下了会多一个进程,XP下不会.