473,661 Members | 2,522 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CreateProcessWi thLogonW() Problem (advapi32.dll)

Dear All
I am already using CreateProcessWi thLogonW() to create a process under an
specific user but when i try to load that program again from an xml file I
get an error like this. File not found. I mean the executable file is not
recognized. until I open the open dialog and go to the folder of the program
and this time the program starts the saved program. Do you know what is the
problem?
This problem does not exist for the executable files in Windows directory.
Thanx


Nov 15 '05 #1
1 3381
Alireza,

You should use the full path name of the file you want to execute. The
reason it probably works if it is in the Windows directory is because that
directory is set in the PATH environment variable. If you use the full
path, then you shouldn't have a problem with this.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Alireza Haghshenass" <al*******@hotm ail.com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
Dear All
I am already using CreateProcessWi thLogonW() to create a process under an
specific user but when i try to load that program again from an xml file I
get an error like this. File not found. I mean the executable file is not
recognized. until I open the open dialog and go to the folder of the program and this time the program starts the saved program. Do you know what is the problem?
This problem does not exist for the executable files in Windows directory. Thanx

Nov 15 '05 #2

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

Similar topics

3
11162
by: Rich | last post by:
I have a block of code that encrypts passwords before storing them it an access database. It works fine on my pc, however on my client they get the following error on the last line of code when entering a password. Error - "run-time error '87' application-defined or object-defined error"
1
3422
by: Arne | last post by:
Hi, I'm working on an asp.net application that reads a users username and password, and starts a process with the username read. The problem is that the program returns value 2(ERROR_FILE_NOT_FOUND). Here's my code: public class Class1 {
3
814
by: Zeno Lee | last post by:
I'm trying to authenticate a user against a windows network. I want it to work across any kind of windows network from NT 4.0 up to Windows 2003 ADS. So far I've been using DirectoryEntry and DirectorySearcher and doing a search on Active Directory. With the addition of a customer on an NT 4.0 network, I've had to add DllImport using LogonUser() from advapi32.dll in addition to the directory search. To simplify my code, Is it...
2
9352
by: Bilal Dinc | last post by:
Hey, I have a question concerning the CreateProcessWithLogonW function imported from the advapi32 dll. For some reason I cant get the appName and cmdLine paramters to work together. For example, I'm trying to use the Perforce command line utility (p4.exe) to download some files to the local computer. So I set appName="p4.exe" and cmdLine="print -o \"c:\\file.txt\" -q \"//depot/files/file.txt\"". So then I call...
10
5379
by: David Davidson | last post by:
I am attempting to use CreateProcessWithLogonW from the server-side code of a web page (yes, I want to create a process on the server) and not having much luck. I am attempting to run VPScan, an unsupported command-line virus scanner from Symantec, to check an uploaded file for viruses. At first, I wrapped VPScan with a DLL and ran it as a COM+ component and found that it would work only when someone was logged on and it was set to run...
3
2320
by: Benjamin Bittner | last post by:
Hallo NG, I have problems with calling the CreateProcessWithLogonW() function. I tried converting an VB6 example (http://support.microsoft.com/default.aspx?scid=kb;en-us;285879) and some snippets i found around the web. but i cant get it to work. It tries to start the application, but it fails. In my eventlog i can see a new info message, everytime i execute my code. i try to translate it, cause i have a german windows installed, so it...
2
4524
by: Podi | last post by:
I have ctypes version 0.9.6 and Python 2.4.2 running on Windows XP Professional. When I tried to use some functions in the Advapi32.dll, some functions are available and some are not. Is this a bug or feature by design? In the example below, I am trying to examine the 'InitiateSystemShutdown' function which is from Advapi32.dll as advertised by Microsoft...
1
7074
by: raam_kimi | last post by:
Hi All I got some problem in importing advapi32.dll when i call the LogonUser method it throws an error like this 'Unable to find an entry point named LogonUser in DLL advapi32.dll.' this is the Exception An unhandled exception of type 'System.EntryPointNotFoundException' could anyone help me to fix this...
0
1579
by: Silke Anita Mühlemann | last post by:
Hi there, I'm trying to encrypt Files with EFS, by using functions of the advapi32 dll. But I have problems with the function 'AddUsersToEncryptFile'. I have the name of the file which I want to encrypt and the accountname of the users who should added to the file as an allowed user. Now I try with the function 'LookupAccountName' to get the SID of the user, that works fine. But now I don't know how to get the certificate of the user...
0
8343
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8855
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8758
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8545
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7364
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5653
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4346
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1986
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1743
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.