Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WinDir environment variable woes.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Vista
Divers
Thread ID:
01243969
Message ID:
01243971
Vues:
21
>Getting bit by Vista again. But this time it hurt.
>
>When issueing Fox statement GETENV("WinDir") in XP I get "C:\Windows", but in Vista I get "%SystemRoot%". This is useless in determining where the OS is installed. Does anyone know of either where "%SystemRoot%" is stored or am alternitive to the GetEnv() method? I need to determine the root drive letter of the boot HD.
>
>Thanks

A quick and dirty workaround couldbe (do not have Vista, so can not test it)
? Getenv(Strtran(Getenv('WinDir'), '%', ''))
[Update] or just GetEnv('SystemRoot') of course
[Update] ah... root drive letter... then Getenv('SystemDrive')
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform