Adding additional windows search keywords to a single shortcut or executable - executable

We have an executable file with an installer which generates shortcuts in the C:\ProgramData\Microsoft\Windows\Start Menu\Programs directory.
The name of the software is formatted FOO-Bar. We want users to be able to locate the executable in Windows search by typing FOO Bar or just Bar, but this does not seem to work due to the hyphen in the name. The hyphen cannot be removed due to specific style guidelines.
Is there a way to inform windows search that the executable or shortcut can be found by the other forms of the title? I know something similar is done with Visual Studio Code, where you can locate the same short cut with the search code, vscode, or vs code.

Related

VSTO Addin for Outlook install via WIX

My goal is install VSTO Outlook Addin for all users on local PC instead of current user. I used Publish method from Visual Studio and result is exe file, which means ClickOnce method. (not posible for install for All)
Well i start my research i found Wix.
My first question is, when i create Build from Visual Studio from my VSTO addin, i have 2 dirs and 20 files, is possible to assign dirs in product.wxs file in WIX Directory ref?
Second question, when files and dirs are "installed" to target directory, (program files for example) how can be VSTO be assigned to Outlook ? Its becouse to add VSTO to registry HKLM ?
Im asking if im closer to my goal
Not sure if I understood your first question but I will try to answer it anyway. The only files you have to bring to a user's PC are those that are located under bin/Release folder, except for those that have the *.pdb extension. There are 2 ways how you can add them into the installation:
First way is to manually add each file you want to include in your installation as the file component in you Product.wxs. You can find a good example of that in their official tutorial.
Second way is to utilize the harvest tool (Heat) from Wix Toolset. This tool can generate a list of components automatically during a build.
As for your second question. To make Word or Outlook see your add-on you have to create an entry in Windows registry during installation. For example for Microsoft Word you have to create a new key HKLM\Software\Microsoft\Office\Word\Addins\MySuperAddOn with the following entries:
Entry
Type
Value
Description
REG_SZ
Required. A brief description of the VSTO Add-in. This description is displayed when the user selects the VSTO Add-in in the Add-Ins pane of the Options dialog box in the Microsoft Office application.
FriendlyName
REG_SZ
Required. A descriptive name of the VSTO Add-in that is displayed in the COM Add-Ins dialog box in the Microsoft Office application. The default value is the VSTO Add-in ID.
LoadBehavior
REG_DWORD
Required. A value that specifies when the application attempts to load the VSTO Add-in and the current state of the VSTO Add-in (loaded or unloaded). By default, this entry is set to 3, which specifies that the VSTO Add-in is loaded at startup. For more information, see LoadBehavior values. Note: If a user disables the VSTO Add-in, that action modifies LoadBehavior value in the HKEY_CURRENT_USER registry hive. For each user, the value of the LoadBehavior value in the HKEY_CURRENT_USER hive overrides the default LoadBehavior defined in the HKEY_LOCAL_MACHINE hive.
Manifest
REG_SZ
Required. The full path of the deployment manifest for the VSTO Add-in. The path can be a location on the local computer, a network share (UNC), or a Web server (HTTP). If you use Windows Installer to deploy the solution, you must add the prefix file:/// to the manifest path. You must also append the string |vstolocal (that is, the pipe character | followed by vstolocal) to the end of this path. This ensures that your solution is loaded from the installation folder, rather than the ClickOnce cache. For more information, see Deploy an Office solution by using Windows Installer. Note: When you build a VSTO Add-in on the development computer, Visual Studio automatically appends the
You may want to read the official documentation to see more details.
Wix Toolset does allow to do that as well. You have to declare the RegistryKey component in your Product.wxs.

How do I find the EXEs and/or the DLLs of a Windows Store App?

How do I find the EXEs and DLLs of a Windows Store App? The target seems to be very odd in the shortcuts on the desktop, and I can't look at them more because these are virtual files. The target seems to be a package ID, followed by an exclamation point, followed by a keyword. Where can I find the files for these apps?
Go to %programfiles%, make sure hidden folders are enabled, then try to access the WindowsApps folder. If it gives a pop up saying you don't have access, click the "Security" button then "Advanced" then change the owner to "Administrators" and click Apply and then just press okay on everything.

How do I compile vb code to exe?

