Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Win32Exception: Unknown error (0xffffffff) when trying to run process.start()

Posted on 2010-11-18
Medium Priority
Last Modified: 2013-12-17
the following are lines I'm running in an application:
this code is running in a service. when the service is started using the  LSA (local system account) I get the following exception:
System.ComponentModel.Win32Exception: Unknown error (0xffffffff)
   at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
   at ePcontrol.FrmControlCommands.ControlTimer_Tick(Object sender, EventArgs e)
Unknown error (0xffffffff)

NO PROBLEM when running the service logged on using a user with domain admin credentials.
                            //Installing the service
                            ProcessStartInfo InstallService = new ProcessStartInfo(Application.StartupPath + "\\ePagntSv.exe", " -i");
                            InstallService.WindowStyle = ProcessWindowStyle.Hidden;
                            Process pInstallService = Process.Start(InstallService);
                            InstallService = null;
                        catch (Exception ex)
                            _DoneChecking = "Yes";

                            StreamWriter SaveEx = File.AppendText(Application.StartupPath + "\\ePcontrolEx.txt");

Open in new window

Question by:OrenRozen
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3

Expert Comment

ID: 34168369
Try adding the following lines BEFORE Process.Start

InstallService.CreateNoWindow = True;
InstallService.UseShellExecute = False;

Expert Comment

ID: 34168466
If that doesn't work, perhaps you can try to execute a different exe (such as calc.exe etc.) to see if this has to do with security restrictions on the exe you are trying to launch.

Author Comment

ID: 34178868
Thanks for the help.

I'll be able to check only after the weekend.

I'd also appreciate if you'll explain why you think the following lines should work/
InstallService.CreateNoWindow = True;
InstallService.UseShellExecute = False;

I think its something to do with credentials because when I set the service to log on using a user with domain admins credentials, the application is working with no problem.
Its something with the LSA credentials but I don't know where.

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.


Expert Comment

ID: 34198223
I think that you are right about the credentials. And we might have more troubleshooting to do before this question is resolved.

The reason I suggested those two lines are the following:

//This makes sure that no UI is produced. Sometimes services that launch programs with a UI can cause errors if the service is not allowed to interact with the desktop. This is probably NOT that important, but is worth a try. However I believe launching the process as "Hidden" has the same effect.
InstallService.CreateNoWindow = True;

//This line causes the process to be started DIRECTLY from the exe you specify, instead of by using the shell. This will only matter if there are security restrictions against using the shell to launch files.
InstallService.UseShellExecute = False;

Like I said, it is possible that neither line will help. But we can at least safely and easily eliminate them as possible issues.

I think the more important test is trying to execute different exes to see if it is a permissions issue.

Accepted Solution

OrenRozen earned 0 total points
ID: 34198468
I did try these lines and it didn't solve the problem. what strange is that it is working on some servers but I get the problem on all other servers (this is a data-center of 450 servers).

any way, to solve the problem we've made a workaround because the customer got upset with this problem.
as this code is set to run on a remote server, what we did was to create and start the service from a management server to the remote server.
again, we didn't solve the problem but created a workaround. which I think is better to avoid the same issue at other customers.

I appreciate your help, but I don't have any way to continue and check this issue.

Author Closing Comment

ID: 34424578
no solution was provided.
a workaround was created

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question