How to create a start menu shortcut in NSIS in Windows 11? - nsis

I'm looking for a way to add a shortcut of my program to the Windows 11 start menu using NSIS. The previously recommended way seems to not work anymore in Windows 11.
Section /o "Start Menu Shortcut"
CreateShortcut "$SMPROGRAMS\${APPNAME}.lnk" "$INSTDIR\${APPNAME}.exe" "" "$INSTDIR\${ICON}"
SectionEnd
This only creates a new shortcut file in the "AppData\Roaming\Microsoft\Windows\Start Menu\Programs" directory. However the shortcut does not automatically appear in the start menu.

The Start Menu in Windows 11 displays only pinned applications in the initial view. There is no documented way for you to pin your own application. It may appear in the recommended section the first time the application is installed, you don't have any control over this.
The user can pin your application by opening the Start Menu and clicking on "All apps" or search for you application, and then pin it...

Related

Clicking Troubleshoot menu on system startup using powershell

I have used 'shutdown.exe /r /o' to restart windows 11 in advanced mode. The screen opens where I can see the Troubleshooting menu. I wish to click on the Troubleshooting menu after startup. Is there a way to do this?

How to prevent InnoSetup from creating Start menu shortcuts?

I use InnoSetup to create application installer. Since I am installing a plugin for an existing application, I don't want the application icon to show up in the Start menu shortcuts. How to prevent InnoSetup from creating Start menu shortcuts?
InnoSetup will only create icons if you have entries in your [Icons] section. Remove all of the entries and your installer won't create any icons.
In devnull's scenario, another task to do could be to hide the installed plugin from the list of the installed Programs and Features on Windows control panel.
In order to so, you need to add this line of code in your InnoSetup script:
CreateUninstallRegKey=no

Installshield desktop shortcut icon shows windows default icon

I have inherited an installscript project which asks the user if they want a desktop shortcut. The script creates the shortcut, but Windows gives it a default icon rather than the icon specified. When you look at the properties of the shortcut, the correct icon is displayed.
I see on this page the following:
"The shortcut target must be present on the target system before AddFolderIcon can be called." And I'm wondering if that's the cause of the issue.
The installscript is creating shortcuts in the OnFirstUIBefore() function. Do we need to instead create these shortcuts in the OnFirstUIAfter() function, after the executable has been copied to the user's machine? And if so, do we need to delay that dialog which asks them if they want the shortcut, or is there a way to save those answers until we get to that function?
I don't recall seeing an install which copies files and then asks you more questions about shortcuts.
We are using Installshield 2012 Spring if that is relevant at all.
FWIW I gave up and decided to create the shortcuts using the installation designer. Now they function correctly; however the install dialogs no longer ask the user if they want the shortcuts.

Disable file preview in VS2012

In VS2012 when you select a file in solution explorer it automatically opens file in a special "preview" tab.
Maybe my computer is not fast enough, but this preview is too slow for my taste.
How do I disable this feature?
In Tools > Options > Environment > Tabs and Windows, you can disable it by unckecking "Solution explorer" under Preview tab.
I find it using the "Quick launch" new feature. Simply type "preview", and a link to the setting will be suggested. Great new feature of VS
You can also toggle file preview within the Solution Explorer tool-window itself:
This may have been added in the July update because I hadn't noticed it before then.
One of the buttons at the top of the solution explorer toggles whether this is enabled.
On Visual Studio 2013 I have done this by this Icon :
An even better solution IMO is to completely disable the File Preview feature (not just for Solution Explorer):
Open Tools > Options
Navigate to Environment > Tabs and Windows
Uncheck "Allow new files to be opened in the preview tab"
This also prevents things like Go To Definition (F12) from using preview tabs.

Visual Studio 11 - Design view is unavailable for x64 and ARM target platforms because the document contains custom elements

I'm test-driving Visual Studio 11 beta and it appears I've hit a major snag.
Has anyone tried opening an actual production WPF project that contains WPF windows with User Controls? When I try to open a WPF Window or control that contains user controls, the design view displays a nice error message:
"Design view is unavailable for x64 and ARM target platforms because the document contains custom elements."
It appears to be a major wtf... since most developer machines these days are x64.
* UPDATE: *
Reproduced this in a new VS 2011 WPF project:
Add a xaml resourec file with styles (in the same project as the user control)
Reference this file in a user control using the tag
Immediately, the "Design view is unavailable for x64 and ARM target platforms..." pops up.
As soon as I remove the resource reference, the designer starts working again.
The "x64 or ARM" in the message refers to the current target configuration of the project, not to the machine on which Visual Studio is running. That is, if you change the target platform configuration of the project to x86 or Any CPU, you should not get this message.
You can change the target platform from the Standard Toolbar (select the "Add or Remove Buttons" item at the end of the toolbar, and select "Solution Platforms").
If your solution platform is x86 or Any CPU, please add a comment to this post and let me know. I'd be interested in investigating.
I resolved this by doing the following in Visual Studio:
Select the solution node within Solution Explorer.
Within the Properties pane, set "Active config" to an x86 processor type.
Display Properties for application project.
Select the Build tab on the navigation pane.
Ensure "Platform target" is set to x86.
After completing these steps:
Restart Expression Blend.
Observe the designer is now loaded with UI

Resources