Solved

Location of desktop directory

Posted on 2004-08-26
10
310 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
  • 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
error while running the scirpt 24 132
AIX  NFS  question 5 105
PXE question 7 84
Remove second installation of Windows 10 7 79
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 a recent article here at Experts Exchange (http://www.experts-exchange.com/articles/18880/PaperPort-14-in-Windows-10-A-First-Look.html), I discussed my nine-month sandbox testing of the Windows 10 Technical Preview, specifically with respect to r…
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.

808 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