New
#91
Thank you very much for your effort, we'll have to continue this later if you're still interested.
Hello @Hemimax,
I doNOT
understand that because I hardcoded yourDesktop Path
into the code as per here . . .
I tested it using my hardcodedUserName
and it worked. I also tested it on TWO other computers, which it also WORKED.
I think it has got to be something to do with your setup, whether it be to do with yourUserName
,Paths
, or something else. As I said previously, I haveNOT
had a problem with the file before.
At least you have the information that you wanted from theCMD Prompt
.
Last edited by Paul Black; 13 Sep 2021 at 17:05.
If it is not, try the following code:Download: Get_the_desktop.batCode:For /F "tokens=*" %%# in ('"PowerShell (New-Object -ComObject Wscript.Shell).SpecialFolders(4)"') Do (Set "[X]=%%#") Echo The desktop folder is "%[X]%" & Pause> nul
My above code works with a folder name consisting of two words, two spaces, and an ampersand. See below:
thana = bug locker, whose desktop path includes a junk character. See: I cant run DISM and sfc from Win PE.