473,407 Members | 2,359 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,407 software developers and data experts.

CreateProcessAsUser()

Any one has some working C# code that calls
CreateProcessAsUser() to do impersonation?

Thanks

Bill
Nov 15 '05 #1
2 15066
Bill, always ask google first. Here's some code Google found.

http://www.dotnet247.com/247referenc...32/160308.aspx

Make sure to make the changes that Mattias suggests.

--
Greg Ewing [MVP]
http://www.citidc.com

"Bill Huang" <yh**@cs.virginia.edu> wrote in message
news:01****************************@phx.gbl...
Any one has some working C# code that calls
CreateProcessAsUser() to do impersonation?

Thanks

Bill

Nov 15 '05 #2
Bill, here's another sample from Willy.

http://groups.google.com/groups?hl=e...%40tkmsftngp02

--
Greg Ewing [MVP]
http://www.citidc.com

"Bill Huang" <yh**@cs.virginia.edu> wrote in message
news:01****************************@phx.gbl...
Any one has some working C# code that calls
CreateProcessAsUser() to do impersonation?

Thanks

Bill

Nov 15 '05 #3

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

Similar topics

4
by: Pete Fong | last post by:
Dear all, I am a beginner with Python. I want to write a program as "runas" in Windows XP. But I have got the following error: File...
0
by: Balamurugan KR | last post by:
I am trying to impersonate and start a new process using the following steps. 1. LogonUser 2. LoadUserProfile 3. CreateEnvironment Block 4. CreateProcessAsUser. The above works fine if the ...
1
by: Maya | last post by:
Hello, I have three questions, and any answer might help :) 1. I have the following situation: I have application that is launched from the SYSTEM User, so it runs under this user too. That of...
0
by: Bill | last post by:
Does anyone have any working code of creatProcessAsUser() in C#? I looked some samples on the web, none really working. Thanks Bill
3
by: Bo | last post by:
In my asp.net webservice application, I need to launch a DOS process as authorized users. To impersonate users, I use <impersonation = true> in my webconfig. I can't use Diagnostics.Process.Start,...
1
by: Jay | last post by:
Hey There, I am trying to execute the CreateProcessAsUser function, but when I do, I get this error: "Cannot create a file when that file already exists.". What would cause that error to occur in...
0
by: robgallen | last post by:
I'm having a wierd issue trying to launch a robocopy process via a web form. To cut a long story short, it works fine when I run it from the server it is hosted on, but when I access the site from...
0
by: EricBlair | last post by:
Hello, I wrote a windows service that is supposed to start an interactive GUI app. I realize a service will not readily do this so I've pieced together the code below to bypass that. However, the...
0
by: =?Utf-8?B?Qm9iaWw=?= | last post by:
I run under SYSTEM account the code posted below. My goal is run an executable in a specific user context. With Windows XP works fine but with Vista the executable doesn't run. anyone can help me?...
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: 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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.