hta

hta/ javascript How to execute an application with relative path

拥有回忆 提交于 2020-02-25 03:37:01
问题 I'm building a .hta (with javascript) from which i want to launch several applications. But when i execute my .hta i get the error message can't find file this is the code: <script type="text/javascript" language="javascript"> function RunFile(path) { var relpath = window.location.href; var fullpath = relpath + path; WshShell = new ActiveXObject("WScript.Shell"); WshShell.Run(fullpath, 1, false); } RunFile("\file.exe"); </script> 回答1: window.location.href includes filename and protocol too.

Display the current date and time using HTML and Javascript with scrollable effects in hta application

孤者浪人 提交于 2020-02-03 04:45:24
问题 I have the below java-script to display the current date in the given format Mon Jun 2 17:54:28 UTC+0530 2014 in a hta(html application), now I want to make this appear in a way like Welcome the current date of my system: Mon Jun 2 17:54:28 UTC+0530 2014 and this text should be a having scrollable affects for eg: one moving from right to left. I tried to use the below tag to get a scrollable text but how can I call this java-script variable in the <marquee> tag so that I get the today's date

How to get an HTA application to accept command line arguments?

我的梦境 提交于 2020-02-02 05:02:45
问题 Sub Window_onLoad arrCommands = Split(ITTool.commandLine, chr(34)) For i = 3 to (Ubound(arrCommands) - 1) Step 2 MsgBox arrCommands(i) Next End Sub When I run my HTA application, I get: arrCommands is undefined I am trying to make an HTA app that accepts command line arguments (optional). 回答1: Your script section contains an Option Explicit statement. That makes defining variables before you can use them mandatory. Add a line Dim arrCommands, i to your procedure: Sub Window_onLoad Dim

Executing an HTA Application via PSEXEC with command line arguments

僤鯓⒐⒋嵵緔 提交于 2020-02-01 09:22:12
问题 I have an .hta application that accepts two command line arguments. Executing the application on the remote machine via command line works just like the following (command line - cmd)Example: C:\Users\<user>\Desktop>MSI-BUILDER.hta "MSI_APP" "D:\APP\15.9.98" But when using my desktop trying to execute the same command on the remote machine via PSEXEC I see the application running in task manager but nothing happens. The first steps were assigning the command line arguments to variables in

display Image with no border before starting an app,exe file?

喜你入骨 提交于 2020-01-24 20:30:08
问题 ok so some tools , some converting tools, give the ability to display an image before starting the converted application, and after done ! that is something very interesting i definitely want to know about, so the question is this : how can you -using vbs,js,html,hta,css...- display an image (basically not in default windows image viewer you know what i'm talking about) ? i first tough it's hta with that image as a background and no border but after trying it the image still have small

With Excel, trying to find genuine used range from external HTA

岁酱吖の 提交于 2020-01-21 16:54:33
问题 I've been using this command: LastRow = ActiveSheet.UsedRange.Rows.Count But the UsedRange property can often be inaccurate. So I'm looking for an alternative. I found a great tip explaining this method: LastRow = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row This works a treat in Excel. However, I'm running code from an HTA, so I need to convert this line, and I'm struggling. THIS is my question --- please can someone offer guidance on how to convert this simple

Script works as VBS but not HTML

本小妞迷上赌 提交于 2020-01-17 04:38:13
问题 I have a script that shows a filtered list of what groups a particular AD user is a member of. It works perfectly fine as a VBS file, but when imported into either an HTA or HTML file it gives me a "The search filter cannot be recognized" error message when running the "objRecordSet.MoveFirst" line below. Dim User Dim DIA Dim GroupList DIA = "No" User = "UserNic" Const ADS_SCOPE_SUBTREE = 2 Const E_ADS_PROPERTY_NOT_FOUND = &h8000500D Set objConnection = CreateObject("ADODB.Connection") Set

How to get the size of a HTA window?

♀尐吖头ヾ 提交于 2020-01-15 07:34:53
问题 You can SET the size of a HTA window but I can't find a way to GET its size. All I can think of is reading document.body.offsetWidth and .offsetHeight , but those give you the viewport size not the actual window size. Is it possible to know that? 回答1: It seems there are no properties or methods to get that information. The now beta-released IE9 has the new properties outterWidth and outterHeight , but that is not an option for now. So I devised a workaround for this: function

Create Message box/ pop up message

我是研究僧i 提交于 2020-01-14 05:50:09
问题 See these message box images 1: http://catalinx.homeftp.org/img/Autoiterror1.jpg 2: http://www.exceltrick.com/wp-content/uploads/2013/02/Messagebox-Example-5.png I can create such messagebox using vbs in a notepad as shown in 1st image. But click buttons are like in 2nd image. How to solve it? I'm making an HTA app. I'm asking how to add particular set of buttons in new style. For example see 2 methods: MsgBox "Hello", 48 and Alert "Hello" Both displays same thing with Exclamation. But the

Waiting Bar in HTA and CSS

淺唱寂寞╮ 提交于 2020-01-11 07:44:30
问题 I got a little code to simulate a waiting bar that uses HTML and CSS, so I had the idea to add in a HTA to generate after dynamically with a vbscript. If any of you can give me a hand for good display scrolling text with the waiting bar. Thank you in advance ! The original code in question => VBScript script progress notification My modified code in a HTA : <HTML> <HEAD> <Title>Recherche dans le contenu des fichiers de type texte (Version modifié © Hackoo)</Title> <HTA:APPLICATION ICON =