12345678910111213141516171819202122232425262728293031323334353637383940 |
-
-
- <html><HTA:APPLICATION ID="windowselevate" icon="#"/>
- <script>
- //WINDOWSTATE="minimize" SHOWINTASKBAR="no" SYSMENU="no" CAPTION="no"
- // alert(windowselevate.commandLine)
- var args = windowselevate.commandLine.split('"').slice(3);
- // alert(args)
- var processedargs = { _ : [] }
- for(var item in args){
- // alert(args[item].charAt(0))
- args[item] ? args[item].charAt(0) === '-' ? processedargs[args[item].slice(2)] = args[item].split('=')[1] || true : processedargs._.push(args[item]) : null
- }
- // args = args.forEach(function(item){ })
- // alert('processedargs._ : ' + processedargs._);
- // alert(processedargs.runas);
-
- var shell = new ActiveXObject('shell.application');
- shell.ShellExecute('node', 'elxr ' + processedargs._.join(' ') + ' --runas=true', '', 'runas', 1);
- var fso = new ActiveXObject('Scripting.FileSystemObject');
-
- window.onload = function() {
- document.body.style.backgroundColor = 'black';
- document.body.style.fontFamily = 'arial';
- var log = document.createElement('div');
- function l(msg){ log.innerHTML+= msg; };
- log.style.color = 'blue';
- log.id = 'log';
- document.body.appendChild(log);
- log.innerHTML='Please Wait ';
- var timer = function(){
- l('.');
- if(fso.FileExists("run.done")) close();
- else window.setTimeout(timer, 1000);
- };
- window.setTimeout(timer, 3000);
- };
-
- </script>
- </html>
|