Execute and Wait can not be edited

Questions about Cobian Reflector
User avatar
cobian
Site Admin
Posts: 4608
Joined: 31 Oct 2020, 01:25
Location: Sweden
Contact:

Re: Execute and Wait can not be edited

Post by cobian »

.NET initializes the variables automatically. My uneducated guess is that the existing parameter is malformed.
--
Luis Cobian
Cobian Backup's creator
Todd
Posts: 183
Joined: 01 Nov 2021, 23:30

Re: Execute and Wait can not be edited

Post 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.
User avatar
cobian
Site Admin
Posts: 4608
Joined: 31 Oct 2020, 01:25
Location: Sweden
Contact:

Re: Execute and Wait can not be edited

Post by cobian »

Hmm, have you tried with

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

?
--
Luis Cobian
Cobian Backup's creator
Todd
Posts: 183
Joined: 01 Nov 2021, 23:30

Re: Execute and Wait can not be edited

Post 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?
User avatar
cobian
Site Admin
Posts: 4608
Joined: 31 Oct 2020, 01:25
Location: Sweden
Contact:

Re: Execute and Wait can not be edited

Post by cobian »

Try it.
--
Luis Cobian
Cobian Backup's creator
Todd
Posts: 183
Joined: 01 Nov 2021, 23:30

Re: Execute and Wait can not be edited

Post 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 678 times
User avatar
cobian
Site Admin
Posts: 4608
Joined: 31 Oct 2020, 01:25
Location: Sweden
Contact:

Re: Execute and Wait can not be edited

Post 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.
--
Luis Cobian
Cobian Backup's creator
Todd
Posts: 183
Joined: 01 Nov 2021, 23:30

Re: Execute and Wait can not be edited

Post 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>
Todd
Posts: 183
Joined: 01 Nov 2021, 23:30

Re: Execute and Wait can not be edited

Post 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.
User avatar
cobian
Site Admin
Posts: 4608
Joined: 31 Oct 2020, 01:25
Location: Sweden
Contact:

Re: Execute and Wait can not be edited

Post 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
--
Luis Cobian
Cobian Backup's creator
Post Reply