BatchHelperメニュー用スクリプト

  【51】 SQLの窓レジストリにエディタを登録.wsf



  
<JOB>
<COMMENT>
************************************************************
 オブジェクト定義
************************************************************
</COMMENT>
<OBJECT id="Lbox" progid="Lbox.BatchHelper" />
<OBJECT id="Fs" progid="Lbox.Fsystem" />
<OBJECT id="Database" progid="Lbox.Database" />
<OBJECT id="Ftp" progid="Lbox.Ftp" />
<OBJECT id="Outer" progid="Lbox.OuterDll" />
<OBJECT id="Prt" progid="Lbox.Prt" />
<OBJECT id="Window" progid="Lbox.Window" />
<OBJECT id="Wnet" progid="Lbox.Wnet" />

<OBJECT id="WshShell" progid="WScript.Shell" />
<OBJECT id="Fso" progid="Scripting.FileSystemObject" />

<SCRIPT language=VBScript>

Path = Lbox.OpenFileName( "エディタを選択", "EXE,*.exe" )
if Path = "" then
	Lbox.MsgOk( "エディタ選択がキャンセルされました   " )
	WScript.Quit
end if

on error resume next
Call WshShell.RegWrite( "HKLM\SOFTWARE\WinOfSql\Editor", Path )
if Err.Number <> 0 then
	Lbox.MsgOk( "レジストリの書き込みに失敗しました   " )
	WScript.Quit
end if
on error goto 0

Lbox.MsgOk( "レジストリにエディタのパスが書き込まれました   " )
</SCRIPT>
</JOB>
  

  【52】 テキストファイル内の文字列検索結果表示用エディタの登録.wsf



  
<JOB>
<COMMENT>
************************************************************
 オブジェクト定義
************************************************************
</COMMENT>
<OBJECT id="Lbox" progid="Lbox.BatchHelper" />
<OBJECT id="Fs" progid="Lbox.Fsystem" />
<OBJECT id="Database" progid="Lbox.Database" />
<OBJECT id="Ftp" progid="Lbox.Ftp" />
<OBJECT id="Outer" progid="Lbox.OuterDll" />
<OBJECT id="Prt" progid="Lbox.Prt" />
<OBJECT id="Window" progid="Lbox.Window" />
<OBJECT id="Wnet" progid="Lbox.Wnet" />

<OBJECT id="WshShell" progid="WScript.Shell" />
<OBJECT id="Fso" progid="Scripting.FileSystemObject" />

<SCRIPT language=VBScript>

on error resume next
EditorPath = WshShell.RegRead("HKLM\SOFTWARE\WinOfSql\Editor")
if Err.Number <> 0 then
	Lbox.MsgOk( "エディタエントリがありません   " )
	WScript.Quit
end if
on error goto 0
if EditorPath = "" then
	Lbox.MsgOk( "エディタエントリがありません   " )
	WScript.Quit
end if

strInstallDir = WshShell.RegRead("HKLM\SOFTWARE\WinOfSql\InstallDir")
strInstallDir = strInstallDir & "\WinOfSql.ini"

EditorPath = Lbox.Enclose( EditorPath, """" )
Value = "0,開く," & EditorPath & " /j=$02 ""$04\$01"",【ファイル名】"
if not Fs.SetInifileString( "UserMenu", "99", Value, strInstallDir ) then
	Lbox.MsgOk( "WinOfSql.ini の書き込みに失敗しました   " )
	WScript.Quit
end if

Lbox.MsgOk( "WinOfSql.ini の書き込みを終了しました   " )
</SCRIPT>
</JOB>
  

  【53】 Quick Launch にデスクトップの表示を作成.wsf

  
<JOB>
<COMMENT>
************************************************************
 オブジェクト定義
************************************************************
</COMMENT>
<OBJECT id="Lbox" progid="Lbox.BatchHelper" />
<OBJECT id="Fs" progid="Lbox.Fsystem" />
<OBJECT id="Database" progid="Lbox.Database" />
<OBJECT id="Ftp" progid="Lbox.Ftp" />
<OBJECT id="Outer" progid="Lbox.OuterDll" />
<OBJECT id="Prt" progid="Lbox.Prt" />
<OBJECT id="Window" progid="Lbox.Window" />
<OBJECT id="Wnet" progid="Lbox.Wnet" />

<OBJECT id="WshShell" progid="WScript.Shell" />
<OBJECT id="Fso" progid="Scripting.FileSystemObject" />

<SCRIPT language=VBScript>

Target = "HKCU\Software\Microsoft\Windows\CurrentVersion"
Target = Target & "\Explorer\Shell Folders\AppData"
on error resume next
Path = WshShell.RegRead(Target)
if Err.Number <> 0 then
	Lbox.MsgOk( "レジストリエントリがありません   " )
	WScript.Quit
end if
on error goto 0
if Path = "" then
	Lbox.MsgOk( "レジストリエントリがありません   " )
	WScript.Quit
end if

Path = Path & "\Microsoft\Internet Explorer\Quick Launch\デスクトップの表示.scf"
Buffer = "[Shell]" & vbCrLf
Buffer = Buffer & "Command=2" & vbCrLf
Buffer = Buffer & "IconFile=explorer.exe,3" & vbCrLf
Buffer = Buffer & "[Taskbar]" & vbCrLf
Buffer = Buffer & "Command=ToggleDesktop" & vbCrLf
if not Fs.PutTextFile( Path, Buffer ) then
	Lbox.MsgOk( "デスクトップの表示.scf の書き込みに失敗しました   " )
	WScript.Quit
end if

Lbox.MsgOk( "デスクトップの表示.scf の書き込みを終了しました   " )
</SCRIPT>
</JOB>
  











   SQLの窓    create:2005/05/22  update:2014/09/07   管理者用(要ログイン)





フリーフォントWEBサービス

SQLの窓WEBサービス

SQLの窓フリーソフト

写真素材

一般WEBツールリンク

SQLの窓

フリーソフト

JSライブラリ