Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > microsoft.public.scripting.vbscript > #12101

Re: Trick to know whether a command line parameter is quoted or not?

From "Mayayana" <mayayana@invalid.nospam>
Newsgroups microsoft.public.scripting.vbscript
Subject Re: Trick to know whether a command line parameter is quoted or not?
Date 2019-04-22 08:53 -0400
Organization A noiseless patient Spider
Message-ID <q9kdkn$3l0$1@dont-email.me> (permalink)
References <14dzse2vcwse3.2bqofza8ospq$.dlg@40tude.net>

Show all headers | View raw


This works for me, even though it's a pain in the neck:

Dim SH, Qt
Set SH = CreateObject("WScript.Shell")
Qt = Chr(34)
SH.Run "C:\windows\desktop\testcom.exe abc " & Qt & "def ghi" & Qt & " " & 
Qt & "abc" & Qt
Set SH = Nothing

I wrote a VB program to test it. testcom.exe contains
only:

Sub Form_Load()
  Dim sCom as string
  sCom = Command()
  MsgBox sCom
  Unload Me
End Sub

Back to microsoft.public.scripting.vbscript | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Trick to know whether a command line parameter is quoted or not? JJ <jj4public@vfemail.net> - 2019-04-21 19:17 +0700
  Re: Trick to know whether a command line parameter is quoted or not? "R.Wieser" <address@not.available> - 2019-04-21 15:34 +0200
    Re: Trick to know whether a command line parameter is quoted or not? "R.Wieser" <address@not.available> - 2019-04-21 15:39 +0200
    Re: Trick to know whether a command line parameter is quoted or not? JJ <jj4public@vfemail.net> - 2019-04-22 19:07 +0700
      Re: Trick to know whether a command line parameter is quoted or not? "R.Wieser" <address@not.available> - 2019-04-22 15:37 +0200
        Re: Trick to know whether a command line parameter is quoted or not? JJ <jj4public@vfemail.net> - 2019-04-23 22:51 +0700
  Re: Trick to know whether a command line parameter is quoted or not? "Mayayana" <mayayana@invalid.nospam> - 2019-04-21 10:09 -0400
    Re: Trick to know whether a command line parameter is quoted or not? JJ <jj4public@vfemail.net> - 2019-04-22 19:08 +0700
  Re: Trick to know whether a command line parameter is quoted or not? "Mayayana" <mayayana@invalid.nospam> - 2019-04-22 08:53 -0400

csiph-web