' forceluna.vbs 1.2 ' ' 1.0 initial release ' 1.1 multiple files process at a time. ' shortcuts can be use. ' 1.2 add japanese message. ' '(C) Windows.FAQ 2001-2002 ' http://winfaq.jp/ Set wshell = WScript.CreateObject("Wscript.Shell") Set wsharg = WScript.Arguments Set WshEnv = Wshell.Environment("Process") if left(WshEnv("LANG"),5) = "ja_JP" then msgUsage = "従来のアプリケーションに Luna スタイルを適用します。" + vbcrlf + vbcrlf + _ "使用方法:" + vbcrlf + "実行ファイルもしくはショートカットを、このアイコンにドラッグ&ドロップします。" + vbcrlf + _ "詳しくは http://winfaq.jp/ をご覧ください。" msgEnd = " 個のプログラムを処理しました。" else msgUsage = "This script apply luna-style for old applications." + vbcrlf + vbcrlf + _ "USAGE:" + vbcrlf + "Drag and drop exe file(s) or shortcut on this script icon." + vbcrlf + _ "Please visit http://winfaq.jp/ for more information." msgEnd = " application(s) has processed." end if if wsharg.count = 0 then wscript.echo msgUsage else Set fso = WScript.CreateObject("Scripting.FileSystemObject") manifest = _ ""+vbcrlf+ _ ""+vbcrlf+" "+vbcrlf+" "+vbcrlf+" "+vbcrlf+" "+vbcrlf+" "+vbcrlf+" "+vbcrlf+"" i = 0 For Each arg in wsharg if lcase(right(arg,4)) = ".exe" then Set fileo = fso.CreateTextFile(arg&".manifest",True) fileo.write(manifest) fileo.close i = i + 1 elseif lcase(right(arg,4)) = ".lnk" then Set lnko = Wshell.CreateShortcut(arg) if lcase(right(lnko.TargetPath,4)) = ".exe" then Set fileo = fso.CreateTextFile(lnko.TargetPath&".manifest",True) fileo.write(manifest) fileo.close i = i + 1 end if end if Next wscript.echo CStr(i) & msgEnd end if