interop >> DLL rights problem

by kiwi » Thu, 11 May 2006 17:48:52 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


interop >> RE: DLL rights problem

by eW9nYSB3ZWF6ZWw » Thu, 11 May 2006 20:55:03 GMT


I'm assuming you mean FileSystem rights correct? In other words, the file
Attributes?

interop >> DLL rights problem

by kiwi » Thu, 11 May 2006 21:11:25 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

interop >> DLL rights problem

by eW9nYSB3ZWF6ZWw » Thu, 11 May 2006 23:51:02 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.

Similar Threads

1. FULLTRUST for my .dll did not work right

2. Custom validation of mixed .dlls in a rights managed application

3. Dynamic Menu Items is not right aligned with Right to Left documen

4. pass the right form input to the right control - Asp.Net

5. Left-to-Right and Right-to-Left LTR and RTL layouting

How do I change my forms from LTR to RTL programmatically,
say by the user pressing a button ? Thanks

6. IO Security problem - C# App calls unmanaged C++ dll, and the dll launch another process

7. Problema con Dll en Asp .Net / Problem with Dll in Asp.net

Hola, Muy buenos ds.

Tengo un problema  con una dll. ta funciona sin ning problema en
visual basic .net, o en la consola de .Net, Pero al ejecutarla desde
..Net no me funciona igual que en Visual Basic .net. Con los mismos
datos me trae que no existe un usraio que le mando. e incluso se demora
un poco m que cuando se ejecuta en VB NET.

Ojala me puedan orientar en este problema que me surgio. muchas gracias.

8. Right alignment on Winforms Data Grid cuts off text on right - .NET Windows Forms