Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ShellExecute to a C# exe fails - Access is denied
Message
 
 
To
12/10/2006 16:54:54
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01161572
Message ID:
01161574
Views:
12
>Why? Some sort of security as it seems but where to adjust?
>
>Reproducing:
>
>
>using System;
>using System.IO;
>
>class test
>{
>  [STAThread]
>  static void Main()
>  {
>     using (StreamWriter wr = new StreamWriter(@"c:\temp\test.txt"))
>      {
>         sw.WriteLine("Hello from C#");
>      }
>  }
>}
>
Compile with csc and try to ShellExecute from say VFP. Fails with error code 5.
>PS: Executing account is member of Administrators. Tried ngen install too.
>TIA
>Cetin

Cetin,

I wanted to try to help you but end up asking you for help :). To run the code you have above, do you create WinForm project, right? Then, where do you put the code? (Sorry for very newbie question).
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform