-
-
Save stuncloud/1efa66a8fdba6e51f976 to your computer and use it in GitHub Desktop.
uwsファイルをuwsc.exeに関連付ける
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
// https://gist.github.com/stuncloud/9660072 | |
call Module_UAC.uws | |
UAC.Elevate() | |
uwsc_path = GET_UWSC_DIR + "\UWSC.exe" | |
if msgbox(uwsc_path + "<#CR>に.uwsファイルを関連付けますか?", BTN_YES or BTN_NO) = BTN_YES then | |
PathQuoteSpacesA(uwsc_path) | |
with CreateOleObj("WScript.Shell") | |
.RegWrite("HKCR\.uws\", "UWSC") | |
.RegWrite("HKCR\UWSC\EditFlags", $0, "REG_DWORD") | |
.RegWrite("HKCR\UWSC\BrowserFlags", $8, "REG_DWORD") | |
.RegWrite("HKCR\UWSC\shell\", "open") | |
.RegWrite("HKCR\UWSC\shell\open\command\", uwsc_path + " <#DBL>%1<#DBL> %*") | |
if GET_UWSC_PRO then | |
// Pro版はデバッガも関連付ける | |
udebug_path = GET_UWSC_DIR + "\UDebug.exe" | |
PathQuoteSpacesA(udebug_path) | |
.RegWrite("HKCR\UWSC\shell\debug\command\", udebug_path + " <#DBL>%1<#DBL>") | |
endif | |
endwith | |
endif | |
// 必要であればダブルクォートで括る | |
def_dll PathQuoteSpacesA(var String):BOOL:ShlwApi.DLL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment