Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Windows directory
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00341648
Message ID:
00341650
Views:
23
>Theres a key in the registry that shows the Windows directory on your computer. Say, if I chose to rename \WINDOWS as my WINDOWS directory to \WIN95, it would show "\WIN95". How would I do that in VFP6?

You can get the Windows directory using the API, and alter the path under the DOS bootstrap process in CONFIG.SYS and AUTOEXEC.BAT under Win9x, but it's completely suicidal. Your entire registry would break, because at a minimum, every registered component in the Windows and Windows\System directories would have to be re-registered, as would every font, and the list goes on. It's not changing a registry key, it's changing potentially thousands of them, not knowable in advance.

You could use the Scripting.FileSystemObject to rename the directory, but that will not do the necessary fixups in the registry.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform