【 以下文字转载自 MSDN 讨论区 】
发信人: jamen (*******), 信区: MSDN
标 题: VS2008 setup project的问题
发信站: 水木社区 (Tue Jan 5 13:03:24 2010), 站内
我的两个问题其实都在MSDN里找到了些线索,但是效果并不满意。
http://msdn.microsoft.com/en-us/library/kz0ke5xt.aspx
How do I automatically run my program after installation?
1.
Create a .vbs file containing the following code:
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run """" & Property("CustomActionData") & """",7,False
Set WshShell = Nothing
2.
Open your setup project and go to the Custom Actions Editor.
3.
Select the Commit node; right-click and add a new Custom Action.
4.
Browse the file system to add the .vbs file that you created in step 1
.
5.
Edit the CustomActionData property by adding the following, where Your
App.exe is the name of your startup application file:
[TARGETDIR]YourApp.exe
问题:我的YourApp.exe依赖于同一个文件夹下的dll。使用上述方法之后首次运行我的
程序会有一个错误说找不到那个dll。关闭、再启动我的程序之后正常。我感觉是运行的
时机还是不够靠后,能不能想办法让它再靠后一点?
还有,这样我需要多打包一个vbs文件,有办法不这样么?
How do I create an uninstall link on my shortcut?
1.
In your Setup project's directory, create a new Uninstall.bat file.
2.
In your Setup project, copy the ProductCode property (a value like [12
345678-1234-1234-1234-123412341234]).
3.
Edit Uninstall.bat so that it has one line that contains the following
, where ProductCode is the value that you copied in step 2:
Msiexec /x ProductCode
4.
Add Uninstall.bat to your Setup project's application folder.
5.
Right-click Uninstall.bat and select Create Shortcut to create a short
cut.
6.
Put the shortcut in the appropriate Start menu folder in the Setup pro
ject.
7.
Rename the shortcut to something like "Uninstall <Application Name>."
问题:这样每次总有一个黑窗口弹出来,有办法不让它出来么?
还有,同样,这里要多打包一个uninstall.bat,有办法不需要打包么?
同样的问题还有license界面,只支持从目标机器上读取一个rtf文档,我能不能从本地
上导入一个文档,这样就不用单独打包我的license文件了。
--
FROM 211.99.222.*