cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
tgooderham
Level 4

How to determine path to local cache that ISUS stores updates?

If no updates exist at the server, how do we programmatically determine the fully qualified path to the local cache?

That is, the path to where the silent download operation puts the update on your system.

I need this because I'll need to flush this folder if no updates exist for my product.

Thanks,
Ty
0 Kudos
(2) Replies
CChong
Level 11 Flexeran
Level 11 Flexeran

The directory names where the updates are stored seem to have this pattern:

{ProductCode}_UpdateID

and the default location is the temp directory (on Win2k, C:\Documents and Settings\username\Local Settings\Temp)

Keep in mind that your application already knows the ProductCode if it looks for updates to itself and the UpdateID doesn't matter since you just want to flush it anyway. The Temp directory being the default directory may speed up your system search, but remember that different operating systems may have different temp directories, and in some cases, as in Win2K, there may be a temp directory for each user as well as a temp directory for "All Users"

You could search your system for any directories containing the product code (include the curly brackets for more accuracy), and do one of the following:

1. delete the entire directory
2. check to see if a file exists in the directory and delete the file(s).

I am not sure of the ramifications of either of these actions.

Hope this helps! Good luck!
0 Kudos
CChong
Level 11 Flexeran
Level 11 Flexeran

Also, it appears on Win2K that you can find a user's temp directory by looking in the registry under the following key:

HKEY_USERS\*profile\Environment\TEMP or
HKEY_USERS\*profile\Environment\TMP

where *profile is the encrypted number corresponding to the user. In many cases there will be multiple *profiles under HKEY_USERS

If you want to flush just the current user's updates, the current temp directory can be found in the following registry entry:

HKEY_CURRENT_USER\Environment\TEMP or
HKEY_CURRENT_USER\Environment\TMP
0 Kudos