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?
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.
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!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.