我的软件使用的皮肤在每台电脑上初次运行需要注册皮肤文件,注册用的是一个bat批处理文件,内容是 for /r %%a in (*.dll) do %SystemRoot%\System32\regsvr32.exe /s/c "%%a"  。我现在用的办法是在安装完成后打包工具自动启动bat文件 但是会出现dos的那个黑框,  有没有办法不让出现黑框呢?  请高手指点

解决方案 »

  1.   

    你是不是用WinExec或者ShellExecute实现的啊?如果是就把最后的参数设成SW_HIDE就可以了。
      

  2.   

    可以用vbs脚本去调用bat
    set wshshell=createobject ("wscript.shell")
    a=wshshell.run("C:\XXX.bat",0)当然也可以用SW_HIDE隐藏掉那个窗口.
      

  3.   

    ShellExecute(Handle, 'open', PChar('c:\windows\send.bat'), nil, nil, sw_hide);
      

  4.   

    不用bat ,直接调命令就好了,还省事。winexec ('cmd.exe /c  for /r %%a in (*.dll) do %SystemRoot%\System32\regsvr32.exe /s/c "%%a',sw_hide);