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

Reading the target of a .lnk file in Python?

Create a shortcut using Python (via WSH) import sys import win32com.client shell = win32com.client.Dispatch(“WScript.Shell”) shortcut = shell.CreateShortCut(“t:\\test.lnk”) shortcut.Targetpath = “t:\\ftemp” shortcut.save() Read the Target of a Shortcut using Python (via WSH) import sys import win32com.client shell = win32com.client.Dispatch(“WScript.Shell”) shortcut = shell.CreateShortCut(“t:\\test.lnk”) print(shortcut.Targetpath)

How to clear console in sublime text editor

I assume you’re talking about the console accessible via View -> Show Console or Ctrl`. Unlike other answers on SO, which deal with clearing the Python console when opened from the command prompt, os.system(“cls”) or os.system(“clear”) (depending on your OS) don’t work with the Sublime console. The Sublime API (version 2 or version 3) does … Read more

Visual Studio Key Strokes: Swapping lines

VS 2013 and later: Alt + ↑ (Edit.MoveSelectedLinesUp) Alt + ↓ (Edit.MoveSelectedLinesDown) VS 2012: Shift+Alt+ T (Edit.LineTranspose) but this only swaps between the current and the next line (move down only). VS 2012 does not support macros but there is the Productivity Power Tools 2012 extension that adds (besides some other nice features) commands to … Read more

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