Location of desktop directory

I'm writing a script for a marketing CD to drop a .lnk file on the desktop on a users request.  Unfortunatlely I can't exactly remember where the desktop directory is in Win98/95/ME.  I think it's C:\windows\desktop.  We would like to install this for "all users" on that machine.  Any help would be appreciated.

...Joel
techsolgroupnjAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
DVation191Connect With a Mentor Commented:
a batch file like this should work...

IF EXIST "%SYSTEMDRIVE%\Documents and Settings" COPY "Shortcut.lnk" "%ALLUSERSPROFILE%\Desktop\
ELSE COPY "Shortcut.lnk" %WINDIR%\Desktop\

didn't test it...but i think that should be sufficient
0
 
Luniz2k1Commented:
Your script could be configured to copy the .lnk file to C:\%windir%\desktop\
0
 
techsolgroupnjAuthor Commented:
For these operating systems 95/98/ME... C:\%windir%\desktop\ is the "All Users" desktop? ...For lack of a better term.  I appreciate the quick response.
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
MarinusVDCommented:
for the current user I am not sure if %userprofile%\Desktop works on 98 or Me but might be worth checking.
0
 
salvagbfCommented:
Actually, I think you can create an All Users folder in the windows folder and then create a desktop folder in there and be guarenteed that any user who logs in will get the link.  Some installs of Win9x have a profiles folder and then individual user folders in there.

I only mention creating an All Users folder because I was cleaning a machine of spyware and didn't even realize that Win98 used an all users folder until I checked in there and saw that the stupid spyware was actually loading from c:\windows\all users\start menu\programs\startup.  The one place I didn't check!

It's worth a shot.
0
 
Luniz2k1Commented:
Just so you know, "Documents and Settings" is only a directory of Windows 2000/XP/2003
For Win95/95/ME computers not using user profiles, the path is C:\%windir%\desktop\
0
 
DVation191Commented:
if the docs and settings folder doesn't exist, then its not a 2000/xp machine, so the batch runs the 'else' which puts it in the c:\windows\desktop
so it tests for OS and installs the shortcut appropriately
0
 
Luniz2k1Commented:
Exactly
0
 
techsolgroupnjAuthor Commented:
Thanks to everyone for your help on this.  The script works great.
0
 
DVation191Commented:
you are very welcome. glad it works.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.