0

I have a WinForms application that is packaged with a WPF project. I have set the .exe to "Content" and "AlwaysCopy", and it is included in the installation folder upon install.

I want to include a shortcut in the start menu that will open this EXE app. How do I do that?

DrDamnit
  • 4,736
  • 4
  • 23
  • 38
  • do you have an installer? what type of installer are you using? – peval27 Feb 15 '17 at 17:35
  • The publish wizard from the Build menu in VS2015 – DrDamnit Feb 15 '17 at 17:48
  • have you looked at the Project solution | Publish | Options | Manifests | Create desktop shortcuts? or you can have a look [here](http://stackoverflow.com/questions/3303962/visual-studio-deployment-project-create-shortcut-to-deployed-executable) – peval27 Feb 15 '17 at 17:52
  • You don't do this from the WPF exe. You add a separate project that builds an installer, and have shortcut created at install-time. – Lynn Crumbling Feb 15 '17 at 18:26

1 Answers1

-1

Try following :

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;

namespace ConsoleApplication1
{
    class Program
    {
        const string exe = @"c:\Windows\System32\notepad.exe";
        static void Main(string[] args)
        {
            Process process = new Process();
            ProcessStartInfo info = new ProcessStartInfo(exe);
            process.StartInfo = info;
            process.Start();
        }
    }



}
jdweng
  • 33,250
  • 2
  • 15
  • 20