hta

Boot Mode Legacy/UEFI from HTA in WinPE

我是研究僧i 提交于 2019-12-01 13:49:49
Trying to see if I am in UEFI or BIOS from WinPE running from an HTA. My starting point below: <script type='text/vbscript'> Sub RegBOOT If oReg.EnumValues(HKEY_LOCAL_MACHINE, "System\CurrentControlSet\Control", "PEFirmwareType", "") = 1 Then BOOT.innerText = "Legacy BIOS" If oReg.EnumValues(HKEY_LOCAL_MACHINE, "System\CurrentControlSet\Control", "PEFirmwareType", "") = 2 Then BOOT.innerText = "UEFI" End If End Sub </Script> <BODY> <p>You are in <span id="BOOT"></span> mode</p> </BODY> Found the below as my solution that works :) <script type='text/vbscript'> Set objShell = CreateObject(

Boot Mode Legacy/UEFI from HTA in WinPE

不羁的心 提交于 2019-12-01 12:16:26
问题 Trying to see if I am in UEFI or BIOS from WinPE running from an HTA. My starting point below: <script type='text/vbscript'> Sub RegBOOT If oReg.EnumValues(HKEY_LOCAL_MACHINE, "System\CurrentControlSet\Control", "PEFirmwareType", "") = 1 Then BOOT.innerText = "Legacy BIOS" If oReg.EnumValues(HKEY_LOCAL_MACHINE, "System\CurrentControlSet\Control", "PEFirmwareType", "") = 2 Then BOOT.innerText = "UEFI" End If End Sub </Script> <BODY> <p>You are in <span id="BOOT"></span> mode</p> </BODY> 回答1:

HTA VBScript and CSS3+HTML5. Code not running correctly when <meta> for css3 applied

时间秒杀一切 提交于 2019-12-01 11:15:59
I have a problem applying CSS3 and pretty round buttons to my HTA app. As soon as I enable <meta http-equiv="x-ua-compatible" content="ie=9"> tag to turn CSS3 on the code goes straight to hell. Counting doesn't work right and it looks like it operates on a copy of values from arrays arrX . I tested it with msgbox and once clicked it counts right but then goes back to 0 . When I remove meta tag and parenthesis in last two subs sub SaveData() and sub ExitWindow() and remove parenthesis from all onclick script works like charm. Damn CSS3 breakes it. Can you help me out and tell why it doesn't

CreateTextFile not working when hta is set to open as notepad by default (javascripting)

孤人 提交于 2019-12-01 09:22:28
问题 I'm getting this really weird problem when I try to create a text file using javascripting and a hta file. This is the code broken down to its basics: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <script> alert("creating file"); var fso = new ActiveXObject("Scripting

Pass Credentials to WMI Call in VBScript

谁说胖子不能爱 提交于 2019-12-01 04:42:42
I have VBScript inside a HTA getting the ping status from a local WMI call.. I also have a function to get the last reboot time of the remote pc.. Function GetReboot(strComputer) Set objWMIService = GetObject _ ("winmgmts:\\" & strComputer & "\root\cimv2") Set colOperatingSystems = objWMIService.ExecQuery _ ("Select * from Win32_OperatingSystem") For Each objOS in colOperatingSystems dtmBootup = objOS.LastBootUpTime dtmLastBootupTime = WMIDateStringToDate(dtmBootup) dtmSystemUptime = DateDiff("h", dtmLastBootUpTime, Now) Wscript.Echo dtmSystemUptime Next GetReboot = dtmLastbootupTime End

HTA's; use other browser to host?

孤街醉人 提交于 2019-12-01 04:25:51
If Microsoft's method for using IE as a local host for HTA's then, can I use any other browser instead? You can't. There is a similar Mozilla project named XULRunner , but HTA only works in Internet Explorer - the two technologies aren't compatible. To make this clear: HTA will probably not work in anything that's not IE. Yes, HTA is a browser control in a window, but it also has normal aplication privileges (i.e. filesystem access, registry, arbirary code execution etc.). When running in a browser, these privileges are denied (for good reasons - you don't want just any webpage to read your

Security Level for WebBrowser control

对着背影说爱祢 提交于 2019-11-30 20:45:22
I am trying to migrate an .hta application to a C# executable. Of course, since it's an .hta the code is all HTML and Jscript , with calls to local ActiveX objects. I created a C# executable project and am just using the WebBrowser control to display the HTML content. Simply renamed the .hta to an .html and took out the HTA declarations. Everything works great, except that when I make calls to the ActiveX objects, I get a security popup warning of running an ActiveX control on the page. I understand why this is happening since the WebBrowser control is essentially IE and uses the Internet

How do I add coordinates to an SVG polyline?

江枫思渺然 提交于 2019-11-30 15:02:36
How do I add coordinates to an existing SVG polyline with JavaScript? <svg height="240" width="700" id='svg'> <polyline points="0, 240 40, 25 60, 40 80, 120 120, 140 200, 180 500, 120 600, 5" style="fill:none;stroke:#000;stroke-width:3" /> </svg> I am using IE 9 (in a .hta file) and need to be able to dynamically append new points to the polyline. The goal is to be able to create a line graph. I apologize in advance, I have absolutely no idea how to reference this attribute. Any guidance for this would be greatly appreciated. If you add an id attribute to the polyline so that it looks like

hta - Equivalents in Firefox, Chrome - Is this old technology?

*爱你&永不变心* 提交于 2019-11-30 14:52:32
问题 I want to convert a webpage html5/js page to a desktop application. Something they can use on their desktop without a live internet connection. (I do not want to recode my html5 or js.) If the end user has Internet Explorer installed, I can easily port this to an hta file. However, what if they are using Vista or above and have uninstalled Internet Explorer (as you are permitted to do)? What if their main browser is Firefox or Chrome? I was searching around for Firefox, and it seemed Prism

hta - Equivalents in Firefox, Chrome - Is this old technology?

瘦欲@ 提交于 2019-11-30 12:33:42
I want to convert a webpage html5/js page to a desktop application. Something they can use on their desktop without a live internet connection. (I do not want to recode my html5 or js.) If the end user has Internet Explorer installed, I can easily port this to an hta file. However, what if they are using Vista or above and have uninstalled Internet Explorer (as you are permitted to do)? What if their main browser is Firefox or Chrome? I was searching around for Firefox, and it seemed Prism was an alternative to hta files, but if you go to Mozilla's Prism page it says it is a technology that is