Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hello, I'm doing this:
1- Using impesonation (...)
{
2- define process info (filename = path/winword.exe, arguments
= myfile.doc)
3- ProcessStartInfo.LoadUserProfile = false
4- ProcessStartInfo.UseShellExecute = false
5- process.start
}
and I'm getting this error:
"There is not enough memory or disk space to run Word."
Thanks in advance

The code is:
C#
using (new Impersonator(user_name, domain, password))
            {
                System.Diagnostics.Process proc = new System.Diagnostics.Process();
                proc.StartInfo.UseShellExecute = false;
                proc.StartInfo.LoadUserProfile = false;
                proc.StartInfo.FileName = "C:\\Program Files\\Microsoft Office\\Office12\\WINWORD.exe";
                proc.StartInfo.Arguments = path + filename
                try
                {
                    proc.Start();
                }
                catch (Exception e)
                {
                    MessageBox.Show(e.ToString());
                }

            }
Posted
Updated 9-Feb-12 19:24pm
v2
Comments
Catalin Serafimescu 9-Feb-12 13:30pm    
Please post the code for impersonation. You might not have a good handle
Sergey Alexandrovich Kryukov 9-Feb-12 14:00pm    
Why? why?!
--SA
hhseiki 14-Feb-12 1:39am    
I didn't understandwhat are inquiring about? The above code showed the following error: "There is not enough memory or disk space to run Word" eventhough when accessing it through windows explorer with the impersonated user it opens normally.
NB. My problem is not in the winword.exe but with the network path of the file.
BillWoodruff 10-Feb-12 2:51am    
What exactly is your goal here: you want to launch Word, on your own machine, or someone else's ? And ... then ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900