Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Ken Murphy
  Where is Ken Murphy?
 Springhill
 Canada
 Ken Murphy
 To: Ilya Rabyy
  Where is Ilya Rabyy?
 Fountain Valley
 California - United States
 Ilya Rabyy
 Tags
Subject: RE: Probem with VFP7 and Shell DLL on WinNT 4 SP6a
Thread ID: 78978 Message ID: 79051 # Views: 1 # Ratings: 0
Version: Visual FoxPro 7 Category: Operating Systems
Date: Wednesday, October 12, 2005 2:16:46 PM         
   


>
> > Then why not to use the only TEMP directory for all what you need?
> > At least one of the lines below should work:
> >
> > ?SYS(2023)
> > ?GETENV("TEMP")
> > ?GETENV("TMP")
> >
> >
> >
> > Best Wishes,
> >
> > Yuri Rubinov

>
> Well, I did exactly that in the previous generation of my major product... until our customers upgraded to WinNT 5.xx from Win4.9xx and NT4, and started receiving message "Invalid path" and/or "Directory already exists" because Temp dir is Hidden in WinNT 5.xx.
>
> Also, several customers' Sys Admins told me that Temp dirs are cleaned up every once in a while, so placing any permanent files into Temp dirs would be a bad idea, at least with WinNT 5.xx. And you already know the rest of the story.
>
> BTW: placing SHFolder.DLL on that our test NT4 machine did not help either. It reports "SetThreadExecutionState cannot be located in Kernel32" (:<)
>
> Regards,
>
> Ilya


Ilya,
I typically start with three locations for data:
1 Global data (the database) will normally sit on a server or at least, on a shared dir on one computer.
2 Machine specific data will normally sit in an app specific dir in the client's C:\ dir.
3 User specific data will normally sit in a folder in Documents and settings\Username.

I typically create these directories at setup, but depending on your users's rights, you could do this in a NextRun.prg that fires when the user next accesses your app.

If I need a temp dir, I don't interfere with the Win temp dir, but rather, I will create it as a subdir in c:\MyApp\MachineAppData or in Documents and settings\UserName\MyApp\UserAppData

You could try something like this. It doesn't sound as if you need to go to a userappdata dir - a MachineAppData folder should do it for you. This keeps your data out of the SysAdmin's clearing schedule and at the same time, you always know where to find this data. Note that for machine specific data, you might need to assign "Authorized Users" or better still "MyApp Users" rights to this dir. If your sys admin wants to get totally stupid on this, you can have him grant "ThisMachine Users" rights to this dir.

Ken

ENTIRE THREAD

Probem with VFP7 and Shell DLL on WinNT 4 SP6a Posted by Ilya Rabyy @ 10/11/2005 6:50:03 PM
RE: Probem with VFP7 and Shell DLL on WinNT 4 SP6a Posted by Yuri Rubinov @ 10/11/2005 8:35:00 PM
RE: Probem with VFP7 and Shell DLL on WinNT 4 SP6a Posted by Ilya Rabyy @ 10/11/2005 9:27:25 PM
RE: Probem with VFP7 and Shell DLL on WinNT 4 SP6a Posted by Yuri Rubinov @ 10/11/2005 9:46:02 PM
RE: Probem with VFP7 and Shell DLL on WinNT 4 SP6a Posted by Ilya Rabyy @ 10/11/2005 10:33:30 PM
RE: Probem with VFP7 and Shell DLL on WinNT 4 SP6a Posted by Ken Murphy @ 10/12/2005 2:16:46 PM
RE: Probem with VFP7 and Shell DLL on WinNT 4 SP6a Posted by Ilya Rabyy @ 10/12/2005 5:10:18 PM
RE: Probem with VFP7 and Shell DLL on WinNT 4 SP6a Posted by Ken Murphy @ 10/12/2005 9:23:13 PM
RE: Probem with VFP7 and Shell DLL on WinNT 4 SP6a Posted by Ilya Rabyy @ 10/12/2005 9:33:01 PM
RE: Probem with VFP7 and Shell DLL on WinNT 4 SP6a Posted by Ken Murphy @ 10/12/2005 9:54:45 PM
RE: Probem with VFP7 and Shell DLL on WinNT 4 SP6a Posted by Ilya Rabyy @ 10/13/2005 12:36:47 AM
RE: Probem with VFP7 and Shell DLL on WinNT 4 SP6a Posted by Ken Murphy @ 10/13/2005 12:38:50 AM
RE: Probem with VFP7 and Shell DLL on WinNT 4 SP6a Posted by Ilya Rabyy @ 10/13/2005 12:52:43 AM
RE: Probem with VFP7 and Shell DLL on WinNT 4 SP6a Posted by Yuri Rubinov @ 10/12/2005 2:41:31 PM
RE: Probem with VFP7 and Shell DLL on WinNT 4 SP6a Posted by Ilya Rabyy @ 10/12/2005 6:22:36 PM
RE: Probem with VFP7 and Shell DLL on WinNT 4 SP6a Posted by Yuri Rubinov @ 10/12/2005 8:38:25 PM
RE: Probem with VFP7 and Shell DLL on WinNT 4 SP6a Posted by Ilya Rabyy @ 10/13/2005 12:39:13 AM
RE: Probem with VFP7 and Shell DLL on WinNT 4 SP6a Posted by Ilya Rabyy @ 10/13/2005 5:22:15 PM
RE: Probem with VFP7 and Shell DLL on WinNT 4 SP6a Posted by Yuri Rubinov @ 10/13/2005 5:56:08 PM
RE: Probem with VFP7 and Shell DLL on WinNT 4 SP6a Posted by Ilya Rabyy @ 10/13/2005 6:12:37 PM