• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 729
  • Last Modified:

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
0
ammounpierre
Asked:
ammounpierre
  • 3
  • 2
  • 2
  • +4
1 Solution
 
AsokkumarCommented:
hi

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.
0
 
kaskhedikar_tusharCommented:
Hello,

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.

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

0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

 
Scott ThomsonCommented:
Hi

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
0
 
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....
0
 
Maniac_47Commented:
create a batch file (new text doc, save it as all documents with a .bat extension).

Then:

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

that should do it, just copy and paste additional lines to add more shortcuts in the same script.
0
 
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..
0
 
Maniac_47Commented:
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.
0
 
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 :)
0
 
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.
0
 
esafdiaCommented:
I think you will have to manually copy the shortcuts to the all users desktop folder, or manually run a script on each.
0
 
esafdiaCommented:
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
exit

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 ftp.yoursite.com
>> 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
cls
exit
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.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 3
  • 2
  • 2
  • +4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now