COM 服务器注册 - 隐藏弹出窗口 window
COM Server registration - Hide popup window
我们使用 com 暴露的服务器可执行文件。为了让exe能正常运行我们需要使用这个命令。
这可以在命令提示符或 run.exe 等中执行...
[路径文件]\filename.exe /regserver 或 [路径文件]\filename.exe /unregserver
在此之后您会看到一个消息框。
'Component successfully registered'
问题是这会阻止我们的 InstallShield,并且需要手动单击“确定”才能让安装程序继续。我们不希望静默安装出现这种行为。
有谁知道如何禁止弹出窗口?我知道这可以通过 regsvr32 对 dll 的 com 注册来完成。但是对于 com exe,我找不到任何抑制它的东西。使用 RegSvr32 注册它不是一个选项,因为这对我们的 exe 不起作用。
感谢您的帮助!
亲切的问候
塞德里克
我发现我使用的 exe 是由 exe 本身注册的...。因此,不可能将其静音等。有时是可能的,但它必须由创建 exe 的编译器内置。
我将此 vbscript 作为自定义操作添加到我的 IS 项目并且工作正常。
Set oShell = CreateObject("WScript.Shell")
oShell.CurrentDirectory = "[YOURAPPINSTALLDIR]"
'You can check here if the exe exits or not to execute to code below - not implemented in this example
oShell.Run "[YOURAPP].exe /regserver", 0, False
Set oShell = CreateObject("WScript.Shell")
While oShell.AppActivate("[YOUR WINDOW TITLE]") = False
'WScript.Sleep 100 (does not work in IS)
Wend
oShell.SendKeys "{ENTER}"
我们使用 com 暴露的服务器可执行文件。为了让exe能正常运行我们需要使用这个命令。
这可以在命令提示符或 run.exe 等中执行... [路径文件]\filename.exe /regserver 或 [路径文件]\filename.exe /unregserver
在此之后您会看到一个消息框。 'Component successfully registered'
问题是这会阻止我们的 InstallShield,并且需要手动单击“确定”才能让安装程序继续。我们不希望静默安装出现这种行为。
有谁知道如何禁止弹出窗口?我知道这可以通过 regsvr32 对 dll 的 com 注册来完成。但是对于 com exe,我找不到任何抑制它的东西。使用 RegSvr32 注册它不是一个选项,因为这对我们的 exe 不起作用。
感谢您的帮助!
亲切的问候
塞德里克
我发现我使用的 exe 是由 exe 本身注册的...。因此,不可能将其静音等。有时是可能的,但它必须由创建 exe 的编译器内置。
我将此 vbscript 作为自定义操作添加到我的 IS 项目并且工作正常。
Set oShell = CreateObject("WScript.Shell")
oShell.CurrentDirectory = "[YOURAPPINSTALLDIR]"
'You can check here if the exe exits or not to execute to code below - not implemented in this example
oShell.Run "[YOURAPP].exe /regserver", 0, False
Set oShell = CreateObject("WScript.Shell")
While oShell.AppActivate("[YOUR WINDOW TITLE]") = False
'WScript.Sleep 100 (does not work in IS)
Wend
oShell.SendKeys "{ENTER}"