Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Locate a file in user's windows drive
Message
 
To
02/05/2006 12:14:56
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01118452
Message ID:
01118456
Views:
10
>Hi all,
>How to make my exe find that there is a file named x in windows drive?
>It is easy when it happens in inno setup. All I have to do is to write (win)and it will automatically refer to user's windows drive which can be in C:\ or D:\ because I believe that windows is not always installed in C:. just like mine, it is installed in D:\. So to repeat again how to make my exe locate that there is a file named x (surely it has been there before my exe is installed) in user's windows drive? Please help.Thank you.
>
>
>Regards
>
>
>Dudin

If you just want to know on what drive Windows is installed try this:
DECLARE INTEGER GetWindowsDirectory IN WIN32API STRING @, INTEGER
LOCAL lcWinDrive
lcWinDrive = SPACE(255)
GetWindowsDirectory(@lcWinDrive, 255)
? [Windows Drive],LEFT(lcWinDrive,3)
But if you want to search Naomi's answer is for you.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform