1
我已将searching for a solution to an issue of wrapping an .hta file转换为.exe,因此用户只需单击即可。我正在处理的应用程序是通过.hta从GUI加载的批处理脚本的集合。我试过了各种Google搜索解决方案,其中包括HTAEdit。所有似乎都无法正确创建.exe或出现新的本地感染的简单目标。将.Hta转换为.Exe
HTAEdit这似乎是最合理的解决方案工作一次,然后不断地失败了,所以我的问题如下:
- 假设下面的代码是正确的是有一个工具,在那里,实际转化HTA为EXE?
- 虽然下面的代码有点长,但是对于编程通常是新手,我不确定我是否搞砸了一些东西?
(下面的代码工作在HTAEditor但每一次我尝试将其转换,它无法完成转换。)
谢谢您的时间,对不起的就是这个职位是类似于我上面链接的那个,没有进一步的解决方案,我可以在Stack或Google上找到。
<html>
<title>Foo</title>
<HTA:APPLICATION
ID="Foo"
APPLICATIONNAME="Foo"
BORDERSTYLE="raised"
ICON="Logos/icon.ico"
SINGLEINSTANCE="yes"
>
<SCRIPT LANGUAGE="VBScript">
Sub Window_onLoad
window.resizeTo 800,400
End Sub
Sub SubChooseScript
For Each Button In SecureOption
If Button.Checked Then
If Button.Value = "Category" Then
For Each objButton in RadioOption
If objButton.Checked Then
Select Case objButton.Value
Case "Selection One"
Set objShell = CreateObject("Wscript.Shell")
objShell.Run "Scripts\foo.bat"
self.close()
Case "Selection Two"
Set objShell = CreateObject("Wscript.Shell")
objShell.Run "Scripts\foo.bat"
self.close()
Case "Selection Three"
Set objShell = CreateObject("Wscript.Shell")
objShell.Run "Scripts\foo.bat"
self.close()
Case Else
MsgBox "Something bad happened. Please try again"
self.close()
End Select
End If
Next
End If
End If
If Button.Checked Then
If Button.Value = "Category Two" Then
For Each objButton in RadioOption
If objButton.Checked Then
Select Case objButton.Value
Case "Selection One"
Set objShell = CreateObject("Wscript.Shell")
objShell.Run "Scripts\foo.bat"
self.close()
Case "Selection Two"
Set objShell = CreateObject("Wscript.Shell")
objShell.Run "Scripts\foo.bat"
self.close()
Case "Selection Three"
Set objShell = CreateObject("Wscript.Shell")
objShell.Run "Scripts\foo.bat"
self.close()
Case Else
MsgBox "Something bad happened. Please try again"
self.close()
End Select
End If
Next
End If
End if
Next
End Sub
</SCRIPT>
<body>
<img src="Logos\logo.jpg" align="right" height="200" width="200"/>
<p><b>Radio Options One</b></p>
<div class="button-formatting">
<input type="radio" name="RadioOption" value="foo" id="foo"><b> <u>foo</u></b>
<label for="foo", style="font: 16px Arial"><i>-- bar.</i></label><BR>
<input type="radio" name="RadioOption" value="foo" id="foo"><b> <u>foo</u></b>
<label for="foo", style="font: 16px Arial"><i>-- bar.</i></label><BR>
<input type="radio" name="RadioOption" value="foo" id="foo"><b> <u>foo</u></b>
<label for="foo", style="font: 16px Arial"><i>-- bar.</i></label><P>
<p><b>Radio Options Two</b></p>
<input type="radio" name="foo" value="foo" id="foo"><b><u>foo</u></b>
<label for="foo", style="font: 16px Arial"><i>-- bar.</i></label><BR>
<input type="radio" name="foo" value="foo" id="foo"><b> <u>foo</u></b>
<label for="foo", style="font: 16px Arial"><i>-- bar.</i></label><BR>
</div><BR>
<input id=runbutton class="button" type="button" value="Options" name="run_button" onClick="SubChooseScript">
</body>
Htaedit还在执行exe时将exe解压缩到可访问的文件夹结构。我很长一段时间没有使用过这些东西,但我会记得htaedit是商业用途,所以你必须在试用期后继续支付使用费。 – Teemu
@Teemu不,你不必支付,因为试用期永不过期。唯一的问题是,只要你不付钱,你会得到一个恼人的“立即注册!”每次打开HtaEdit时都会出现对话框。 –
嗯..我记得exe文件转换在小道中只有几次工作,然后它停止工作,如果你没有付费。 – Teemu