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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Process.Start() not working on windows 2000

Process.Start() not working on windows 2000

Scheduled Pinned Locked Moved C#
help
3 Posts 3 Posters 1 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.
  • M Offline
    M Offline
    mohamed seif
    wrote on last edited by
    #1

    I have a simple application that takes a folder path and open in the windows explorer. Here is the code i use Process p = new Process(); p.StartInfo.FileName = "explorer.exe"; p.StartInfo.Arguments = strFilePath; p.Start(); The problem is that when the filepath contains spaces it works just fine on my xp machine but on my clients machine which use windows 2000 the application fthrows the exception filenotfound. I would like to know why it works on xp and doesn't on windows 2000

    A D 2 Replies Last reply
    0
    • M mohamed seif

      I have a simple application that takes a folder path and open in the windows explorer. Here is the code i use Process p = new Process(); p.StartInfo.FileName = "explorer.exe"; p.StartInfo.Arguments = strFilePath; p.Start(); The problem is that when the filepath contains spaces it works just fine on my xp machine but on my clients machine which use windows 2000 the application fthrows the exception filenotfound. I would like to know why it works on xp and doesn't on windows 2000

      A Offline
      A Offline
      albCode
      wrote on last edited by
      #2

      try by this ... p.StartInfo.FileName = "iexplorer.exe"; ... _____________________ Proud to be Albanian _____________________

      1 Reply Last reply
      0
      • M mohamed seif

        I have a simple application that takes a folder path and open in the windows explorer. Here is the code i use Process p = new Process(); p.StartInfo.FileName = "explorer.exe"; p.StartInfo.Arguments = strFilePath; p.Start(); The problem is that when the filepath contains spaces it works just fine on my xp machine but on my clients machine which use windows 2000 the application fthrows the exception filenotfound. I would like to know why it works on xp and doesn't on windows 2000

        D Offline
        D Offline
        Dan Neely
        wrote on last edited by
        #3

        Have you tried wrapping the path with embedded quotes. "\"path with spaces\myapp.exe\"" -- modified at 11:04 Thursday 16th March, 2006 More generally, paste the exact string you send to the process class into the run dialog and see what happens there.

        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