- バッチファイルで、モニターの電源を切る。
@if(0)==(0) echo off cscript.exe //nologo //e:jscript %~f0 goto :eof @end new activexobject( excel.application ).executeexcel4macro('call( user32 , sendmessagea , jjjjj ,-1,274,61808,2)');
- 関連付けでフォルダの詳細表示相当を保存印刷する。
[hkey_classes_root。。directory。。background。。shell。。dir。。command] @= c:。。。。windows。。。。system32。。。。windowspowershell。。。。v1.0。。。。powershell.exe 。。 $outputencoding=[text.encoding]::getencoding('shift_jis');dir '%v'|convertto-html -property mode,name,length,lastwritetime,attributes|cmd.exe /c start /b mshta.exe 'about: script defer document.write(new activexobject(。。 。。 。。 scripting.filesystemobject。。 。。 。。 ).getstandardstream(0).readall()); /script '。。
- バッチファイルから「ファイルを開く」ダイアログを使う。
@echo off set file=c:。。program files。。*.txt set filter=テキスト (*.txt)|*.txt|すべてのファイル (*.*)|*.*| set title=ファイルの選択 for /f delims= %%i in ('mshta.exe about: object id=htmldlghelper classid=clsid:3050f4e1-98b5-11cf-bb82-00aa00bdce0b /object script resizeto(0,0);function window.onload(){var env=new activexobject('wscript.shell').environment('process');new activexobject('scripting.filesystemobject').getstandardstream(1).write(htmldlghelper.object.openfiledlg(env('file'),null,env('filter'),env('title')).replace(/。。0.*/,''));close();} /script hta:application caption=no showintaskbar=no / ') do echo %%i
|