Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / May 2006

Tip: Looking for answers? Try searching our database.

DLL rights problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kiwi - 11 May 2006 10:48 GMT
Hello: I have a DLL that must update into a server. I want to make
automatic proccess that copy that dll from a directory(Ex: c:\update)
to application directory (ex: c:\application). Copy file is easy, but
the problem is that copying it does not get the same right access that
app. directory has. How can I copy this file assigning the correct
right access?

Regards
yoga weazel - 11 May 2006 13:55 GMT
I'm assuming you mean FileSystem rights correct?  In other words, the file
Attributes?

> Hello: I have a DLL that must update into a server. I want to make
> automatic proccess that copy that dll from a directory(Ex: c:\update)
[quoted text clipped - 4 lines]
>
> Regards
kiwi - 11 May 2006 14:11 GMT
Thanks by responding :)

I mean that if I copy (for example manually) this dll from desktop to
app. directory, this dll preserves rights from was created (in
desktop), and not assume new rights of the new directory.

For example, DLL has system user,administrator user, and user@domain.
But apps directory has administrator user, system user and USERS user,
that is neccesary from my dll.

Sorry by my english :) I don't know if is very easy understand me

Regards
yoga weazel - 11 May 2006 16:51 GMT
No problem.  I get what you mean now.  This is not really an interop problem
though.

I haven't tried it but it looks like it may be as simple as the following:

File.SetAccessControl(@"c:\txt.dll", File.GetAccessControl(@"c:\txt.txt"))

where c:\txt.dll is the newly copied file and c:\txt.txt is a existing file
in the target directory with the desired access rights.

Good luck.

> Thanks by responding :)
>
[quoted text clipped - 9 lines]
>
> Regards

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.