Can I set an environment variable for an application using a shortcut in Windows?

As explained here: http://www.labs64.com/blog/2012/06/set-environment-variables-in-windows-shortcut/ you can do it without a bat file too. Set Target to e.g.: C:\Windows\System32\cmd.exe /c “SET path=%path%&& START /D ^”C:\Program Files (x86)\Notepad++^” notepad++.exe” To avoid see the command prompt for a split second before it close again, you should set Run: Minimized on the Shortcut tab (Tested on Windows 7, Windows … Read more

How to programmatically create a shortcut using Win32

Try Windows Shell Links. This page also contains a C++ example. Descriptive Snippet: Using Shell Links This section contains examples that demonstrate how to create and resolve shortcuts from within a Win32-based application. This section assumes you are familiar with Win32, C++, and OLE COM programming. EDIT: Adding the code sample in case the link … Read more

Editing shortcut (.lnk) properties with Powershell

Copy-Item $sourcepath $destination ## Get the lnk we want to use as a template $shell = New-Object -COM WScript.Shell $shortcut = $shell.CreateShortcut($destination) ## Open the lnk $shortcut.TargetPath = “C:\path\to\new\exe.exe” ## Make changes $shortcut.Description = “Our new link” ## This is the “Comment” field $shortcut.Save() ## Save Found the VB version of the code here: http://www.tutorialized.com/view/tutorial/Extract-the-target-file-from-a-shortcut-file-.lnk/18349

Customizable Shortcuts in Java Application

Shortcuts may be specified as accelerators in instances of Action. Less flexibly, shortcuts may be represented by KeyEvent instances obtained via KeyListener. Either may be stored in java.util.Preferences or javax.jnlp.BasicService, as suggested here. I’m unaware of a general purpose library, but this game offers an RCKeys dialog to remap keys. It includes the essential functionality … Read more

Trying to UNINSTALL_SHORTCUT but shortcut won’t go away

DEPRECATED; KEPT SOLELY FOR HISTORICAL PURPOSES This answer was posted in 2014, when the described method relied on functionality that existed in most Android devices. However, as mentioned by Adrian-Costin Țundrea, this functionality was removed a couple of years ago from Launcher3, which is the AOSP launcher upon which the Google Now Launcher is based1. … Read more

tech