Click to See Complete Forum and Search --> : NT Service and Temporary Internet Files


ash
July 19th, 1999, 01:13 AM
Hi,
I am writing an NT service which needs to access the temporary internet files of the user currently logged in. I run the service as a system service since it has to start automatically for all users. In order to enumerate the cache I use the Wininet API's FindFirstURLCacheEntry() and FindNextURLCacheEntry(). But if I run it as a system service it is not able to access the cache (temporary internet files folder) of the users. How do I solve this problem? I cannot run it as a user service as it would become exclusive to that user. I am able to retrieve the user name of the user logged on currently from the registry. Is it possible to start another service under this user name from this system service? Kindly help me! Thanks in advance.


Ashwin

bimmer boy
July 19th, 1999, 07:32 AM
since the service runs under the system account, it should have permission to read that directory. if not, see if you can change file permissions to allow the system account read the files

miked

ash
July 20th, 1999, 11:04 PM
Hi,
The service access only the temporary internet files of the ./system folder irrespective of which user logs on. That is I get the same set of temprorary internet files irrespective of which user has logged on even though the system has pemissions to read the temporary internet files of all users. I thought of starting a system service to get the user name and then start another service within this service, passing the user name and password(to gain access to the temporary internet files of that user). But there is no way to get the password of the user which I know of.
Let me know if you have any suggestions regarding how to solve this problem. Thanks in advance.


Ashwin

bimmer boy
July 21st, 1999, 07:19 AM
that is true that you can't get the password, but you can get the security context of the user. i do not know exactly how to do this, but in most of the NT functions there's a SecurityAttributes pointer for one of the parameters...if you can get the security attributes of the current user and start your new service in that context it may work.

miked