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. working with strings

working with strings

Scheduled Pinned Locked Moved C#
jsonhelpquestion
6 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.
  • S Offline
    S Offline
    shezh
    wrote on last edited by
    #1

    Hi, I'm starting a process with ProcessStartInfo, setting the 'Arguments' property to a filepath to the file I want to start the process with. However, the process I start is complaining about the filepath - since the filepath has spaces in it, it only seems to pass to the process the filepath upto the first space, and then ignores the rest. The process I'm trying to start is regsvr32.exe and the argument is a filepath to a dll I want to register. Could anyone please help me? Thanks a lot, Shehzad

    A S S 3 Replies Last reply
    0
    • S shezh

      Hi, I'm starting a process with ProcessStartInfo, setting the 'Arguments' property to a filepath to the file I want to start the process with. However, the process I start is complaining about the filepath - since the filepath has spaces in it, it only seems to pass to the process the filepath upto the first space, and then ignores the rest. The process I'm trying to start is regsvr32.exe and the argument is a filepath to a dll I want to register. Could anyone please help me? Thanks a lot, Shehzad

      A Offline
      A Offline
      alexey N
      wrote on last edited by
      #2

      Use quotes: regsvr32 "C:\My folder\myLib.dll" In parameters "\"C:\\My folder\\myLib.dll\""; Best regards, Alexey. -- modified at 7:18 Tuesday 18th April, 2006

      1 Reply Last reply
      0
      • S shezh

        Hi, I'm starting a process with ProcessStartInfo, setting the 'Arguments' property to a filepath to the file I want to start the process with. However, the process I start is complaining about the filepath - since the filepath has spaces in it, it only seems to pass to the process the filepath upto the first space, and then ignores the rest. The process I'm trying to start is regsvr32.exe and the argument is a filepath to a dll I want to register. Could anyone please help me? Thanks a lot, Shehzad

        S Offline
        S Offline
        Stefan Troschuetz
        wrote on last edited by
        #3

        Maybe it works if the Arguments string includes quotation marks: startInfo.Arguments = "\"c:\My File.txt\"";


        www.troschuetz.de

        A 1 Reply Last reply
        0
        • S Stefan Troschuetz

          Maybe it works if the Arguments string includes quotation marks: startInfo.Arguments = "\"c:\My File.txt\"";


          www.troschuetz.de

          A Offline
          A Offline
          alexey N
          wrote on last edited by
          #4

          You skipped extra slash: startInfo.Arguments = "\"c:\\My File.txt\""; Best regards, Alexey.

          S 1 Reply Last reply
          0
          • A alexey N

            You skipped extra slash: startInfo.Arguments = "\"c:\\My File.txt\""; Best regards, Alexey.

            S Offline
            S Offline
            Stefan Troschuetz
            wrote on last edited by
            #5

            Ups :-O Thanks for the addition. Hopefully my silly fault didn't cost the questioner some valuable time.


            www.troschuetz.de

            1 Reply Last reply
            0
            • S shezh

              Hi, I'm starting a process with ProcessStartInfo, setting the 'Arguments' property to a filepath to the file I want to start the process with. However, the process I start is complaining about the filepath - since the filepath has spaces in it, it only seems to pass to the process the filepath upto the first space, and then ignores the rest. The process I'm trying to start is regsvr32.exe and the argument is a filepath to a dll I want to register. Could anyone please help me? Thanks a lot, Shehzad

              S Offline
              S Offline
              shezh
              wrote on last edited by
              #6

              Thanks a lot for your help guys, your advice seems to have done the trick!! Thank you!:-D

              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