Create a Shortcut on the Desktop for ALL users ?

Hello Gururs,

I need to create a batch file that will create 2 shortcuts on the desktop for the application that I have installed on the system.

my pb is that it needs to be under windows XP and windows 98 and for all the users on the system.

Thank you for your help
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


i hope that its very simple.

For XP:
first create an shortcut for the application and move the shortcut link to C:\Documents and Settings\All Users\Desktop\  folder.

For win98:
create the shortcut and move it to C:\windows\desktop\ folder.

if i am wrong please give more details about your requirement.

Well, that depends on weather or not you can use a pre-created shortcut or if the shortcut must be built dynamically. As to the latter, a special program designed for this purpose may be needed. However, if the shortcut can be pre-existing then under the admin login just copy the shortcut to the C:\Documents and Settings\All Users\Desktop folder and that should be it. I hope this helps.

Tushar Kaskhedikar
x-menIT super heroCommented:
Use the environmental variable %ALLUSERSPROFILE% as a path to the desktop.

Acronis Data Cloud 7.8 Enhances Cyber Protection

A closer look at five essential enhancements that benefit end-users and help MSPs take their cloud data protection business further.

Scott ThomsonCommented:

First off this question has been asked previously.. have you searched yet..?

Now that thats over please see the following

Option 1: SMS
you could use sms to push out the application to all machines. the good thing here is that sms is capable of distinguishing between versions of operating systems :) you could create 2 packages and deploy the appropriate packages to the corresponding operating systems

Option 2: Batch
You could use a login script to call a batch file run one time only. you could also use a switch to figure weather the operating system is xp or 98 and then run the appropriate code. This solution shouldnt be to hard.. especially if the files pre exist

If you chose to run with the batch files may i suggest you start a seperate question under Microsoft > Windows OS > MS DOS.. there are some incredible guys there that can do wonder in DOS programming :)

however i am also more than capable of creating you this script so let me know which one you wish to chose. and remember to search through EE for this question
ammounpierreAuthor Commented:
to be honest I always start by searching the archives ...but I always fail to find answers...

now to be back to my question. what i need it to be able to double click on a batch file
that would create (copy the shortcuts) to ALL users/desktop....
create a batch file (new text doc, save it as all documents with a .bat extension).


xcopy "\\PathTo\Shortcut.lnk" "%systemdrive%\Documents and Settings\All Users\Desktop" /y

that should do it, just copy and paste additional lines to add more shortcuts in the same script.
Scott ThomsonCommented:
fair eough as long as you search its all good :)

as for the copying will you be logging onto each machine..?

if so the script above will do fine from maniac 47
again however login script could do the same job with less effort to you. or you could also go with a GPO that runs once creating a schedualed task that will run at a specific time :)

let us know if you need more info we are here to help. but try to give as much detail about your situation as you can

number of computers
do you have access to AD etc..
When you said login script p1339 I was assuming it would run from the server as part of the SYSVOL login script.  We'd just have to add the entries in AD (no need to login to each PC).

If you'd prefer to have it locally on each machine, you could copy it from across the network to the same location on all PCs and configure a local login/startup policy via gpedit.msc, just a bit more work.

p1339 is correct, you'll need access to Active Directory, and under the profile tab just enter the login script i.e. "Login1.bat" that you created within the SYSVOL\Domain\Scripts directory (just drag the script you created there, then you don't have to specify a full path within the profile tab of the user, just the script name).

Again, we're happy to help, let us know if you need more information.
Scott ThomsonCommented:
yes maniac good work :) im not sure where or how the user wants to run this
with more information we can give better options for him :) but your on the same track as me :)
ammounpierreAuthor Commented:
there is no AD,no GPO, these are point of sales computers that are not linked to each other...
just 20 separate PCs.
I think you will have to manually copy the shortcuts to the all users desktop folder, or manually run a script on each.
Maniac was correct.

Create a share on a pc and place the shortcut inside.

Create a script:

xcopy "\\computername\Shortcut.lnk" "%systemdrive%\Documents and Settings\All Users\Desktop" /y

Run the script manually on each PC.

Or you could upload your shortcut to an FTP site and us a script like this:

@echo off
>  C:\temp.txt echo open
>> C:\temp.txt echo user
>> C:\temp.txt echo password
>> C:\temp.txt echo get Shortcut.lnk "C:\documents and setting\all users\desktop"
>> C:\temp.txt echo bye
ftp -s:C:\temp.txt
del C:\temp.txt

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows OS

From novice to tech pro — start learning today.