escape double quote in vb string

Posted by JKS on Stack Overflow See other posts from Stack Overflow or by JKS
Published on 2011-01-29T07:20:20Z Indexed on 2011/01/29 7:26 UTC
Read the original article Hit count: 203

Filed under:
|
|

i have used following piece of code to execute schtasks command from vb6 while executing it ignores folder if it contains space

For example

"C:\program files\test\test.exe" will be converted to "c:\program " how do i solve this issue?

MyAppname =  Chr(34) & App.Path & "\" & App.EXEName & ".exe" & Chr(34)
StrCommand = "schtasks /create /sc ONLOGON /RL HIGHEST  /tn myapp  /tr " & MyAppname  
Shell StrCommand, vbHide   

thanks in advance

© Stack Overflow or respective owner

Related posts about string-manipulation

Related posts about vb6