i try to auto update functionality in my HTA application. At the start
page it controls any update from internet, if so it starts to download
new files (.hta files they are) and run theme. Is that possible, and
how?
Thanks

Re: download with xhtml and run! Is that possible by caglaror

caglaror
Fri Apr 08 23:21:50 CDT 2005

I can download a hta file with xhtml but at the savetofile step it
cause an error, "write to file failed".
Here is my sample code.........
<script language=3D"vbscript">
Set xmlHttpReq =3D CreateObject("Microsoft.XMLHTTP")
'||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
cURL =3D "http://www.frogroup.com/config.eop"
'||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
xmlHttpReq.open "GET", cURL, false
xmlHttpReq.send
'||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Dim strDIR
'strDIR =3D WScript.ScriptFullName
strDIR =3Ddocument.location.pathname
strDIR =3D Left(strDIR,InStrRev(strDIR,"\"))

Dim strFIL
strFIL =3D Mid(cURL,InStrRev(cURL,"/")+1)
'||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Dim objADO
Set objADO =3D CreateObject("ADODB.Stream")
objADO.Type =3D 1
objADO.Open
objADO.write xmlHttpReq.ResponseBody
objADO.SaveToFile strDIR & strFIL,2
'||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
' indirilen dosyanin duzenleme nosu kontrol ediliyor
Dim fso, f
Set fso =3D CreateObject("Scripting.FileSystemObject")
Set f =3D fso.OpenTextFile(strDIR & strFIL, 1, True)
gdd =3D f.ReadAll ' genel direktif dosyasi
veriler=3D Split(gdd, Chr(13))
duzenleme=3DSplit(veriler(0),":")
msgBox("Internetteki versiyon:" & duzenleme(1))
</script>

The config.eop file is text file, and contains config and version data.
It must use for update prosseses.
Thanks
--------------
version:2.7
duzenleme_tarih:10.04.2005
moduller:emsansicil.hta,giris.hta,hasta_kayit.hta,ilac.hta,main.hta,muh_cek=
.hta,muh_fat.hta,muh_kas.hta,recete.hta,sat.hta,stok.hta
klasorler:css,db,img,inc,media,png
author:"Caglar ORHAN"
script_files:baglanti.vbs,func_lib.js
veritabani_adi:ilac_liste.mdb
mesajlar:Mutlu g=FCnler dileriz. //Dayanisma ayakta tutar...