From 8f75b5222b2c72c8e1a0f7301240599be74205c1 Mon Sep 17 00:00:00 2001 From: Gore Liu Date: Thu, 28 Apr 2016 16:40:13 +0800 Subject: [PATCH] Fix UpdateSendTo --- RunZ.ahk | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/RunZ.ahk b/RunZ.ahk index e928aee..fce6878 100644 --- a/RunZ.ahk +++ b/RunZ.ahk @@ -1774,29 +1774,8 @@ UpdateSendTo(create = true, overwrite = false) return } - ; 注意引号和空格! - fileContent := "var RunZCmdTool = ""\""" - fileContent .= StrReplace(A_ScriptDir, "\", "\\") "\\RunZ.exe\"" " - fileContent .= " \""" . StrReplace(A_ScriptDir, "\", "\\") . "\\Core\\RunZCmdTool.ahk\"" ""`n" - - jsText = -( -var ws = new ActiveXObject("WScript.Shell") - -var arg = "" -for (var i = 0; i < WScript.Arguments.Count(); i++) -{ - arg += " \"" + WScript.Arguments(i) + "\" " -} - -ws.Run(RunZCmdTool + arg) -) - fileContent .= jsText - - FileDelete, % A_ScriptDir "\Core\SendToRunZ.js" - FileAppend, % fileContent, % A_ScriptDir "\Core\SendToRunZ.js", CP936 - FileCreateShortcut, % A_ScriptDir "\Core\SendToRunZ.js", % A_ScriptDir "\Core\SendToRunZ.lnk" - , , , 发送到 RunZ, % A_ScriptDir "\RunZ.ico" + FileCreateShortcut, % A_ScriptDir "\RunZ.exe", % A_ScriptDir "\Core\SendToRunZ.lnk" + , , "%A_ScriptDir%\Core\RunZCmdTool.ahk", 发送到 RunZ, % A_ScriptDir "\RunZ.ico" FileCopy, % A_ScriptDir "\Core\SendToRunZ.lnk" , % StrReplace(A_StartMenu, "\Start Menu", "\SendTo\") "RunZ.lnk", 1 }