2017-02-17 203 views
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> 
+0

Htaedit還在執行exe時將exe解壓縮到可訪問的文件夾結構。我很長一段時間沒有使用過這些東西,但我會記得htaedit是商業用途,所以你必須在試用期後繼續支付使用費。 – Teemu

+0

@Teemu不,你不必支付,因爲試用期永不過期。唯一的問題是,只要你不付錢,你會得到一個惱人的「立即註冊!」每次打開HtaEdit時都會出現對話框。 –

+0

嗯..我記得exe文件轉換在小道中只有幾次工作,然後它停止工作,如果你沒有付費。 – Teemu

回答

0

對於那些未來可能會遇到這個問題的人。

多次將各種.hta下載到.exe應用程序,格式化更改和其他可能的自我搜索解決方案之後。我在堆棧中發現了這個thread,它最終提供了所需狀態的功能,但沒有增加頭痛。

如果需要,我可以然後bat2exe文件並獲得所需的代碼混淆。