From what Greg says, the difference between Command Prompt and Shell is that Shell does not have the environment variables cmd inherits.
But I am not too sure which one would be missing. From what I can tell by comparing the output of the command set from Command Prompt and from shell, all environment variables check out.
Apparently, it is impossible to set environment variables from within the shell. It simply does not do anything.
At this point, I have to admit there seems to be no way to go around the limitations. Unless… Have you tried to create a batch file called for instance test.bat with inside
cd C:\\DOCUME~1\\Eric\\??\\folder
and run it from shell as
s.execute("cmd /c test")
With some luck, cmd will understand better called that way.
I realize I already made the batch suggestion above. But that is really the very last idea I have.
If that did not work, since apparently specialfolder.desktop does work fine, maybe you want to refactor your code to do what you need to do from within Xojo instead of shell. If that was not possible, then it looks as the Kobayashi Maru…
Here’s a wild guess, but have you enabled “Canonical” on the shell (theShell.Canonical = True)? The setting enables special characters in the shell, so it may have an unexpected affect of allowing the Unicode characters to be processed properly.