How do I create a shortcut via command-line in Windows?

You could use a PowerShell command. Stick this in your batch script and it’ll create a shortcut to %~f0 in %userprofile%\Start Menu\Programs\Startup: powershell “$s=(New-Object -COM WScript.Shell).CreateShortcut(‘%userprofile%\Start Menu\Programs\Startup\%~n0.lnk’);$s.TargetPath=”%~f0″;$s.Save()” If you prefer not to use PowerShell, you could use mklink to make a symbolic link. Syntax: mklink saveShortcutAs targetOfShortcut See mklink /? in a console window for … Read more

Close all tabs, but not the window, in Sublime Text

Thanks to Alex, it turned out kind of simple, Preferences > Key Bindings > User: { “keys”: [“super+shift+w”], “command”: “close_all” } No need to restart Sublime, it works right away. And what’s even better, no need to get used new shortcuts, you can still close Sublime window with Cmd-W after all tabs are gone.

Create shortcut to desktop using WiX

The shortcut is a non-advertised one. Remember to put the component in your feature tag. <Directory Id=”TARGETDIR” Name=”SourceDir”> <Directory Id=”DesktopFolder” Name=”Desktop”> <Component Id=”ApplicationShortcutDesktop” Guid=”*”> <Shortcut Id=”ApplicationDesktopShortcut” Name=”Text under your icon” Description=”Comment field in your shortcut” Target=”[MYAPPDIRPROPERTY]MyApp.exe” WorkingDirectory=”MYAPPDIRPROPERTY”/> <RemoveFolder Id=”DesktopFolder” On=”uninstall”/> <RegistryValue Root=”HKCU” Key=”Software\MyCompany\MyApplicationName” Name=”installed” Type=”integer” Value=”1″ KeyPath=”yes”/> </Component> </Directory> <Directory Id=”ProgramFilesFolder” Name=”PFiles”> <Directory Id=”MyCompany” Name=”MyCompany”> … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)