![]() I made a quick one line VBScript to pull info for whatever special folder you would like (no error checking though) and it works like this:Ĭreate a file "GetShellFolder.vbs" with the following line: WScript.Echo WScript.CreateObject("WScript.Shell").SpecialFolders(WScript.Arguments(0)) While I realize this is a bit of an older post, I thought this might help people in a similar situation. VS90COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\ VBOX_INSTALL_PATH=C:\Program Files\Sun\VirtualBox\ PSModulePath=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ PROCESSOR_IDENTIFIER=AMD64 Family 15 Model 67 Stepping 3, AuthenticAMD ![]() Path=C:\Windows\system32 C:\Windows C:\Windows\System32\Wbem C:\Windows\System32\WindowsPowerShell\v1.0\ C:\Program Files\TortoiseSVN\bin C:\Program Files (x86)\CMake 2.8\bin C:\Program Files (x86)\emacs-22.3\bin C:\Program Files (x86)\GnuWin32\bin since you where specifically asking for a non-english Windows - heres is an example of my own German Edition (Window7-64bit) :ĬommonProgramFiles=C:\Program Files\Common FilesĬommonProgramFiles(x86)=C:\Program Files (x86)\Common FilesĬommonProgramW6432=C:\Program Files\Common Files This will give you an idea what environment variables are available on your system.Į.g. You could also open a DOS command prompt and execute the set command. S:\>FOR /F "usebackq delims=" %i in (`ECHO ECHO is on.`) DO SET DESKTOPDIR=%i S:\>FOR /F "usebackq tokens=3 skip=4" %i in (`REG QUERY "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folder HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Foldersĭesktop REG_EXPAND_SZ %USERPROFILE%\Desktop S:\>REG QUERY "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v Desktop ![]() I tried the following batch file: REG QUERY "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v DesktopįOR /F "usebackq tokens=3 skip=4" %%i in (`REG QUERY "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v Desktop`) DO SET DESKTOPDIR=%%iįOR /F "usebackq delims=" %%i in (`ECHO ?SKTOPDIR%`) DO SET DESKTOPDIR=%%i Is there a way I can do this in a batch file that will work on any internationalized version? However, I'm thinking, that's probably only going to work on an English OS. I'm writing a Windows batch file and want to copy something to the desktop. ![]()
0 Comments
Leave a Reply. |