473,387 Members | 1,749 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,387 software developers and data experts.

CreateProcessAsUser Error

Jay
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 this function?

-Jay
(patelj27b at gmail dot com)

May 11 '06 #1
1 1834
"Jay" wrote:
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 this function?


Can we get a code sample? CreateProcessAsUser is a complicated API and there
are many ways to go wrong when using it. If you could show us how you are
calling it, it would narrow down the possibilities.

Also, let us know what type of user (normal user, Administrator, service,
etc.) is calling CreateProcessAsUser and what user is represented by the
hToken parameter when you call it.

Sean
May 12 '06 #2

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 ...
13
by: deko | last post by:
I use this convention frequently: Exit_Here: Exit Sub HandleErr: Select Case Err.Number Case 3163 Resume Next Case 3376 Resume Next
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...
2
by: Bill Huang | last post by:
Any one has some working C# code that calls CreateProcessAsUser() to do impersonation? 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,...
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.