how to implement shell exec in .net... (Bug in .NET?)
-
hello frenz, I tried using Process.Start(). My application needs to run in Windows Small Business Server 2003 & when I try to call the exe(which is also a .net application) from my application, it gives me an exception. On googling came across the fact that Windows2003 does not support the Process Class with non-admin users. check this link... http://www.atalasoft.com/kb/article.aspx?id=10106&cNode=3D8W4P I came across this problem once the implementation was over & tried to use the application with a non-admin user. Please help me guys.. Can somebody work out some solution for this ? Thanks in Advance
-
hello frenz, I tried using Process.Start(). My application needs to run in Windows Small Business Server 2003 & when I try to call the exe(which is also a .net application) from my application, it gives me an exception. On googling came across the fact that Windows2003 does not support the Process Class with non-admin users. check this link... http://www.atalasoft.com/kb/article.aspx?id=10106&cNode=3D8W4P I came across this problem once the implementation was over & tried to use the application with a non-admin user. Please help me guys.. Can somebody work out some solution for this ? Thanks in Advance
jamesjk wrote:
I tried using Process.Start().
Your other option is to pinvoke ShellExecute itself.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
jamesjk wrote:
I tried using Process.Start().
Your other option is to pinvoke ShellExecute itself.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
Thanks Graus. In fact I was also thinking of the same solution. But am struck on how to pass the handle to window. could u pls help me with some code snippets Once again thanks for the suggestion
I'm not sure how you mean ? www.pinvoke.net is bound to have examples of how to use shellExecute via pinvoke.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
hello frenz, I tried using Process.Start(). My application needs to run in Windows Small Business Server 2003 & when I try to call the exe(which is also a .net application) from my application, it gives me an exception. On googling came across the fact that Windows2003 does not support the Process Class with non-admin users. check this link... http://www.atalasoft.com/kb/article.aspx?id=10106&cNode=3D8W4P I came across this problem once the implementation was over & tried to use the application with a non-admin user. Please help me guys.. Can somebody work out some solution for this ? Thanks in Advance
Actually, the problem is with the Process class under the .NET Framework 1.0 and 1.1 (Visual Studio .NET 2002 and 2003). The Process class depends on getting process information from the Performance Counters. But, Windows Server 2003 doesn't support giving performance counter information to non-Admin users, so it breaks the functionality of the Process class. This problem was fixed in the .NET Framework 2.0 (Visual Studio .NET 2005) because the Process class was re-written to not depend on the performance counter information.
Dave Kreskowiak Microsoft MVP - Visual Basic
-
Actually, the problem is with the Process class under the .NET Framework 1.0 and 1.1 (Visual Studio .NET 2002 and 2003). The Process class depends on getting process information from the Performance Counters. But, Windows Server 2003 doesn't support giving performance counter information to non-Admin users, so it breaks the functionality of the Process class. This problem was fixed in the .NET Framework 2.0 (Visual Studio .NET 2005) because the Process class was re-written to not depend on the performance counter information.
Dave Kreskowiak Microsoft MVP - Visual Basic
Thanks Dave.. That was quite informative... I'm using framework 1.1 for my application.. I'm not at all familiar with framework 2.0.. So could you pls tell me Can my problem be solved just by compiling my application with frame work 2.0. Would there be any kind of migration issues? Since I'm in a desparate situation would appreciate each and every support given by U. Once again Thanks for the support
-
Thanks Dave.. That was quite informative... I'm using framework 1.1 for my application.. I'm not at all familiar with framework 2.0.. So could you pls tell me Can my problem be solved just by compiling my application with frame work 2.0. Would there be any kind of migration issues? Since I'm in a desparate situation would appreciate each and every support given by U. Once again Thanks for the support
jamesjk wrote:
pls tell me Can my problem be solved just by compiling my application with frame work 2.0.
Possibly.
jamesjk wrote:
Would there be any kind of migration issues?
The only way to tell is to try it. There ARE breaking changes between .NET 1.x and 2.0.
Dave Kreskowiak Microsoft MVP - Visual Basic