Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Read-Only attribution
Message
 
 
To
26/09/2001 15:42:52
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00561204
Message ID:
00561323
Views:
23
>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) && lcfile is the name of the file
* Turn off the read-only bit
oFile.Attributes = BITAND(oFile.Attributes, 0xFE)
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform