ソース掲示板




すべてから検索

キーワード   条件 表示 現行ログ 過去ログ トピックス 名前 本文
エクスプローラのディレクトリで右クリックした時のメニューにディレクトリを開くコマンドを追加 ( No.1 )
日時: 2018/01/28 01:18
名前: lightbox



主にスタートメニューから右クリックで使用します

http://winofsql.jp/wsf/registOpenDir.wsf

拡張子:
<JOB>
<COMMENT>
************************************************************
 WEB WSH 実行スケルトン
************************************************************
</COMMENT>

<COMMENT>
************************************************************
 外部スクリプト定義
************************************************************
</COMMENT>
<SCRIPT
	language="VBScript"
	src="http://lightbox.in.coocan.jp/laylaClass.vbs">
</SCRIPT>

<SCRIPT language=VBScript>
' ***********************************************************
' 処理開始
' ***********************************************************
Call laylaFunctionTarget( "http://lightbox.in.coocan.jp/" )
Call laylaLoadFunction( "baseFunction.vbs" )
Call laylaLoadFunction( "wmiReg.vbs" )

' ***********************************************************
' Cscript.exe で強制実行
' ***********************************************************
Crun

' **********************************************************
' タイトル入力
' **********************************************************
strTitle = InputBox( "タイトルを入力して下さい" , "WEB WSH", "ユーザーディレクトリ" )
if Trim( strTitle ) = "" then
	Wscript.Quit
end if

' **********************************************************
' 対象ディレクトリ
' **********************************************************
target = SelectDir( "対象フォルダを選択して下さい" )
if target = "" then
	Wscript.Quit
end if

' **********************************************************
' レジストリ
' **********************************************************
strPath = "Directory\shell\opendir\command"
Call WMIRegCreateKey( HKEY_CLASSES_ROOT, strPath )
strValue = "explorer.exe /e," & Dd( target )
Call WMIRegSetStringValue( HKEY_CLASSES_ROOT, strPath, Empty, strValue )
strPath = "Directory\shell\opendir"
Call WMIRegSetStringValue( HKEY_CLASSES_ROOT, strPath, Empty, strTitle )


</SCRIPT>
</JOB>