>I have two applications (executable), the first one is for logging in and checking latest version of the main application (the second one). Users get an error message "File Access Denied" whenever the program tries to overwrite the latest version of the main application (before launching it), even tho I have the code !attrib -r (file.exe) in the program. Looks like the code doesn't work. Why? It worked fine in FoxPro 2.6.
You don't have to use DOS command to do that. Download file#
9311 'File Attribute Get & Set' or use WSH
oFSO = CREATEOBJECT("Scripting.FileSystemObject")
oFile = oFSO.GetFile(lcfile)
oFile.Attributes = BITAND(oFile.Attributes, 0xFE)
--sb--