Solved

Location of desktop directory

Posted on 2004-08-26
10
313 Views
Last Modified: 2010-05-18
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
0
Comment
Question by:techsolgroupnj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +2
10 Comments
 
LVL 5

Expert Comment

by:Luniz2k1
ID: 11902562
Your script could be configured to copy the .lnk file to C:\%windir%\desktop\
0
 

Author Comment

by:techsolgroupnj
ID: 11902733
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
 
LVL 2

Expert Comment

by:MarinusVD
ID: 11903067
for the current user I am not sure if %userprofile%\Desktop works on 98 or Me but might be worth checking.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 6

Expert Comment

by:salvagbf
ID: 11905502
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
 
LVL 20

Accepted Solution

by:
DVation191 earned 150 total points
ID: 11905548
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
 
LVL 5

Expert Comment

by:Luniz2k1
ID: 11908520
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
 
LVL 20

Expert Comment

by:DVation191
ID: 11908714
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
 
LVL 5

Expert Comment

by:Luniz2k1
ID: 11908869
Exactly
0
 

Author Comment

by:techsolgroupnj
ID: 11912336
Thanks to everyone for your help on this.  The script works great.
0
 
LVL 20

Expert Comment

by:DVation191
ID: 11913670
you are very welcome. glad it works.
0

Featured Post

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Often we come across situations wherein our batch files would be needing to reboot Windows for a variety of reasons. A few of them would be like: (1) Setup files have been updated whose changes can take effect only after a reboot …
In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question