Page 3 of 4

Re: Execute and Wait can not be edited

Posted: 19 Feb 2024, 11:04
by cobian
.NET initializes the variables automatically. My uneducated guess is that the existing parameter is malformed.

Re: Execute and Wait can not be edited

Posted: 27 Feb 2024, 22:29
by Todd
cobian wrote: 19 Feb 2024, 11:04 .NET initializes the variables automatically. My uneducated guess is that the existing parameter is malformed.
No symptom change in 2.6.55

The parameters are copies and pasted. This is what the command looks like. Maybe try it at your end?

Code: Select all

C:\Rakudo\bin\raku.exe C:\NtUtil\CobianWrapper.pl6 --rotates 4 --backup_path [BACKUP]\MyDocsBackup\backup1
I presume you still have access to Cobian Backup's code? If so, I never had a single issue with this under Backup. Can you compare the two against each other to see what changed?

Not that it has anything to do with this issue, but you are welcome to my code for CobianWrapper.pl6.

Re: Execute and Wait can not be edited

Posted: 28 Feb 2024, 01:34
by cobian
Hmm, have you tried with

C:\Rakudo\bin\raku.exe C:\NtUtil\CobianWrapper.pl6 "--rotates 4 --backup_path [BACKUP]\MyDocsBackup\backup1"

?

Re: Execute and Wait can not be edited

Posted: 28 Feb 2024, 06:41
by Todd
cobian wrote: 28 Feb 2024, 01:34 Hmm, have you tried with

C:\Rakudo\bin\raku.exe C:\NtUtil\CobianWrapper.pl6 "--rotates 4 --backup_path [BACKUP]\MyDocsBackup\backup1"
?
That would pile everything into the first parameter. The parameters do not have to be in order either. There are four parameters total. --help and --debug just default if you leave them off.

Do you try creating an execute and wait with my run line and then try editing it?

Re: Execute and Wait can not be edited

Posted: 28 Feb 2024, 09:53
by cobian
Try it.

Re: Execute and Wait can not be edited

Posted: 29 Feb 2024, 03:23
by Todd
cobian wrote: 28 Feb 2024, 09:53Try it.
No change:
Screenshot_2024-02-28_18-22-07.png
Screenshot_2024-02-28_18-22-07.png (33.69 KiB) Viewed 877 times

Re: Execute and Wait can not be edited

Posted: 29 Feb 2024, 08:57
by cobian
Aha...s sorry. It should be:

C:\Rakudo\bin\raku.exe "C:\NtUtil\CobianWrapper.pl6 --rotates 4 --backup_path [BACKUP]\MyDocsBackup\backup1"

Only one parameter is transmitted.

Re: Execute and Wait can not be edited

Posted: 29 Feb 2024, 11:40
by Todd
cobian wrote: 29 Feb 2024, 08:57 Aha...s sorry. It should be:

C:\Rakudo\bin\raku.exe "C:\NtUtil\CobianWrapper.pl6 --rotates 4 --backup_path [BACKUP]\MyDocsBackup\backup1"

Only one parameter is transmitted.
No symptom change <tears>

Re: Execute and Wait can not be edited

Posted: 29 Feb 2024, 11:49
by Todd
k:\Windows\NtUtil\RunLineTest.bat

Code: Select all

@echo off

echo "0   = <%0>"
echo "1   = <%1>"
echo "2   = <%2>"
echo "3   = <%3>"
echo "4   = <%4>"
echo "5   = <%5>"
echo "6   = <%6>"
echo "7   = <%7>"
echo "8   = <%8>"

Pause
Without quotes:
k:\Windows\NtUtil\RunLineTest.bat C:\NtUtil\CobianWrapper.pl6 --rotates 4 --backup_path [BACKUP]\MyDocsBackup\backup1

Code: Select all

"0   = <"K:\Windows\NtUtil\RunLineTest.bat">"
"1   = <C:\NtUtil\CobianWrapper.pl6>"
"2   = <--rotates>"
"3   = <4>"
"4   = <--backup_path>"
"5   = <[BACKUP]\MyDocsBackup\backup1>"
"6   = <>"
"7   = <>"
"8   = <>"
Press any key to continue . . .
With the quotes:
k:\Windows\NtUtil\RunLineTest.bat "C:\NtUtil\CobianWrapper.pl6 --rotates 4 --backup_path [BACKUP]\MyDocsBackup\backup1"

Code: Select all

"0   = <"K:\Windows\NtUtil\RunLineTest.bat">"
"1   = <" C:\NtUtil\CobianWrapper.pl6 --rotates 4 --backup_path [BACKUP]\MyDocsBackup\backup1">"
"2   = <>"
"3   = <>"
"4   = <>"
"5   = <>"
"6   = <>"
"7   = <>"
"8   = <>"
Press any key to continue . . .
Quoting is going to mess this up a lot.

Re: Execute and Wait can not be edited

Posted: 29 Feb 2024, 13:25
by cobian
Yes, the last one should be the way to go.

using (Process process = new Process())
{
process.StartInfo.FileName = theEvent.Parameter1;
process.StartInfo.UseShellExecute = false;

if (!String.IsNullOrEmpty(theEvent.Parameter2))
process.StartInfo.Arguments = theEvent.Parameter2; <-- the whole quoted set of parameteres assigned here

try
{
process.Start();
...
etc