473,394 Members | 1,829 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Changing a Process's context

Day
Hello!
I'm programming in C# on .NET 2.0, Windows XP SP2.
I'm using a third party's DLL in an environment that limits access to
the hard drives save for a single, set user (recognized to access the
drives by name).
The dll functions use Process.Start and run under the logged on User's
context, but I need them to run under those those of the privileged
user's. (I tried using Impersonation, but it only affects the thread
and thus doesn't affect the created Process).
Is there a way to do so without running the first process under the
privileged user's permissions? I can't access the Process.Start inside
the dll. It's a Black Box to me).
A friend -strongly- suggested against fetching the dll's process's
handle and changing its permission thread-by-thread.

Thanks in advance!
~Day

Feb 21 '07 #1
2 2654
On Feb 21, 10:12 am, "Day" <duckey.robbin...@gmail.comwrote:
Hello!
I'm programming in C# on .NET 2.0, Windows XP SP2.
I'm using a third party's DLL in an environment that limits access to
the hard drives save for a single, set user (recognized to access the
drives by name).
The dll functions use Process.Start and run under the logged on User's
context, but I need them to run under those those of the privileged
user's. (I tried using Impersonation, but it only affects the thread
and thus doesn't affect the created Process).
Is there a way to do so without running the first process under the
privileged user's permissions? I can't access the Process.Start inside
the dll. It's a Black Box to me).
A friend -strongly- suggested against fetching the dll's process's
handle and changing its permission thread-by-thread.

Thanks in advance!
~Day

Have you considered loading the DLL Into an AppDomain, providing the
domain with the security context you need?

jpuopolo

Feb 21 '07 #2
Day
On Feb 21, 5:18 pm, "jpuopolo" <puop...@gmail.comwrote:
On Feb 21, 10:12 am, "Day" <duckey.robbin...@gmail.comwrote:
Hello!
I'm programming in C# on .NET 2.0, Windows XP SP2.
I'm using a third party's DLL in an environment that limits access to
the hard drives save for a single, set user (recognized to access the
drives by name).
The dll functions useProcess.Start and run under the logged on User's
context, but I need them to run under those those of the privileged
user's. (I tried using Impersonation, but it only affects the thread
and thus doesn't affect the createdProcess).
Is there a way to do so without running the firstprocessunder the
privileged user's permissions? I can't access theProcess.Start inside
the dll. It's a Black Box to me).
A friend -strongly- suggested against fetching the dll'sprocess's
handle andchangingits permission thread-by-thread.
Thanks in advance!
~Day

Have you considered loading the DLL Into an AppDomain, providing the
domain with the securitycontextyou need?

jpuopolo
..The problem is that I don't have the privileged user's password, nor
necessarilly his domain... Or his name for the matter.
My program is a client side program that gets the user's details
encrypted from the server and only uses it when necessary, so loading
DLLs is a bit tricky like that as far as I know.
I'll try looking into it a bit more, but I'll appriciate it if you
could give me at least some buzzwords to look into :)

~Day

Feb 22 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Brandon Hoppe | last post by:
I'm trying to change the src of an ilayer in the parent document from a link inside the ilayer. I'm not able to get it to work. All that happens is Netscape 4 crashes. This is for Netscape 4 only....
2
by: MENTAT | last post by:
Hi, I am trying to create an installer for my web application. So I added a web setup project to my solution (I am using VS.NET 2003). Been playing around with it since then and it basically...
9
by: vindhya | last post by:
I have a small query. If I have a character from alphabets and I want to change case of the same then how is it possible ? Here are the solutions, but can you suggest any other solution may be...
1
by: Bucky Pollard | last post by:
I have a web service that needs to create a batch file and call it (since there are no APIs for the functionality I am looking for). I am using the Process and ProcessStartInfo objects. When I try...
7
by: Dave Mehrtens | last post by:
I am trying to configure my ASP.NET application and have come across something unexpected. First, I understand that all ASP.NET applications running on a single server will utilize a single...
8
by: Rak | last post by:
I am looking for a way to programatically change the .net version of the virtual directory that I am creating within a aspx page. As part of creating a new customer in my asp.net 2 application, it...
0
by: David | last post by:
I cannot get a simple changing of a SelectCommand for a SqlDataSource used in a drop-down list to work. If I do the same process to my GridView SqlDataSource it works fine. Can anyone help? I am...
10
by: sbaker8688 | last post by:
My God, how on earth do you use javacript to change the text color of an input element, and have it work with IE??? I've tried numerous solutions. All of them work on browsers such as Mozilla. ...
4
by: VK | last post by:
As per discussion in the thread http://groups.google.com/group/comp.lang.javascript/browse_frm/thread/117e4f3a30f4d1c3 I'm proposing to add new FAQ entry: ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.