Originariamente inviato da Triballo
Buongiorno a tutti volevo esporre alla vs. attenzione questo quesito:
stò realizzando una semplice applicazione che alla pressione di un pulsante mi preleva il contenuto delle caselle Text5 e Text6 e li concatena all'esecuzione di un comando...fin quì tutto bene peccato che quando nella casella Text5 inserisco caratteri come | questo non mi viene risconosciuto...come posso ovviare ? posto di seguito il codice che stò usando:
Private Sub Command7_Click()
Dim strBuff As String * 255
Dim strPath As String
Dim x As Integer
x = GetSystemDirectory(strBuff, Len(strBuff))
If x > 0 Then
x = InStr(strBuff, vbNullChar)
If x > 0 Then
strPath = Left$(strBuff, x - 1)
End If
ShellExecute Me.hwnd, "Open", strPath & "\CMD.exe", " /C C:/GUIRSSI/plink -ssh 192.168.1.11 -l " & Text3 & " -pw " & Text4 & " /opt/bin/screen -raad -X stuff '/msg " & Text5 & " xdcc send #" & Text6 & "'`echo -ne '\015'`", "C:\", SW_HIDE
End If
End Sub