This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package kernel32ini | |
import ( | |
"syscall" | |
"unsafe" | |
) | |
var kernel32 = syscall.NewLazyDLL("kernel32") | |
var getPrivateProfileString = kernel32.NewProc("GetPrivateProfileStringW") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ go run hoge.go | |
# command-line-arguments | |
.\hoge.go:7: initialization loop: | |
C:\Users\…\GoSrc\tmp\hoge.go:7 funcList refers to | |
C:\Users\…\GoSrc\tmp\hoge.go:9 listing refers to | |
C:\Users\…\GoSrc\tmp\hoge.go:7 funcList |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if( WScript.Arguments.length <= 0 ){ | |
var shellApp = new ActiveXObject("Shell.Application"); | |
shellApp.ShellExecute( "wscript.exe","\"" + WScript.ScriptFullName + "\" uac" , "" , "runas"); | |
shellApp = null; | |
WScript.Quit(); | |
} | |
var wshShell=new ActiveXObject("WScript.Shell"); | |
var objFSO = new ActiveXObject("Scripting.FileSystemObject"); | |
var sysEnv=wshShell.Environment; | |
var path = sysEnv.Item("PATH"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@if (0) == (0) echo off | |
cscript //nologo /E:JScript "%~f0" Sendto %* | |
exit /b 0 | |
@end | |
var objShell = new ActiveXObject("WScript.Shell"); | |
var sendto = objShell.SpecialFolders(WScript.Arguments.Item(0)) | |
if( WScript.Arguments.length <= 1 ){ | |
var shellApp=new ActiveXObject("Shell.Application"); | |
shellApp.ShellExecute(sendto,"","","open"); | |
WScript.Quit(0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal | |
if "%3" == "" ( | |
set "STEP=1" | |
) else ( | |
set "STEP=%3" | |
) | |
if "%2" == "" ( | |
set "START=1" | |
set "END=%1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@if (0) == (0) echo off | |
cscript //nologo //E:JScript "%~f0" %* | |
exit /b 0 | |
@end | |
var program = "CMD.EXE"; | |
var argv=""; | |
var args = WScript.Arguments; | |
if( args.length >= 1 ){ | |
program = args.Item(0); | |
if(args.length >= 2 ){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
::rem:: --[[ vim:set ft=lua: | |
@lua "%~f0" %* & exit /b 0 | |
]]-- | |
-- requires Lua 5.3 | |
if #arg < 1 then | |
print( string.format( [[Usage: %s "SCRIPT" files... | |
S[n] = $n on AWK | |
NR = NR on AWK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
for %%I in (git.exe) do set "PERL=%%~dp$PATH:I..\bin\perl.exe" | |
"%PERL%" %* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
::rem:: --[[ vim:set ft=lua: | |
@nyagos -f "%~f0" %* & exit /b 0 | |
]]-- | |
-- requires Lua 5.3 | |
if #arg < 1 then | |
print( string.format( [[Usage: %s "SCRIPT" files... | |
S[n] = $n on AWK | |
NR = NR on AWK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var shellApp = new ActiveXObject("Shell.Application"); | |
var trashBox = shellApp.NameSpace(10); | |
var fsObj = new ActiveXObject("Scripting.FileSystemObject"); | |
for(var i=0 ; i <WScript.Arguments.length ; i++ ){ | |
var arg1 = WScript.Arguments(i); | |
var path1 = fsObj.GetAbsolutePathName(arg1); | |
trashBox.MoveHere(path1); | |
} |