![]() |
| Multiple "%SANDBOX%" in "Delete Command" |
|
tzuk
|
Your quote shows the %SANDBOX% was replaced twice correctly. That's the end of the story as far as I'm concerned. The DeleteCommand isn't a command processor, it just runs one program. So the program you're running is cmd.exe and you pass &&s and you see that cmd.exe isn't handling the &&s correctly. Ok, but why are you complaining here, implying that DeleteCommand is broken? Just use a batch file and move on.
|
||||||||||||
|
_________________ tzuk |
|||||||||||||
|
lwc
|
Using "&&" was just an example. Problems occur whenever you use the word "%SANDBOX%" more than once (e.g. "%ComSpec%" /c copy "%SANDBOX%\RegHive" "%SANDBOX%\foobar.txt".
Hmm, I think I understand now. Sandboxie renames the sandbox before launching the "Delete Command". Therefore, "%SANDBOX%" actually stands for the renamed (temporary) name and not the original name. So basically what I would have wanted is: "%ComSpec%" /c copy "%SANDBOX%\RegHive" "%ORIGINAL_NAME_OF_SANDBOX%\foobar.txt". Alas, there's no such thing as "%ORIGINAL_NAME_OF_SANDBOX%". |
||||||||||||
|
|
|||||||||||||
|
tzuk
|
One more thing to take into account is that you get the "Delete Command failed: xxxxx" message box if the command launched returns a non-zero return code. I'm not adding %ORIGINAL_NAME_OF_SANDBOX%; I'm not even sure that I agree with your use of DeleteCommand to populate the sandbox.
Again I say: Use a batch file. Here is an exercise for you to try in a command prompt window:
See, you can manufacture your own %ORIGINAL_NAME_OF_SANDBOX% without my help. (If you're going to put that in a batch file, you may need to change the %A's into %%A's. I think I remember something about batch files requirement for two percent marks there.) |
||||||||||||||
|
|
|||||||||||||||
|
lwc
|
That's because I haven't found an external equivalent for "Auto Exec" (that could run CMD in order to duplicate sandboxes). Anyway, your commands work for "__Delete_DefaultBox_01C87E1832BF7182" but not for what what Sandbox actually is: "c:\sandbox\%username%\__Delete_DefaultBox_01C87E1832BF7182" - do you know how to make it work then? Thanks. |
||||||||||||||
|
Last edited by lwc on Tue Mar 04, 2008 9:07 pm; edited 1 time in total |
|||||||||||||||
|
tzuk
|
Come on now ... I was only making the point that you can take the %SANDBOX% and parse it anyway you want, and you don't need me to make changes to Sandboxie for that. I didn't mean that I was going to do it for you.
Nevertheless I'm going to assume that this is the last question on this issue, so I will extend my example:
%BOXNAME% will be DefaultBox. |
||||||||||||||
|
|
|||||||||||||||
|
lwc
|
Okay, there's no more need for you to reply to this topic anymore, but I've just discovered tokens=3 does the job too.
So I've updated the duplicating sandboxes' topic accordingly. |
||||||||||||
|
|
|||||||||||||
| Multiple "%SANDBOX%" in "Delete Command" |
|
||
|


Use the RSS feed to watch this topic for replies