Code: Select all
run "c:\Programas\Sandboxie\start.exe" RunDLL32.EXE SHELL32.DLL,OpenAs_RunDLL <curitem>;
Code: Select all
run ""c:\Programas\Sandboxie\start.exe" "RunDLL32.EXE SHELL32.DLL,OpenAs_RunDLL <curitem>";
Code: Select all
run "c:\Programas\Sandboxie\start.exe" RunDLL32.EXE SHELL32.DLL,OpenAs_RunDLL <curitem>;
Code: Select all
run ""c:\Programas\Sandboxie\start.exe" "RunDLL32.EXE SHELL32.DLL,OpenAs_RunDLL <curitem>";
Going by the help file, perhaps (I'm having some trouble testing this) something like this:tiago wrote:I'm sure this is just a matter of right quoting I'm not going to make it work, so I'm asking a little help.
pops a warning on "system cannot locate the file".Code: Select all
run "c:\Programas\Sandboxie\start.exe" RunDLL32.EXE SHELL32.DLL,OpenAs_RunDLL <curitem>;
almost does, opening windows explorer instead like in my first attempts to get a working formula for openwith menu.Code: Select all
run ""c:\Programas\Sandboxie\start.exe" "RunDLL32.EXE SHELL32.DLL,OpenAs_RunDLL <curitem>";
Code: Select all
run '"c:\Programas\Sandboxie\start.exe" "RunDLL32.EXE SHELL32.DLL,OpenAs_RunDLL" <curitem>';
Should this not work, my first suspect would be the <curitem> parameter which may need to be within the double quotes for the RunDLL32.exe-command.(2) Quoting items with blanks slightly differs:
run '"C:\With Blank.txt"'
Names with blanks must be quoted. Note that the quotes have to be wrapped in single-quotes because an argument's outer quotes are auto-stripped by XY's script parser!
run '"C:\Program Files\Winzip32.exe" -min'
Also wrapped in single-quotes because otherwise the "-" in "-min" would be interpreted as a math operater.
Code: Select all
run """c:\Programas\Sandboxie\start.exe"" RunDLL32.EXE SHELL32.DLL,OpenAs_RunDLL ""<curitem>""";
Code: Select all
run """c:\Programas\Sandboxie\start.exe"" RunDLL32.EXE SHELL32.DLL,OpenAs_RunDLL <curitem>";
Code: Select all
rundll32.exe shell32.dll,OpenAs_RunDLL "rundll32.exe"
Code: Select all
rundll32.exe shell32.dll,OpenAs_RunDLL rundll32.exe
Code: Select all
run "c:\Programas\Sandboxie\start.exe" RunDLL32.EXE SHELL32.DLL,OpenAs_RunDLL <curitem>;
The problem here is XY is attempting to guess where the first parameter of run ends. Outside of a quoted string the periods and comma signify concatenation and parameter delimiter respectively. Hence the resolved command removes the periods in RunDLL32.exe and Shell32.dll, and treats OpenAs... as your input for run's directory parameter.Parsed & Resolved:
run
----
"c:\Programas\Sandboxie\start.exe" RunDLL32EXE SHELL32DLL
----
OpenAs_RunDLL D:\test.txt
Code: Select all
run ""c:\Programas\Sandboxie\start.exe" "RunDLL32.EXE SHELL32.DLL,OpenAs_RunDLL <curitem>";
This one really throws XY for a loop. The "" at the start opens and closes a string. The C:\... isn't in the string, then the period in start.exe tells XY to concatenate strings, " " is another string, and RunDLL... is outside of the string. It's just terribly malformed, and as you'll notice stepping through it causes a number of overflow errors as XY tries to figure it out.Parsed & Resolved:
run
----
exe" "RunDLL32EXE SHELL32DLL
----
OpenAs_RunDLL D:\test.txt";
Code: Select all
run '"c:\Programas\Sandboxie\start.exe" "RunDLL32.EXE SHELL32.DLL,OpenAs_RunDLL" <curitem>';
This one gets close but the use of single quotes '...' as the outer quotes means XY doesn't resolve any variables within the string. If start.exe can handle the passed parameters ("RunDLL32.EXE SHELL32.DLL,OpenAs_RunDLL" <curitem>) then it's going to be passing <curitem> literally to RunDLL/Shell32 instead of resolving it to D:\test.txt.Parsed & Resolved:
run
----
"c:\Programas\Sandboxie\start.exe" "RunDLL32.EXE SHELL32.DLL,OpenAs_RunDLL" <curitem>
Code: Select all
run """c:\Programas\Sandboxie\start.exe"" RunDLL32.EXE SHELL32.DLL,OpenAs_RunDLL ""<curitem>""";
This is even closer but for whatever reason RunDLL32.exe doesn't handle the quotes around D:\test.txt like most other apps, for better or worse.Parsed & Resolved:
run
----
"c:\Programas\Sandboxie\start.exe" RunDLL32.EXE SHELL32.DLL,OpenAs_RunDLL "D:\test.txt"
Code: Select all
run """c:\Programas\Sandboxie\start.exe"" RunDLL32.EXE SHELL32.DLL,OpenAs_RunDLL <curitem>";
So why does this work? The outermost quotes tells XY this is the entire parameter, and since they are double quotes XY also parses and expands <curitem> to D:\test.txt. We must surround start.exe with quotes because we're also passing arguments to it, and double quotes are preferred (by Windows) so we need to escape them by doubling them up inside the string. start.exe and rundll32.exe seem to function just fine without their arguments being quoted so we don't bother adding more, but if they needed the arguments quoted we could surround them like we did start.exe.Parsed & Resolved:
run
----
"c:\Programas\Sandboxie\start.exe" RunDLL32.EXE SHELL32.DLL,OpenAs_RunDLL D:\test.txt
Code: Select all
run """app"" arg1 argN";
run """app"" ""arg1"" ""argN""";
Code: Select all
run quote("app" arg1 argN);
run quote("app" "arg1" "argN");
Code: Select all
quote(a.b,c.d); //won't give you "a.b,c.d" but instead results in "ab".
quote(a;); //isn't even valid.