TWebUpdate - Subdir

hi,

i want "TWebUpdate" to update some files that are located in a subdirectory of the {app}.

the {app} folder is under "\Program Files" (win7).

as you wrote in an early post (http://www.tmssoftware.com/site/forum/forum_posts.asp?TID=1016) this file must be also an appcomp ('cause the program was not running with admin prevs)

but if i do so, the "targetdir" (i.e."{app}\Reports") of this file seems to be ignored and the file always was copied to the "{app}" dir!?

# *.inf - file
[file3]
url=xxxxxxxxxxxx/110.fr3_NEW
localversion=110.fr3
targetdir={app}\Reports
descr=Bericht - Kunde
filesize=224876
mandatory=1



# *.log - file
25.04.2012 12:23:40 : [000] Upd copying file : C:\DOKUME~1\root\LOKALE~1\Temp\110.fr3_NEW to C:\Programme\MyApp\110.fr3
(should be "C:\Programme\MyApp\Reports\110.fr3)


what am i doing wrong?

thanks


embed the subfolder (as relative path) in a CAB file with which you distribute the update. Then, the spawned (signed) updater will be able to extra this with relative path under the  {app} folder.

i thought about that before but afaik it's not possible to store folders in a cab file?!

(tried it with "makecab")

maybe i have to try another cab-builder ...

thanks

... got it (".ddf" file)

thanks



Hello,

I have a similar problem. I have an .exe and a subfolder containing pictures. I can create a .CAB file with the subfolders and the pictures in it and the following is the .inf file I use in UpdateBuilder:

[file5]
url=Credit_Hunter_II.CAB
newversion=1.0.1.0
localversion=Credit_Hunter_II.exe
compressed=0
mandatory=1
[file6]
url=test.CAB
localversion=test.cab
compressed=0
mandatory=1

if I run it in Updatebuilder I can't start updating and the error message I have is "[Error message]...: Could not create cabinet file"



Where am I wrong ?

Many thanks


Alberto

I'm not sure I understand your question. You mention you created your CAB file?
I guess you then specify that UpdateBuilder should create your CAB file too? If so, is something keeping the CAB file open causing that UpdateBuilder can't overwrite this file?

 
Hello Bruno,
 
I created a CAB file manually that contains several pictures and their relative paths with makecab.exe. Then, I have appended this CAB file to Updatebuilder. Is this the wrong way to proceed ? How can I instruct UpdasteBuilder to make a CAB file directly that contains several subdirectories and the files in them ?
 
Many thanks
 
 
Alberto

If you appended this CAB file, directly in UpdateBuilder, did you set for this file :  File Compression = not compressed?

When you set CAB Compression, UpdateBuilder will try to compress it itself.



Hi Bruno,

Yes, I did. The following is an extract of the .ini file creted by UpdateBuilder

[file6]
url=test.CAB
localversion=test.cab
compressed=0
mandatory=1

Hello again,

 
In order to make things simpler and shorter. I copy and paste here below the whole content of the UBProj file. The file test.cab includes all pictures and their relative path.
 
[update]
descr=
datefmt=1
[version]
inctime=1
year=2012
month=4
day=5
hour=23
min=53
sec=35
update=11
app=C:\Delphi\Projects\Credit Hunter\Win32\Release\Credit_Hunter_II.exe
[commands]
inform=
query=
weburl=http://www.abc.com/
htmldlg=
runbefore=
runafter=
[application]
restart=0
prompt=0
cl=Credit_Hunter_II.exe
comps=KsDHTMLEDLib  Installation.txt_NEW registerOCX.bat_NEW KsDHTMLEDLib.CAB KsDHTMLEDLib  Installation.txt_NEW Credit_Hunter_II.CAB test.CAB
[upload]
uncdir=C:\Delphi\Projects\Credit Hunter\NewVersionTest
host=ftp.abc.com
userid=testupdate@abc.com
passwd=abc
ftpdir=/home/abc/public_html/testupdate/
baseurl=
unc=0
ftppass=0
[custom]
procmsg=
procparam=
valmsg=
valparam=
signature=
[files]
count=9
[file0]
url=C:\Delphi\Projects\Credit Hunter\Update\KsDHTMLEDLib  Installation.txt
major=0
minor=0
release=0
build=0
localver=KsDHTMLEDLib  Installation.txt
targetdir=
compressed=0
descr=
newsize=241
newsum=21640
newcrc32sum=698417155
includeappcomps=1
mandatory=1
update=4
[file1]
url=C:\Delphi\Projects\Credit Hunter\Update\registerOCX.bat
major=0
minor=0
release=0
build=0
localver=registerOCX.bat
targetdir=
compressed=0
descr=
newsize=51
newsum=4486
newcrc32sum=-869355576
includeappcomps=1
mandatory=1
update=4
[file2]
url=C:\Delphi\Projects\Credit Hunter\Update\KsDHTMLEDLib.ocx
major=2
minor=0
release=2
build=1
localver=KsDHTMLEDLib.ocx
targetdir=
compressed=1
descr=
newsize=1370624
newsum=143965744
newcrc32sum=-657761855
includeappcomps=1
mandatory=1
update=4
[file3]
url=C:\Delphi\Projects\Credit Hunter\Update\KsDHTMLEDLib.ocx
level=1
[file4]
url=C:\Delphi\Projects\Credit Hunter\Update\KsDHTMLEDLib  Installation.txt
major=0
minor=0
release=0
build=0
localver=KsDHTMLEDLib  Installation.txt
targetdir=
compressed=0
descr=
newsize=241
newsum=21640
newcrc32sum=698417155
includeappcomps=1
mandatory=1
update=4
[file5]
url=C:\Delphi\Projects\Credit Hunter\Win32\Release\Credit_Hunter_II.exe
major=1
minor=0
release=1
build=0
localver=Credit_Hunter_II.exe
targetdir=
compressed=1
descr=
newsize=11145216
newsum=1132632420
newcrc32sum=762846458
includeappcomps=1
mandatory=1
update=0
[file6]
url=C:\Delphi\Projects\Credit Hunter\Win32\Release\Credit_Hunter_II.exe
level=1
[file7]
url=C:\Delphi\Projects\Credit Hunter\Win32\Debug\support files\images\flags\test.cab
major=0
minor=0
release=0
build=0
localver=test.cab
targetdir=
compressed=1
descr=
newsize=2586379
newsum=333186452
newcrc32sum=-553876121
includeappcomps=1
mandatory=1
update=4
[file8]
url=C:\Delphi\Projects\Credit Hunter\Win32\Debug\support files\images\flags\test.cab
level=1
[whatsnew]
file=C:\Delphi\Projects\Credit Hunter\Update\whatsnew.txt
[eula]
file=C:\Delphi\Projects\Credit Hunter\Update\EULA.txt
 
 
Many thanks
Alberto

Which of the 3 CAB files that it should generate is failing?

Hi Bruno,
 
it's test.cab
Thanks
 
 
Alberto

If you created test.cab outside UpdateBuilder, you should turn off that UpdateBuilder compresses this file.



Hi Bruno,

This works much better, thank you. With the following setup I have no errors and I have the test.cab file in the directory:

[file6]
url=test.cab_NEW
localversion=test.cab
mandatory=1
[application]
appupdate=1
appname=Credit_Hunter_II.exe
appcomps=KsDHTMLEDLib  Installation.txt_NEW registerOCX.bat_NEW KsDHTMLEDLib.CAB KsDHTMLEDLib  Installation.txt_NEW Credit_Hunter_II.CAB test.cab_NEW
[eula]
file=EULA.txt

What I want to do now is to unpack the file test.cab. Can I instruct UpdateBuilder to do that ? If yes, how ?

Thanks

Alberto

It is TWebUpdate that extracts CAB files. In UpdateBuilder there is no built-in support to extract CAB files. Not sure why you'd need UpdateBuilder to extract files?


Thank you very much for this last info, Bruno. Everything is clear now

Thanks
Alberto