0v3rload Posted March 12, 2008 Posted March 12, 2008 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.
Yzöwl Posted March 12, 2008 Posted March 12, 2008 It depends on your interpretation of XP's shell; if you mean without third party utilities then yes it can be retrieved.
0v3rload Posted March 13, 2008 Author Posted March 13, 2008 It depends on your interpretation of XP's shell; if you mean without third party utilities then yes it can be retrieved.How? I'm using XP's standard command prompt (not PowerShell.)
gunsmokingman Posted March 13, 2008 Posted March 13, 2008 It depends on your interpretation of XP's shell; if you mean without third party utilities then yes it can be retrieved.How? I'm using XP's standard command prompt (not PowerShell.)Try this vbs script it has 2 examples of how to get the desktop path.Save As DesktopPath.vbsConst DESKTOP = &H10& Dim Act:Set Act = CreateObject("Wscript.Shell")Dim Dtop, DT, ShellSet Shell = CreateObject("Shell.Application")Set Dtop = Shell.Namespace(DESKTOP)Set DT = Dtop.SelfWScript.Echo Act.SpecialFolders("Desktop") & vbCrLf & DT.Path
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now