Jump to content

Recommended Posts

Posted

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.


Posted

It depends on your interpretation of XP's shell; if you mean without third party utilities then yes it can be retrieved.

Posted
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.)

Posted
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.vbs

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...