Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Read-Only attribution
Message
From
27/09/2001 07:42:26
 
 
To
26/09/2001 15:42:52
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00561204
Message ID:
00561342
Views:
17
>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.

2 Things

Firstly is there anyone else using the 2nd exe?

Second replace the attrib comand with the following
Declare Integer GetFileAttributes IN Win32API STRING lpFileName
Declare Integer SetFileAttributes In Win32API String lpFileName, INTEGER nAttrib

lcFilename = "Fred.Exe"
lnAttribute = GetFileAttributes(lcFileName)
If Mod(lnAttribute,2) = 1 && This is Read only
        lnAttribute = lnAttribute - 1
	= SetFileAttributes(lcFileName, lnAttribute) && Set it to read write
Endif		
Ok looks like i'm about 7 hours too late with this message... Ooops!
Will Jones
Previous
Reply
Map
View

Click here to load this message in the networking platform