Questions tagged [createprocessasuser]
114 questions
0
votes
0 answers
Standard output from CreateProcessAsUser Always Empty in C#
The first Call to Launch Method Write Into file echo1, but I can't capture the standard output of the second line of the test, what I am doing wrong?
[TestMethod]
public void Launch()
{
var resp =…

Zaha
- 846
- 10
- 21
0
votes
2 answers
Win32 - Launching a highestAvailable child process as a normal user process
Suppose your Windows user account is in the Admin group, UAC is enabled, and you're running some program A with normal user privileges. A never asks for elevation and never receives it. Now suppose A wants to launch program B, which has…

mjr
- 3
- 4
0
votes
0 answers
Print Pdf from windows service and keep working after logoff
I am creating a windows service that will print pdf in time interval.
I have done some research on this and found a class
public class ProcessStarter : IDisposable
{
#region Import Section
private static uint STANDARD_RIGHTS_REQUIRED =…

Manoj
- 4,951
- 2
- 30
- 56
0
votes
1 answer
Running user process cmd.exe from Windows C# services
I am building a Windows Service. It needs to run a command using current user privileges and delete all stored credentials which matches a substring - e.g. "MYSTRING".
I have invoked other modules in CreateProcessAsUser method which does work.…

Indranil
- 1,776
- 1
- 17
- 22
0
votes
1 answer
My Application goes to Service Session (instead of console)
I write a service and want to run an application (with GUI) from it. So I write a procedure like below. my application start but still in service session! and so i can't see it's GUI.
Any help please.
Procedure RunAppFromService(Path, FileName:…

Reza Sadigh
- 51
- 5
0
votes
2 answers
CreateProcessAsUser failing with 1349 :The type of the token is inappropriate for its attempted use
Creating a token using OpenThreadToken() and then passing it to CreateProcessAsUser is failing with:
1349:The type of the token is inappropriate for its attempted use.
It is successful on one machine but failing on other win2008r2.
The…

user5327778
- 19
- 1
- 5
0
votes
1 answer
CreateProcessAsUser is successful, but no process is created
We have a service application which spawns a process in the console session (WTSGetActiveConsoleSessionId) to allow for a desktop control style access to the machine. This works well in most situations however there are some VM's which appear to…

Ross Harvey
- 11
- 4
0
votes
2 answers
Create Process with FS Virtualization Enabled
With UAC disabled, I need to create a process with the same characteristics as the process created with UAC enabled - basically I'm emulating process creation with UAC enabled.
My only roadblock is virtualization. The sample code below should…

amcorn3
- 3
- 2
0
votes
1 answer
OpenMutex fails in process opened with CreateProcessAsUser
I've been banging my head on this for days, and I must have read every page on the Internet even remotely related, but I still can't find an answer. Help!
Here's the scenario: In Windows 7, I have a process running under an admin user account (not…

Brian
- 1
0
votes
1 answer
Is it possible silently run something as Administrator
How to trick UAC in Vista and Windows 7?
How can I run something that needs not just administrator rights, but especially must be told to run as Administrator.
I've tried start a process with given admin credentials, and even tried to use win32…

iLemming
- 34,477
- 60
- 195
- 309
0
votes
1 answer
.NET application crash after createprocessasuser
i have a service which is running in the System account, which should start a application in user mode. In c++ no problem but in .NET i had a lot.
At the end i duplicate the user token of the current user session (explorer.exe)
The application…

usurpbrain
- 21
- 2
0
votes
1 answer
Start process with full rights and environment
I have a windows service running under a user account other than LocalSystem, let's assume the user mydomain\svcUser.
The service spawns a new process P using Process.Start(...). The process P makes usage of the default Outlook Profile defined under…

Adi
- 5,113
- 6
- 46
- 59
0
votes
1 answer
how can a I use createpcocess to redirect the created process's stdout and stderr to a string stream?
Here is the problem, I want to use createprocess to run a command in a win32 console program, but I want to be able to search through the stdout, stderr, and stdin after modifying data being sent in to the process. This is so I can do some things…

Rusty Weber
- 1,541
- 1
- 19
- 32
0
votes
1 answer
Impersonated process will not log on to Oracle with Windows Authentication
I am running a asp .net web service on IIS7. The latter is running on a Windows 2008 R2 Server. IIS7/the web service is configured for asp .net impersonation. The worker process owner is set to NETWORK SERVICE.
The web service invokes sqlplus.exe…

Supaplex
- 1
- 1
0
votes
2 answers
CreateProcessAsUser - Error 1305
I have service and I need to run gui application with current user priveleges from this service. This is my code and it always returns GetLastError with 1305 CreateProcessAsUser fucntion. How I can fix it or may be my code isn't right and you can…

Magog
- 485
- 4
- 13