Can't call function withou double quotes?

  • Thread starter Thread starter Bruce D
  • Start date Start date
B

Bruce D

I'm calling another .exe in my program. The .exe needs 1 parameter and it
needs double quotes around it. I can't figure this simple one out...can you
help?

Dim objRS2 As New Process
objRS2.Start("restartservice.exe ColdFusion MX Application Server")
' needs to be something like objRS2.Start("restartservice.exe "ColdFusion MX
Application Server"")


TIA
-bruce
 
Two ways I can think of:

objRS2.Start("restartservice.exe ""ColdFusion MX Application Server""
")
(Note the two double-quotes surrounding your parameter)

Another, perhaps more robust method would be to use a Service
controller component to handle the ColdFusion App Server, as long as
the ColdFusion App Server shows up as a Service for Windows.


HTH
 
Bruce D said:
I'm calling another .exe in my program. The .exe needs 1 parameter and it
needs double quotes around it.
[...]
Dim objRS2 As New Process
objRS2.Start("restartservice.exe ColdFusion MX Application Server")
' needs to be something like objRS2.Start("restartservice.exe "ColdFusion
MX
Application Server"")

\\\
Process.Start("restartservice.exe ""ColdFusion MX Application Server""")
///

A double quote character is encoded as two consecutive double quote
characters inside the string literal.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top