I have some vb code that is structured like this:
./AssemblyInfo.vb
./WindowsApplication1/AppUtils.vb
./WindowsApplication1/Form1.vb
./WindowsApplication1.Form1.resx
./WindowsApplication1.My/MyApplication.vb
./WindowsApplication1.My/MyComputer.vb
./WindowsApplication1.My/MyProject.vb
./WindowsApplication1.My/MySettings.vb
./WindowsApplication1.My/MySettingsProperty.vb
./WindowsApplication1.My.Resources/Resources.vb
./WindowsApplication1.Resources.resx
./WindowsApplication1.vbproj
I have tried several times trying to create an empty solution and then import the .vb and the .vbproj but I can not stumble on the right combination to get it to expose the build button on the menu so we can build it.
I am not a windows person so googling is difficult because the terminology is difficult to understand: Example: I use the New Project button to create a solution; that is confusing.
In short, I am hoping to get instructions that will cover:
A) Creating a new solution,
B) Importing the code listed above into the solution, and
C) Compiling the code into an .exe.
BTW: I am using Visual Studio 2008.
If you give me you best guess I will edit your answer as I try it and figure out more precise instructions.
[EDIT] When I double click on the .vbproj file on windows explorer visual studio opens and the .vbproj file is displayed as XML. No build button is shown.
[EDIT] When I do File -> Open Project... .vbproj is not listed as a supported extension so there is no way to load the project from that menu item. That menu items does not have a *.* all source option. The .vbproj file has an icon that indicates that windows knows what it is: "Visual Basic Project file". This code is the result of a decompiling an .exe of the original project where the source was lost.
[EDIT] I just followed Joel's advice, but I used VS2005 rather than VS2008 and it was able to find the .vbproj file. Does that make sense? Is there something wrong with my VS2008 that makes it not open .vbproj files or is that to be expected?
[EDIT] The version of VS that CANNOT see the .vbproj is VS2008 9.0.30729.4462. The version of VS that CAN see the .vbproj is VS2005 8.0.50727.762. By "see" I mean when I follow Joel's instructions of using File->Open Project VS will recognize the .vbproj file as something it can open.
When I double click on the .vbproj file on windows explorer visual studio opens and the .vbproj file is displayed as XML
Something is broken with file associations on your Windows system.
You can open Visual Studio first and choose "Open Project/Solution" inside Visual Studio. Doing this will makes sure Visual Studio treats it as a project file, rather than just an XML file, and will allow you to attempt to build the project.
BTW, recent versions of Visual Studio are free. You might be able to fix this by updating to a more recent version.

"Programs and Features" icon for Win application (deployed with ClickOnce)

Using Visual Studio 2012, I manage to publish a Winforms application and install it successfully on other machines, making it work nicely. Although, there are a few small details that I want to change.
The published application goes into the Start Menu inside a folder named after me. I suppose it's taking my Windows user name, I don't set it anywhere, it just happens by default. I wish I could define that.
(EDIT)
I solved the above issue: Project properties > "Publish tab" > Options and set the Publisher name: this is the name of the folder
(end edit)
When I look for the program in Control Panel > Programs and Features, it has a weird default icon instead of the one I defined (which appears correctly on the Start Menu)
So, how to set my icon on the Programs and Features as well?
(EDIT) -
I'm using ClickOnce apparently (thanks to #Crono)
Thanks
For changing application icon in Programs and Features, this answer might help you: Custom icon for ClickOnce application in 'Add or Remove Programs'
The trick is in adding a registry string value DisplayIcon pointing to the icon file. The value is located under Uninstall registry key of your application.

Visual Studio 2012 - Custom prerequisites are not appearing in the Properties > Prerequisites dialog box

I've created my first Office Add-in using Visual Studio. It targets the 4.0 .Net framework and was created using the new VS 2012. I need to distribute/install this project on various 32-bit XP and 64-bit Windows 7 computers around the office. So I configured the project to be installed on XP (which was my first speed bump because I didn't realize VS 2012 needed an update in order to make a solution that was XP compatible). Now that I have a valid win32 application, I am getting another error:
The following error occurred attempting to install 'C:\filepath...\Import Contacts.vsto':
"No application is associated with the specified file for this operation."
After doing some digging, I think I need to install the Microsoft Visual Studio Tools for Office Runtime on the client computer. To do this, I would like to use the prerequisites properties for the project. So I read up on creating custom prerequisites using some noteworthy sites (e.g, Creating Bootstrapper Packages, Application Deployment Prerequisites, Adding Custom Prerequisites, and Creating a Bootstrapper package for Office 2013 in Visual Studio 2012). I created the files according to that last URL (even though I'm not sure it pertains to the package I need just yet), but it is not appearing in the dialog box under Project > Properties > Publish > Prerequisites
If you read the article, it says the VS prerequisites dialog box should automatically update once I restart VS 2012, which I did but to no avail. I know I'll need to use this feature again in the future, so I would really like to know what I'm doing wrong and fix this. Please help! And I promise to quickly give the ACCEPT to whoever helps me fix this problem! Thank you in advance.
I didn't have any problems following the directions given in the web page and got the bootstrapper added to the Prerequisites dialog. However, there are plenty of possible ways to get it wrong. Some possibilities:
Triple-check the folder you added these files to. Be sure that you picked Program Files (x86) on a 64-bit version of Windows and not Program Files. And be sure that you now see the added VSTOR40 folder along with the other existing bootstrapper folders, like ReportViewer and VBPowerPacks.
You do not have write permission to this folder, UAC prevents copying files there. Be sure that you managed to copy them from, say, an elevated command prompt. Right-click the Command Prompt shortcut and click "Run as Administrator".
If you created the .xml files with Notepad then make sure you didn't accidentally saved them with the .txt extension. If necessary, put Explorer in "programmer mode" so you can see the filename extensions. Control Panel + Folder Options, View tab, untick the "Hide extensions for known file types" checkbox. If you now see product.xml.txt then rename the file to product.xml, same for package.xml.txt
If you created the .xml files with Notepad then be sure to save the file in UTF-8 encoding. File + Save As, Encoding combobox.
For all those who still may face similar issue I think that I found the cause of this issue. It seems that copying folder with custom bootstrapper package (and all necessary files in it) does not "refreshes" the list of available packages. Only when i went through this walkthrough and manually created folder in %Programfiles%\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\ for sample package from this walkthrough my package has shown