I will be dealing shortly with a simple CLI installer and need to create a shortcut on the user's desktop. Trouble is the desktop is only called "Desktop" in the english version and has other language-specific names in non-english versions (ie. Portuguese: "Ambiente de Trabalho".)
So, what I would like to know is if there is a way of retrieving the path to the user's desktop using only XP's shell?
%USERPROFILE%\<desktop_string>
Many thanks.
Page 1 of 1
Desktop environment variable
#2
Posted 12 March 2008 - 12:02 PM
It depends on your interpretation of XP's shell; if you mean without third party utilities then yes it can be retrieved.
#3
Posted 12 March 2008 - 07:53 PM
#4
Posted 12 March 2008 - 09:32 PM
0v3rload, on Mar 13 2008, 03:53 AM, said:
Try this vbs script it has 2 examples of how to get the desktop path.
Save As DesktopPath.vbs
Quote
Const DESKTOP = &H10&
Dim Act:Set Act = CreateObject("Wscript.Shell")
Dim Dtop, DT, Shell
Set Shell = CreateObject("Shell.Application")
Set Dtop = Shell.Namespace(DESKTOP)
Set DT = Dtop.Self
WScript.Echo Act.SpecialFolders("Desktop") & vbCrLf & DT.Path
Share this topic:
Page 1 of 1



Help
Back to top









