在VB.net中设置和部署 [英] Setup and Deployment in VB.net

查看:103
本文介绍了在VB.net中设置和部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,我刚刚在VB.net中创建了一个构建软件(部署).但是,当我单击图标在安装后打开程序时,令我惊讶的是,位于驱动器C的程序文件中的程序文​​件夹向我打开了!

我当然不想打开它,我只是想当我单击桌面上的图标时,该软件直接向我打开,而不是在Drive C的程序文件"中打开它的文件夹.

以下是我用来构建它的技术:


之后,单击应用程序文件夹",然后将True设置为属性中的AlwaysCreate.我也是针对用户的桌面"和用户的程序"菜单这样做的.

然后,我在用户"的桌面"和用户的程序"菜单上单击鼠标右键,以创建一个快捷方式,并为其指定相同的名称.

最后,在两个快捷方式的属性上,我将目标"放置为应用程序文件夹".然后构建.

您能帮我在构建后单击图标时,如何不使位于驱动器C的程序文件"中的软件文件夹无法从那里打开吗?

谢谢!

Ok, I have just created build a software (Deployment) in VB.net. However, when I click on the icon open the program after installing, to my utter amazement, the program folder which is located in the Program Files in the Drive C, is opening to me!

I don''t want that to open of course, I just want that when I click on the icon on the desktop, the software opens to me directly, not its folder in the Program Files in the Drive C.

Below is the technique I used to build it:


After that, I click on Application Folder and put True to AlwaysCreate in the property. I did this also for BOTH User''s Desktop and User''s Program Menu.

Then, I right-click on on BOTH User''s Desktop and User''s Program Menu to create a short-cut, giving them the same name.

Finally, on BOTH short-cut''s property, I put the Target as Application Folder. Then build.

Can you help me how to not get the software folder located in the Program Files in Drive C to not open from there when I click on the icon after building it?

Thank you!

推荐答案

尝试一下:)

右键单击WinApp项目,然后在应用程序"部分中选择"Icon"和图标",这将是一个ico文件.浏览图标文件并选择它.构建项目并将其附加到安装项目.
try this :)

Right click the WinApp Project and inside the Application section you can choose and Icon which will be an ico file. Browse for the icon file and select it. Build the project and attach it to the setup project.


使用此代码,我们可以打开安装了该项目的应用程序文件夹.
试试这个...

by using this code we can open application folder where it is installed.
try this...

string directory = Path.GetDirectoryName(Application.StartupPath);
string windir = Environment.GetEnvironmentVariable("WINDIR");
System.Diagnostics.Process prc = new System.Diagnostics.Process();
prc.StartInfo.FileName = windir + @"\explorer.exe";
prc.StartInfo.Arguments = directory;
prc.Start();


这篇关于在VB.net中设置和部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