Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. how to implement shell exec in .net... (Bug in .NET?)

how to implement shell exec in .net... (Bug in .NET?)

Scheduled Pinned Locked Moved C#
helpcsharpcomsysadminlinux
7 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jamesjk
    wrote on last edited by
    #1

    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

    C D 2 Replies Last reply
    0
    • J jamesjk

      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

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      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

      J 1 Reply Last reply
      0
      • C Christian Graus

        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

        J Offline
        J Offline
        jamesjk
        wrote on last edited by
        #3

        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

        C 1 Reply Last reply
        0
        • J jamesjk

          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

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          • J jamesjk

            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

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #5

            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

            J 1 Reply Last reply
            0
            • D Dave Kreskowiak

              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

              J Offline
              J Offline
              jamesjk
              wrote on last edited by
              #6

              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

              D 1 Reply Last reply
              0
              • J jamesjk

                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

                D Offline
                D Offline
                Dave Kreskowiak
                wrote on last edited by
                #7

                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

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups