locked
How I can add shortcut of other file in Start Menu with C# Winform setup? RRS feed

  • Question

  • I have C# Winform application. I want to add one myfile.bat file in start menu with my exe shortcut, so user can click on myfile.bat from start menu.

    How can I add myfile.bat in project setup and in start menu?

    I am using C# Winform on Visual Studio 2015 express 


    Monday, May 15, 2017 8:32 AM

Answers

  • Hi Ajax Parmar,

    1, Please add the myFile.bat to the Application Folder then right click it and choose Create Shortcut to ...

    2, Drag the shortcut to the User's Programs Menu Folder:

    3, Also you can rename it to MyFile, Then build and install the setup project.

    Hope it helps!

    Best Regards,

    Stanly


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Ajay Parmar Thursday, May 18, 2017 1:49 AM
    Tuesday, May 16, 2017 9:12 AM

All replies

  • Hi Ajax Parmar,

    I guess you want to set the shortcut's icon of your .exe file with the .bat file, however as far as I know, this is impossible, you can only add the .ico file as the .exe file shortcut's icon.

    Not only the .bat file can not do it, but also the .jpg and etc.

    So if you want to add a icon to your .exe shortcut in start menu, please refer to the following step.(Please make sure that the icon is a .ico file instead of .jpg or .bat or another.)

    1, Add your project and the .ico file to the Application Folder:

    2, Create the project's shortcut and drag it to the User's Desktop Folder and User's Program Menu, of cause you can rename it and add the icon to it:

    Then select the .ico file from the Application Folder:

    3, Build the setup project and install it, then on the desktop, also it can display in the start menu.

    Hope it helps!

    Best Regards,

    Stanly


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, May 16, 2017 2:12 AM
  • Thank you Stanly_F

    Sorry but i don't want to set icon. 

    I want to add a shortcut entry for new *.bat file.

    Let's say i have myFile.bat i want that user can click on MyFile entry on start menu so he/she can run that bat file as they click and run my application exe file. 

    So how to add a myfile.bat in setup project and how to configure project so while user install my program they get shortcut in their start menu.

    Hope you understand

    Thank you.

    Tuesday, May 16, 2017 6:51 AM
  • Hi Ajax Parmar,

    1, Please add the myFile.bat to the Application Folder then right click it and choose Create Shortcut to ...

    2, Drag the shortcut to the User's Programs Menu Folder:

    3, Also you can rename it to MyFile, Then build and install the setup project.

    Hope it helps!

    Best Regards,

    Stanly


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Ajay Parmar Thursday, May 18, 2017 1:49 AM
    Tuesday, May 16, 2017 9:12 AM