Windows shortcuts without a path - windows

'Regular' windows application shortcuts have a target which is a path to an executable file. This path is visible (and editable) in the shortcut's properties dialog.
But many shortcuts have no such path, only a (read only) application name is displayed. All the MS Office programs, for example, have such shortcuts.
How do these shortcuts work (I guess there's a progid involved), what are their advantages over 'regular' shortcuts and why would I want to use such shortcuts for my own applications?
Finally, can I create such a shortcut with an installer built by a Setup Project in Visual Studio 2008?

These are "advertised" shortcuts provided by MSI.
Here's a google search that contains some information you might find useful:
Google Search
I don't know if you can create these via a Setup Project.

One advantage of advertised shortcuts is you can have certain features be installed on demand, and I think missing files can also be repaired if I'm not mistaken. The downside as a user that I hate is I sometimes want to find out where the executable is and which executable is run and it's harder to find that out.

Read MSDN, everything is detailed about Links.

Related

How to implement an efficient folder search in a Windows Explorer extension

I'd like to implement a Windows Explorer extension that works like this:
The extension quietly records all folders the user visits in Windows Explorer.
A shortcut command like Ctrl+F3 activates the extension. The user can then type some parts of a folder name or path, and the extension shows the recently visited folders that most closely match the search query. The user can then select a folder, which lets Windows Explorer navigate there.
An important point: I don't want to just extend the standard Windows Explorer. I need to extend the Open File Dialog as well, i.e. these windows:
The Open File Dialog is something that runs inside other applications, so the task might be a bit more difficult. However, I'm pretty sure that it is possible. For example, Shell Namespace Extensions or Context Menu items are visible in both the standard Windows Explorer and the file dialogs in other applications. That's why I'm pretty sure there must be a way to implement such an extension.
What's the best way to implement it?
Edit: By the way, if someone knows of such an extension, I'd be very happy to know.

Why is the autorun information by the startup shortcut created by InstallSheild incorrect?

I have an InstallShield 2013 project that puts a shortcut into the Startup folder. When I run the installer, the shortcut is placed correctly and seems to have the correct path information. All seems well.
Then I look at the startup information provided by the windows task manager. The startup entry reads.
Name: InstallShield
Publisher: Flexera Software LLC
When using the right click "Open File Location", the path opened is not the path of the generated shortcut. Instead, it is C:\Windows\Installer{GUID}\NewShortcut2_{HexString}.exe
Why is this happening, and how do I change it?
Edit: The testing has been done on a windows 8.1 system.
Per the requirements of the Icon table (see the Remarks section), InstallShield creates an exe format file that includes the icon for your shortcut. This is the file placed in the location you mention above. However it is not the target of the shortcut, so I do not understand why Windows is indicating this. I don't think InstallShield offers any ways to tweak how it builds the Icon table, unless it does things differently for advertised and non-advertised shortcuts.
(BTW, I suspect this behavior is specific to certain versions of Windows, so it may be worth editing that into your question.)

Get Internet Explorer shorcuts from .mui file

I'm trying to make an AutoIT script to automatize certain tasks. The problem is that I'm basing most of the IE control on the use of shortcuts. Shortcuts depend on the IE language settings so, in order to make an international implementation, I should know which are the current hotkeys given the current IE language packages. I understand that this can be done using the .mui files that come in the IE language packages, but I'm not finding where these shortcut settings are. Some of the .mui files have entries that clearly represent shortcuts, but they seem to be the same in every language package... Any ideas?

How do I set AppUserModelID on shortcut?

I'm in Windows 7 working on combining two apps with the same task bar icon, as described in this question:
Pinning advertised shortcuts on the taskbar in windows 7
I see there, and it lots of online documentation that I need to set the AppUserModelID as a property of the shortcut. My installer program uses the basic Visual Studio 2008 setup project, and I don't see any way to set shortcut properties on installation. Is there any head-start anyone can give me on how to do this?
Sheng commented that "You can also switch to other MSI authoring tools that supports setting the appid for shortcuts, such as WIX or NSIS."
To achieve this using a Shortcut element in Wix you must add a child ShortcutProperty element to your Shortcut element and use the Shell property name "System.AppUserModel.ID" as the key.
<Shortcut Id="StartMenuShortcut"
Name="Shortcut Name"
Description="Shortcut Description"
Target="[INSTALLLOCATION]Application.exe"
WorkingDirectory="INSTALLLOCATION">
<ShortcutProperty Key="System.AppUserModel.ID" Value="AppUserModelID" />
</Shortcut>
I don't know anything about VS2k8 setup projects so I don't know if you can run custom actions etc but I do know that to set the AppId on a shortcut you load/create your shortcut and query its IShellLink for IPropertyStore, then InitPropVariantFromString a variant with your id and call SetValue(PKEY_AppUserModel_ID,propvariant) + Commit on the propertystore
Adding to Ander's reply.
Visual Studio Setup project does not support setting appid and will probably never be unless Microsoft reverse the deprecation of Setup project feature.
There is a Windows API Code Pack that helps in invoking shell APIs. Here is a tutorial on creating shortcut in custom action. You can add the code to update the shortcut to the custom action.
You can also switch to other MSI authoring tools that supports setting the appid for shortcuts, such as WIX or NSIS.

Plugin for Visual Studio to Mimic Eclipse's "Open Type" or "Open Resource" Keyboard Access

If you've ever used Eclipse, you've probably noticed the great keyboard shortcuts that let you hit a shortcut key combination, then just type the first few characters of a function, class, filename, etc. It's even smart enough to put open files first in the list.
I'm looking for a similar functionality for Visual Studio 2008. I know there's a findfiles plugin on codeproject, but that one is buggy and a little weird, and doesn't give me access to functions or classes.
Vs11 (maybe 2010 had it too) has the Navigate To... functionality which (on my machine) has the Ctrl+, shortcut.
By the way it understands capitals as camelcase-shortucts (eclipse does so too). For instance type HH to get HtmlHelper.
This isn't exactly the same as Eclipse from your description, but Visual Studio has some similar features out of the box (I've never used Visual Assist X, but it does sound interesting).
The Find ComboBox in the toolbar ends up being a sort of "Visual Studio command line". You can press Ctrl+/ (by default) to set focus there, and Visual Studio will insert an ">" at the beginning of the text (indicating that you want to enter a command instead of search). It even auto-completes as you type, helping you to find commands.
Anyway, to open a file from there, type "open <filename>". It will display any matching files in the drop down as you type (it pulls the list of files from the currently open solution).
To quickly navigate to a function, in the code editor press Ctrl+I to start an incremental search. Then just start typing until you find what you are looking for. Press Escape to cancel the search, or F3 to search again using the same query. As you are typing in the search query, the status bar in the lower left corner will contain what Visual Studio is searching for. Granted, this won't search across multiple files (I've never used Eclipse much, but that sounds like what it does from your description), but hopefully it will help you at least a little bit.
If anyone stumbles upon this thread:
There's a free plugin (created by me) for Visual Studio 2008 that mimics the Eclipse Ctrl+Shift+R Open Resource dialog (note, not the Open Type dialog). It works with any language and/or project type.
You can find it at Visual Studio Gallery.
Some of the neat features are available in Visual Assist X, though not all of them. I've asked on their forums, but they haven't appeared as yet. VAX gets updated regularly on a rough 4 week period for bug fixes and a new feature every couple of months.
If you are looking for an add-in like this to quickly navigate to source files in your project:
try the Visual Studio 2005/2008 add-in SonicFileFinder.
Resharper does this with the Ctrl-N keyword. Unfortunately it doesn't come for free.
Visual Studio doesn't have anything like this feature beyond Find.
Found this thread while searching for Eclipse's Ctrl+Shift+R, and after seeing the Visual Studio Gallery, found the DPack Tools (they are free, and no, I'm not endorsed in any way by them).
But it's exactly what I was searching:
- Alt+U -> File Browser (a la Eclipse Ctrl+Shift+R)
- Alt+M -> Code Browser (Method list in the actual class)
It has more features, but I'm happy with these ones.
I have been using biterScripting along with Visual Studio to do more flexible searching and manipulation.
It can search the entire workspace.
It can search within any project - EVEN IF THAT PROJECT IS NOT LOADED OR EVEN PART OF A WORKSPACE.
It can find things using regular expressions.
AND, ABOVE ALL, it can make bulk changes. For example, want to change the name of a class from CCustomer to CUser, I can do it in just a few command lines - Actually, I have written scripts for things like this I do often. I DON'T HAVE TO CLICK ON EACH INSTANCE AND MANUALLY DO THE CHANGE.
And, it is inexpensive ($0). I downloaded it from http://www.biterscripting.com .
I'm also comming from the Java Development side and was looking for the CTRL+T feature in the Visual Studio. The other answers refer to open file, but since in C# the class name and file name can be different this is not what i was looking for.
With the Class View or the Object Browser you can search for Objects and Classes
[View]->[Class View] or [View]->[Object]

Resources