Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Read-Only attribution
Message
De
27/09/2001 07:42:26
 
 
À
26/09/2001 15:42:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00561204
Message ID:
00561342
Vues:
19
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform