PDA

View Full Version : Help with "Set File Attributes"



NewsArchive
05-09-2006, 10:13 AM
Hello,

I use the following in my script:

If %CURDIR%\UPD-PROG Folder exists Then
Copy Local Files from "%CURDIR%\UPD-PROG\*.*" to "%_SB_INSTALLDIR%"
Set File Attributes for "%_SB_INSTALLDIR%"
End

The local files are copied well to the installation directory, but after
that I want to change the file attributes of ALL files in the installation
directory. And this is not working. The original file attributes stay
remain.

How can I set the file attributes of all the files in the installation
directory?

I hope you can help me.

Product: Professional Edition
Version: 5.0.1244

Best regards

Jeffrey Kuijt
AdSystems BV

NewsArchive
05-09-2006, 10:13 AM
Jeffrey,

This function is a wrapper to the SetFileAttributes Windows API. The
SetFileAttributes function sets the attributes for a file or directory.
Wildcards are not permitted. You have to know the filename of each and
every file to set file attributes in Windows.

Does this help?

Friedrich

--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 5

NewsArchive
05-09-2006, 10:13 AM
Hi Friedrich,

That's a pity.
(I used Wise Installer and they support this.)
BUT YOUR PRODUCT IS MUCH BETTER!

Can I make a script which loops through all files of a directory and set the
file attributes of each file?
Is this possible with the Script Editor? And if yes, how? ;-)

Best regards

Jeffrey Kuijt

NewsArchive
05-09-2006, 10:14 AM
Hi Jeffrey,

You know how to put pressure on me <g>. Okay, if Wise Installer supports
this then we have to find a way to make this also work in SetupBuilder ;-)

It's on the wishlish now - I'll see what we can do. I'll let you know
within the next 2-3 days.

Friedrich

--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 5

NewsArchive
05-09-2006, 10:14 AM
Hi Friedrich,

Thanks a lot!
I'm looking forward to hear from you.

Best regards

Jeffrey Kuijt

NewsArchive
05-11-2006, 05:08 AM
Jeffrey,

Added. The SB5 function "Set File Attribute" can include wildcards now.
This will be available in the next build.

--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 5

NewsArchive
05-11-2006, 05:09 AM
Hi Friedrich,

YES! YES! YES!

Thanks a lot!
You're the best!

Best regards

Jeffrey Kuijt