3 ' ------------------------------------------------------------
6 ' Autor: Oliver Maurhart, <oliver.maurhart@ait.ac.at>
8 ' Copyright (C) 2013 AIT Austrian Institute of Technology
9 ' AIT Austrian Institute of Technology GmbH
10 ' Donau-City-Strasse 1 | 1220 Vienna | Austria
11 ' http://www.ait.ac.at
12 ' ------------------------------------------------------------
14 ' ------------------------------------------------------------
15 ' This starts a cygwin shell within a relocatable cygwin
16 ' folder but without a DOS shell window prior. The idea is
17 ' to do it like in this BAT snippet below:
20 ' SET INSTALL_DRIVE=%~d0
21 ' SET INSTALL_FOLDER=%~p0
22 ' SET CYGWIN_BIN="%INSTALL_DRIVE%%INSTALL_FOLDER%bin"
23 ' SET CYGWIN_BASH="%INSTALL_DRIVE%%INSTALL_FOLDER%bin\bash"
25 ' chdir "%CYGWIN_BIN%"
26 ' start mintty.exe %CYGWIN_BASH% --login -i
28 ' ------------------------------------------------------------
30 ' setup the basic objects
33 Set cShell = CreateObject("WScript.Shell")
34 Set cFSO = CreateObject("Scripting.FileSystemObject")
36 ' parse script location and cd into folder
38 sPath = Wscript.ScriptFullName
39 sPath = cFSO.GetAbsolutePathName(sPath)
40 sPath = cFSO.GetParentFolderName(sPath)
41 cShell.CurrentDirectory = sPath
43 ' locations of mintty and bash
46 sMinTTYPath = """" & sPath & "\bin\mintty" & """"
47 sBashPath = """" & sPath & "\bin\bash" & """"
49 ' start a cygwin shell
50 cShell.Run sMinTTYPath & " " & sBashPath & " --login -i", 1, false