How can I edit command-line args in shortcuts generated by InstallShield? - command-line-arguments

Sometimes when an installer installs a program, and creates shortcuts, for some reason they aren't "normal" shortcuts. They have the Target textbox and Open File Location button greyed out, like such:
I'm using InstallShield 2011 LE (Limited Edition) for Visual Studio 2010. It works as advertised, but I don't see any options to change the way it creates shortcuts. The program I'm installing would greatly benefit from adding command line arguments to that Target textbox. If I go find the executable in Program Files, and Send To -> Desktop (create shortcut), I (and my users) can modify that one, no problem. I don't want to have to make them go through this step, though.
How are shortcuts placed by an installer different from "normal" shortcuts?

In InstallShield, set the Advertise property to "no".

Related

Visual Studio files association in Windows

In Windows Explorer when I double-click on any Visual Studio file (*.cs, *.csproj, etc.), it's opening an old version of VS instead of the latest one (VS 2017). And VS has associations with too many file types.
How can I change the default Visual Studio (for all those files that VS can handle)?
There is a similar old question about Visual Studio 2008 (Move file associations from Visual Studio 2005 to 2008) but the solution in there doesn't work anymore (there is no "Restore File Associations" button on the settings of Visual Studio 2017).
Each version of Visual Studio registers itself in the Set Default Programs panel of the Control Panel.
Go to Control Panel\Programs\Default Programs
Then choose Set Default Programs:
In there you can simply choose the Visual studio version of your choice and then click the button Set this program as default in order to associate every file type that VS handles.
Or you might prefer to click the button Choose defaults for this program to review the current associations of those file types and change only the ones you want.
Yet another in a long list of previously working-just-fine things which Microsoft have managed totally #$#%# up. If I try to change defaults the 'right' way I get this kind of thing:
i.e. completely ignored. The only way I've managed to solve it is by removing the file association entirely through the registry. Let's take .asm as an example:
Open Registry Editor / "regedit.exe"
Navigate to HKEY_CLASSES_ROOT\.asm\OpenWithProgIds
Delete any Visual Studio values you see
From there, you can (finally) open files with whatever you choose instead of having the association clamped to Visual Studio:
For the record, I believe this to be a problem with Windows 10. Not with Visual Studio. See: https://answers.microsoft.com/en-us/windows/forum/windows_10-files/cant-change-default-programs-in-windows-10/229fc3a9-25c9-433b-a333-5806bc5090db
On the file you will always open with vs17, click right and choose open with and there choose another app. On win10 it pop out a dialog with some proposals. If vs17 is there, choose your favorite and activate the always open with. then ok and your done.

how fully remove Visual Studio

Please tell me how to fully remove Visual Studio with all components and also remove registry(Any batch file or any Command which runs from Command prompt)
Go to Programs and Features (in Control Panel)
click on 'Microsoft Visual Studio {your distribution e.g. Pro/Ent etc} 20XX'
click on Change
click Uninstall
Do the same for all other existing Microsoft Visual Studio components in that list.
EDIT:
based on your comment below, I'd suggest you to use Windows 7 Manager or Windows 10 Manager based on your OS, its quite handy and fast, it even cleans registry as well. I've personally had good experience with it.

Viewing binary files in MSVS under Windows 10

For ages I've been using MS visual studio 15 to view binary files, simply by doing file|open. My files have a custom extension, 'SQ3', but VS seemed to happily infer that they aren't text, and display them as binary. However, Win10 seems to have stopped that. Now if I do the same thing, a popup appears, asking me whether I want to find an application from the shop, or always use this application (presumably MSVS, the one I'm invoking from). There's a proceed button, but it doesn't respond. There seems to be no way that I can get VS to open and display the file.
Is there a way to stop the OS intervening so VS can do its thing?
Incidentally, having to rename files would be extremely inconvenient in this situation. TIA
Thanks, that's perfect.
In Visual Studio go to Tools/Options/Text Editor/File Extensions.
Add new entry to the list:
Extension: sq3
Editor: Binary Editor
Click Add and then OK to close the dialog. Files with .sq3 extension will now open with the hex editor when opening them or dragging them to Visual Studio.

Visual Studio Installer how to prompt for install of shortcuts

I am using the basic VS project of Other Project Types\Setup and Deployment\Visual Studio Installer\ Setup Project.
I want to give the user the option of whether or not to create a desktop shortcut to the application. I know how to create a desktop shortcut, but not to make it optional. So far I have not made any custom dialogs for the install, just using the standard interface that VS provided automatically.
Is there any way to provide the user the choice without getting into a whole bunch of customization?
Are many people using this installer? I look around, we have a 5 year old license to InstallShield, but I have also found it to be bulky and more than we need for this application.
I also looked at WiX, but I don't have the time to learn an install package right now and it looks like a fair learning curve on it.
Basically our install has .NET 4.0 requirements, installs SQL Server CE, a couple other DLL's which are just copied in and populates a structure. I am not using the registry, using the preferred resources approach for that, so it is a very straightforward install.
There several ways to do it, in general… But I don't know the particular steps for Visual Studio installer project.
Create a feature which contains the Desktop shortcut. If you have feature selection tree in your installer, present this feature as yet anther option.
With another approach, you'll have to customize one of the existing dialogs or add a new one where you can show a checkbox. The checkbox changes the value of a property which, in its turn, controls the installation of component or feature for Desktop shortcut.
Yet I guess this method is not supported by Visual Studio.
See Microsoft UX guidelines on putting shortcuts on Desktop.
In most cases, it is not necessary to put a shortcut on Desktop unless your target users start your application very often.
The general approach is this:
create a custom dialog which contains a control that can condition the shortcut, for example a checkbox
create a custom action which deletes the shortcut after install
condition it with the checkbox property
This can be done in Visual Studio:
select your setup project in Solution Explorer
click User Interface Editor button on top pane in Solution Explorer
add a Checkboxes dialog under Install -> Start
customize it to contain only a checkbox that conditions your shortcut
add your shortcut deletion custom action in Custom Actions Editor page
condition it with the checkbox property
Some commercial setup authoring tools have this feature built-in.

Shortcuts created by Setup project in Visual Studio

I was working with a legacy project and need help with some shortcuts created, the problem is that those shortcuts appear to be non-standard because when you right click on them and in the target location only shows the name of the program grayed out.
I have seen those shortcuts before and had no problems. The current problem is that when running on Windows XP you can the icon and get the run as different user, but in windows 7 that functionality is limited apparently only to the shortcuts that point explicitly to an "exe" file.
The final users need that functionality due to some policies and the current work around is to them create the shortcut manually. I need a way to create a standard shortcut via the setup project.
Thanks in advance

Resources