Prev: Named pipe client and server PIDs
Next: log(0) causing a crash on one particular windows XP (SP3) machine
From: Richard Russell on 17 Apr 2010 04:20 I want to determine whether a file is 'transient', i.e. in a 'non permanent' location. Specifically I want to know if it is in one of these places: 1. On a network drive/volume. 2. On a removable drive/volume. 3. In a 'temporary' location such as Temporary Internet Files. Is there an API that makes this easy? Richard. http://www.rtrussell.co.uk/
From: Hector Santos on 17 Apr 2010 04:54 Richard Russell wrote: > I want to determine whether a file is 'transient', i.e. in a 'non > permanent' location. Specifically I want to know if it is in one of > these places: > > 1. On a network drive/volume. > 2. On a removable drive/volume. > 3. In a 'temporary' location such as Temporary Internet Files. > > Is there an API that makes this easy? > > Richard. > http://www.rtrussell.co.uk/ How do you recognize it? By file name? Do you wish to watch dog it? or just search for it? "Transient" (to me) implies watching it. -- HLS
From: David Lowndes on 17 Apr 2010 05:15 >I want to determine whether a file is 'transient', i.e. in a 'non >permanent' location. Specifically I want to know if it is in one of >these places: > >1. On a network drive/volume. >2. On a removable drive/volume. Use GetDriveType >3. In a 'temporary' location such as Temporary Internet Files. See CSIDL_INTERNET_CACHE in MSDN. Given that your definition of transient is ambiguous, it'll be difficult to come up with a definitive answer. What is it that you're trying to achieve, maybe there's some other solution? Dave
From: Richard Russell on 17 Apr 2010 17:55 On Apr 17, 10:15 am, David Lowndes <Dav...(a)example.invalid> wrote: > Given that your definition of transient is ambiguous, it'll be > difficult to come up with a definitive answer. What is it that you're > trying to achieve, maybe there's some other solution? The scenario is an executable which acts as a plug-in for an application; when first executed it 'installs' itself in the application (basically by recording its location in the registry). If the executable is located on a network or removable drive, or in a temporary directory, it must first copy itself to a 'safe' place, but otherwise it doesn't bother (to avoid making an unnecessary copy, which might require admin privileges). > See CSIDL_INTERNET_CACHE in MSDN. I know how to test for *specific* temporary directories, but I want to know whether the file is in *any* temporary location. Basically I want to know if the file might 'disappear' *without* the user explicitly deleting it. Richard. http://www.rtrussell.co.uk/
From: Hector Santos on 17 Apr 2010 18:49 Richard Russell wrote: > I know how to test for *specific* temporary directories, but I want to > know whether the file is in *any* temporary location. Basically I > want to know if the file might 'disappear' *without* the user > explicitly deleting it. Can ReadChangeDirectoryW() help here? -- HLS
|
Next
|
Last
Pages: 1 2 Prev: Named pipe client and server PIDs Next: log(0) causing a crash on one particular windows XP (SP3) machine |