Link to home
Start Free TrialLog in
Avatar of techsolgroupnj
techsolgroupnj

asked on

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
Avatar of Luniz2k1
Luniz2k1

Your script could be configured to copy the .lnk file to C:\%windir%\desktop\
Avatar of techsolgroupnj

ASKER

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.
for the current user I am not sure if %userprofile%\Desktop works on 98 or Me but might be worth checking.
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.
ASKER CERTIFIED SOLUTION
Avatar of DVation191
DVation191

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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\
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
Exactly
Thanks to everyone for your help on this.  The script works great.
you are very welcome. glad it works.