Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I put a file on User's Desktop 2

Status
Not open for further replies.

TimRHSD

Programmer
Apr 18, 2002
35
US
I am trying to put a flat file on a user's desktop. Currently, I am just dumping it in 'C:\'. The application I am using only has vbScript available. Is there a way to put it on the desktop?

Thanks,

Tim
 
TimRNSD,

Did not mention your OS, so for the moment let us assume Win2k.

Since you did not mention whether or not multiple users and/or PC's are involved, we will assume one user.

We will also assume you know the users name.

In Win2k, bring up Explorer.

On the C:\drive look at Documents and Settings Folder.

Here you will have the one users logon.

If you expand the Users sub folder, (for grins lets call him Joe).

You will then see a sub folder called DESKTOP.

Save the file in that subdirectory ex.

c:\Documents and Settings\Joe\Desktop

The file will be immediately available on the desktop.

Assuming the file extension is mapped when the user clicks on it the appropriate app will open it up.

NOte: If you want all users to see this file on their desktop, instead of placing it in ..\JOE\Desktop
put it in ..\All Users\Desktop and all users when they log on will see the file. Note however, the user can delete the file, and no one will see it after that.

Hope this helps.
DougCranston
 
That worked just like I wanted. Thanks Tim
 
try this on for size...
strDesktop = WshShell.SpecialFolders("Desktop")
that should help you find the desktop
 
note: wshshell.specialfolders("desktop") will work for differnt versions of windows, in case anyone has a 98 machine that runs your scrips. much much better!


if it is to be it's up to me
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top