Page 1 of 1

Assign different username to TFindFile

PostPosted: March 17th, 2008, 6:19 pm
by iimu
Thanks for your great components !

In our file server there is restricted access rights. I need login with different username to get sharing some files. I check in my software who can see and what files. Is is possible to assign different username in TFindFile component ? If not can you solve my problem ?

Regards iimu

PostPosted: March 18th, 2008, 12:25 pm
by Kambiz
I think what you have requested is not possible technically.

You have two choices to solve the problem:
  1. Run your program as Administrator or an user with the required privileges.
  2. Make your program a Windows Service.

PostPosted: March 18th, 2008, 8:04 pm
by iimu
Thanks for your answer.

I found Api functions WNetConnection2 and WNetCancelConnection2. They are exactly what I was looking for. Now I can create different connections with different usernames for searching files without users get directly browse folders.

iimu