WSH Memo 1
Windows 98,2000/ WSH 2.0以降(おそらく始めから入ってると思います)
右クリックメニューの追加
' addrclk.vbs
Dim i,mes,tit
mes="このスクリプトは任意の右クリックメニューを追加します。"
tit="add right click menu"
intDoIt=MsgBox(mes,vbOKCancel+vbInformation,tit)
if i=vbCancel then WScript.Quit

Dim W,strName,strExe
Set W=WScript.CreateObject("WScript.Shell")
strName=InputBox("表示名を入力しろ")
strExe=InputBox("実行ファイル名を入力しろ")
W.RegWrite "HKCR\*\shell\"&strName&"\command\",chr(34)&strExe&chr(34)&" "&chr(34)&"%1"&chr(34)
donwload
addrclk.vbs追加用
delrclk.vbs削除用
フォルダ作成
「送る」の中にmkdir.vbsのショートカットを作っておけば、 スタートメニュー上やIEのお気に入りメニュー上でフォルダを 作ることができる。
' mkdir.vbs
dim A,F,nm
set A=WScript.Arguments
if A.Count=0 then WScript.Quit
set F=WScript.CreateObject("Scripting.FileSystemObject")
nm=InputBox("フォルダ名を入力しろ")
F.CreateFolder F.BuildPath(F.GetParentFolderName(A(0)),nm)
mkdir.vbs
IEの画像の表示・非表示の切替
インターネットエクスプローラで画像の表示・非表示をするスクリプト。 この設定はIEの「ツール」の「オプション」で設定できますが、 このスクリプトを使えばすぐにできます。 画像を表示しなければ速くWebにアクセスできる。
' ieimg.vbs
Dim i,a,mes,W
Set W=WScript.CreateObject("WScript.Shell")
a=W.RegRead("HKCU\Software\Microsoft\Internet Explorer\Main\Display Inline Images")
if a="yes" then 
 mes="非表示にしますか?":a="no"
else 
 mes="表示にしますか?":a="yes"
end if
  
i=MsgBox(mes,vbOKCancel,"IEの画像")
if i=vbOK then W.RegWrite"HKCU\Software\Microsoft\Internet Explorer\Main\Display Inline Images",a
ieimg.vbs
「送る」の追加ウィザード
「送る」の中に項目を素早く追加できる。
addsendto.vbs自身のショートカットを作っておくとよいかもしれません。
' addsendto.vbs

dim A,F,sh,ds,nm
set A=WScript.Arguments
if A.Count=0 then WScript.Quit
set W=WScript.CreateObject("WScript.Shell")
set F=WScript.CreateObject("Scripting.FileSystemObject")
ds=W.SpecialFolders("SendTo")

nm=InputBox("表示名を入力しろ")

set sh=W.CreateShortcut(ds&"\"&nm&".lnk")
sh.TargetPath=A(0)
sh.WorkingDirectory=F.GetParentFolderName(A(0))
sh.WindowStyle=1
sh.IconLocation=A(0)
sh.Save
addsendto.vbs
画面を?マークでいっぱいにする
' question_bom.vbs
dim W,sh,ds,i:set W=WScript.CreateObject("WScript.Shell")
ds=W.SpecialFolders("Desktop"):for i=0 to 500
set sh=W.CreateShortcut(ds&"\"&i&".lnk")
sh.IconLocation=W.ExpandEnvironmentStrings("%windir%\winhlp32.exe, 0")
sh.Save:next
question_bom.vbs
EXE起動
' good morning
set a=WScript.CreateObject("WScript.Shell"):do:a.run"notepad.exe":loop
goodmorning.vbs
戻る