![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Impersonation Vs RunAs Hi, I want to execute a piece of my code under the admin privs.I can do it in dot net using advapi.dll's functions. Does any one has clue if this is possible in vbscript. Actually i need to connect to a database and extract some records from there under the different user privilagegs.. One approach i have is - create an excel macro, and call that from my vbscript code.this macro takes ADODB Connection object by reference, create an impersonate user and overrides the connection under different user's privs. I am able to use that perfectly but this approach does not look very decent. Other approach is to create an activeX dll in .NET and call it in VBS. Can anyone suggest a better solution or any pointer to do it in vbscript itself. Thanks, Avinash |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Impersonation Vs RunAs Can you show how you are currently connecting to the database? "Avi" <avi.iitr@xxxxxx> wrote in message news:eb8bce1b-48a1-4464-9054-467b18cdc211@xxxxxx Quote: > Hi, > > I want to execute a piece of my code under the admin privs.I can do it > in dot net using advapi.dll's functions. Does any one has clue if this > is possible in vbscript. > > Actually i need to connect to a database and extract some records from > there under the different user privilagegs.. > > One approach i have is - create an excel macro, and call that from my > vbscript code.this macro takes ADODB Connection object by reference, > create an impersonate user and overrides the connection under > different user's privs. I am able to use that perfectly but this > approach does not look very decent. > > Other approach is to create an activeX dll in .NET and call it in > VBS. > > Can anyone suggest a better solution or any pointer to do it in > vbscript itself. > > Thanks, > Avinash |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| vbscritp Sql Impersonation | VB Script | |||
| Impersonation | VB Script | |||
| runas /user:USER problem and a strange behavior of runas | Vista account administration | |||