git.cmd on window

updated cmd\git.cmd as follows

@rem [START] add git_install_root
@rem for /F "delims=" %%I in ("%~dp0..") do @set git_install_root=%%~fI
@set git_install_root=C:\git\bin
@set HOME=C:\git\my_git_home
@rem [END] add git_install_root

added git.bat to a dir already in the path

C:\bin>cat git.bat
@C:\git\bin\cmd\git.cmd %*

now we can use git from anywhere

Advertisements

IShellLink

why can’t we copy path of target from .lnk shortcut. I tried with following script doesnt work. If we look at the shortcut properties it shows the path just wont let copy it.

CreateShortcut Method

var WshShell = new ActiveXObject("WScript.Shell");
strDesktop = WshShell.SpecialFolders("Desktop");
var oShellLink = WshShell.CreateShortcut("C:\Documents and Settings\user1\Desktop\to haven.lnk");
WScript.Echo(oShellLink.TargetPath);
WScript.Echo(oShellLink.Description);

sysinternals strings came to rescue.

C:\> strings "C:\Documents and Settings\user1\Desktop\to haven.lnk"

prints the target path.

Shell Links