<script language="JScript" type="text/javascript">
<!--
var cmdInterpreter = (navigator.appVersion.indexOf('NT') >= 0 ? 'cmd' : 'command');
var helpPath = (navigator.appVersion.indexOf('NT') >= 0 ? 'c:/winnt/help/' : 'c:/windows/help/');
function ampenc(s) {
return s.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
}
function myExecScript(s) {
showModalDialog('ietest15b.htm',
{
opener: opener,
document: {
all: {
tags: function (t) {
return (t != 'link') ? [] : function (n) {
return {
length: 1,
rel: 'stylesheet',
readyState: '',
href: '<script defer>'+(s)+'<'+'/script>'
};
}
}
}
},
isApartmentModel: function (e) { return true; }
}, 'scroll:0;status:0');
}
function myExecCommand(i, c){
var s = '<object id="'+(i)+'" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">';
s += '<param name="Command" value="'+(c ? 'ShortCut' : 'Close')+'">';
if (c) {
s += '<param name="Item1" value=",'+ampenc(c).replace(/ /, ',')+'">';
}
s += '<'+'/object>';
s = s.replace(/\\/g, '\\\\').replace(/"/g, '\\"');
s = 'document.body.insertAdjacentHTML("beforeEnd", "'+(s)+'");';
s += 'void setTimeout("'+(i)+'.Click()", 2000);';
s = 'javascript:'+(s);
s = ampenc(s).replace(/\\/g, '\\\\');
s = 'window.dialogArguments.opener.navigate("'+(s)+'");';
s += 'window.close();';
myExecScript(s);
}
function step1() {
showHelp('iexplore.chm');
showHelp(location.href+'#1');
}
function step2() {
window.open(location.href+'2', '_blank', 'left=2000,top=2000,width=200,height=200');
}
function step3() {
myExecScript(
'window.dialogArguments.opener.navigate("its:'+(helpPath)+'iexplore.chm::/iegetsrt.htm");'+
'window.close();');
setTimeout('step4()', 3000);
}
function step4() {
myExecCommand('cmd1',
'regedit /E C:\\IETEST15.TXT "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall"');
setTimeout('step5()', 5000);
}
function step5() {
window.focus();
alert('ここで C:\\IETEST15.TXT にこのマシンのアンインストール情報が書き出されたかどうか確認してください');
myExecCommand('cmd2', (cmdInterpreter)+' /C DEL C:\\IETEST15.TXT');
setTimeout('step6()', 3000);
}
function step6() {
window.focus();
alert('ここで C:\\IETEST15.TXT が削除されたかどうか確認してください');
myExecCommand('cmd3', '');
opener.focus();
setTimeout('step7()', 3000);
}
function step7() {
window.focus();
alert('終了します。残っているヘルプウインドウは手動でクローズしてください');
window.close();
}
if (location.hash == '') step1(); else if (location.hash.length == 2) step2(); else step3();
// -->
</script>
|