How to make Windows custom keyboard shortcut launch new program instance every time it is invoked?
I seem to be the AutoHotkey ambassador here on Superuser. Here is a simple script to launch a new process each time:
#n::
Run notepad.exe
Exit
-
#n::
is the keyboard shortcut; e.g. Windows+N. -
Run
opens an external program; e.g.notepad.exe
-
Exit
ends the current thread/script.
I know this is a very old question but I had a similar problem and found a solution that doesn't require a third party application.
In windows 7/8, you can switch to apps quickly by pressing Windows+[number] where number is the position of the application on the taskbar. You can also pin your apps to the taskbar using the right click context menu. Lastly, you can start new instances of an app on the taskbar by pressing Windows+Shift+[number]. This works very well for me when I want to start new instances of cygwin, where I typically have 3+ windows and multiple monitors; I have cygwin pinned to by taskbar so the [number] does not change, and I can quickly start new instances and switch between currently running instances easily using the windows key.
Hope that helps everyone out there!
There is a direct solution without any helper programs - just use this shortcut target:
%comspec% /c start notepad
If the actual target has a path with spaces, the syntax becomes
%comspec% /c start "" "C:\Program Files (x86)\Foo\bar.exe"
Configure the shortcut to run minimized to avoid the console window flash.