Video Screencast Help

AddFileEx api does not set the file attribute

Created: 30 Aug 2010 • Updated: 10 Sep 2010 | 1 comment


I am using AddFileEx api of Wise to add files in the wsi and later compile it to create msi. Wise documentation says that user can define the file attribute while calling AddFileEx. But, it does not seem to be working when I use it for text file.

I am using following code for this:

Set installer = Nothing
Set installer = Wscript.CreateObject("WfWi.Document")
strGeneral_template = strSchrodSrc & "\mmshare\windows\general_template.wsi"
installer.Open strGeneral_template
key = installer.AddFileEx("test.txt", "INSTALLDIR\test.txt", 1024,"Complete", 0, comp)

This piece of code is not able to set file attribute for text file. Can someone explain it? Is it a bug in Wise or am I using something incorrectly?

I am using "Wise Installation Studio 7.0" on Windows XP SP3 platform.

Comments 1 CommentJump to latest comment

aditya d.e shaw's picture


Once correction. Actually API works, but when I compile wsi into msi, then WfWi program is changing text file attribute to 0.