>
>string s = "Some text in \"quotes\"";
>
>
>
>>All,
>>
>>I'm trying to create a command line Schedule task with the following code
>>
>>strCmdLine = "schtasks /s "+ sComputerName +" /create /U " + sDomainName + " /P " + sDomainPassword + " /SC " + sTime + " /TN " + strJobName + " /TR " + sFTPExecutable + " " + oData.ScheduleId + " /SD " + dtStartDate.ToString("MM/dd/yyyy") + " /ED " + dtEndDate.ToString("MM/dd/yyyy") + " /RU runasuser" + " /RP " + sDomainPassword;
>>
>>However I am can not find a way to built up my literal string is get the double quote before the executable and after the Schedule Id, I'm hoping that someone call help me out.
>>
>>schtasks /s \\whoisme /create /U WC\cevans /P password /SC WEEKLY /TN tes
>>tjobname /TR "\"c:\executable.exe 13fd18c1-cfc0-4bf7-8b7c-a2a84e97126d" /SD 03/26/2006 /ED 03/26/2006 /RU runasuser /RP password
>>
>>
>>Evans,
Einar,
I actually need away to also have the "backslash" as part of the string. For example "\"c:\executable.exe 13fd18c1-cfc0-4bf7-8b7c-a2a84e97126d" I used sFTPExecutable as the file name and oData.ScheduleId for guid, but I unable to get the "\" or the preceding single double quote. I have tried a number of ways but I have not been able to successfully the desirable results.
Evans
¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°¤º°`°º¤ø¤º°¤º°
Carl Evans
CEO & President
System Answers Consulting, Inc.
MCSD .NET, ASP.NET, C#.NET, VB.NET,