Click here to Skip to main content
15,885,757 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
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!
Posted
Updated 5-May-11 13:09pm
v2

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.
 
Share this answer
 
v2
Comments
555336 30-Apr-11 13:36pm    
You mean add an icon to it? When I right click on both User's program menu and User's desktop, on the property?

By the way, I don't need an icon, but when I click on the icon after installing it, it is the folder where it is stored in the Program files in drive C which is opening.
by using this code we can open application folder where it is installed.
try this...

C#
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();
 
Share this answer
 
Comments
555336 1-May-11 5:03am    
where to insert that? in my form?
ambarishtv 1-May-11 6:14am    
Sorry,Please ignore above solutions.
read it carefully

http://www.simple-talk.com/dotnet/visual-studio/getting-started-with-setup-projects/
http://www.simple-talk.com/dotnet/visual-studio/getting-started-with-setup-projects/

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900