Deploying a shortcut with SCCM

Hi,

Is there a way to deploy a shortcut with SCCM? I have made a few attempts that have ended in failure. I  tried to use Task Sequences to copy the shortcut file to the startup folder, but I kept getting errors.

Many thanks,

Ben.
B_WhetterAsked:
Who is Participating?
 
matrixnzConnect With a Mentor Commented:
First decide if you want all users to have the shortcut or not, if All Users use aleinss method above and run as system account, if you want it per user, than change "all users" to %UserProfile% and run as the User.

Also if you do wish to make it All Users, I'd use %AllUserProfile%\Start Menu\Programs\Startup in case the Path is different.

I'm a big AutoIT fan so you could write the shortcut from scratch, something like
FileCreateShortcut('Link Target Path', @StartupCommonDir) - For All Users

Or

FileCreateShortcut('Link Target Path', @StartupDir) - Per User

Another method you could use, rather than copying a shortcut to the Startup folder is of course to use 'Run' within the registry, that way users cannot move/remove the shortcut etc..

If you want to use Command Line than it would be something like:
REG ADD "HKLM\Software\Microsoft\Windows\CurrentVersion\Run" /V "Application Name" /D "<Path to Application>" /f

in AutoIT it would be something like

RegWrite('HKLM\Software\Microsoft\Windows\CurrentVersion\Run', 'Application Name', 'REG_SZ', '<Path to Application>')

Of course both these are for All Users, you'd use HKCU for per user installs.

Hope that made sense.

Cheers
0
 
Adam LeinssSenior Desktop EngineerCommented:
Should be easy enough.  An icon is just a file and I've copied files using SCCM before.
Where are you trying to copy the icon to?
0
 
Adam LeinssSenior Desktop EngineerCommented:
BTW...task sequences are usually reserved for OSD, not packages deployments.
Yes...you can use them in regular packages, but I wouldn't recommend it.
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
B_WhetterAuthor Commented:
Hi,

I am trying to copy the icon to C:\documents and settings\all users\start menu\programs\startup\

My previous attempt at copying looked like this...
0
 
Adam LeinssSenior Desktop EngineerCommented:
Try xcopy /c yourfile.lnk "C:\documents and settings\all users\start menu\programs\startup\"
Put that statement in a file called iconcp.cmd, then create a package with a command line of "iconcp.cmd", along with yourfile.link and that should work.
0
 
merowingerCommented:
Do you have Group Policy preferences?
With them...creating shortcuts is quiet easy.

Another way is deploying a vbscript with sccm which creates the shortcut
http://www.ss64.com/nt/shortcut.html
0
 
B_WhetterAuthor Commented:
Thanks for your comments, I will try them and let you know.
0
 
B_WhetterAuthor Commented:
"Try xcopy /c yourfile.lnk "C:\documents and settings\all users\start menu\programs\startup\"

Put that statement in a file called iconcp.cmd, then create a package with a command line of "iconcp.cmd", along with yourfile.link and that should work."

Tried this, but I keep getting this:

The program for advertisement "W012000F has not yet started because the content for the package "W010000F" - "*" (version 3) has not been acquired. Possible cause: The content for this program must be downloaded into the computer's cache, or the content could not be located.
Solution: If the program is being downloaded, no action is required. The program will start once the download has been successfully completed. If the content can not be located, ensure that a distribution point with this content is available for this computer.  Distribution point availability can be affected by roaming boundary configuration which is used to determine whether distribution points are classified as local or remote, or by enabling distribution points as protected distribution points. Distribution point availability can also be affected if you are using branch distribution points and the advertisement is configured with the option Run program from distribution point instead of Download content from distribution point and run locally. This is because branch distribution points do not support advertisements that are configured to run directly from a distribution point.

The config is in the attached. I hope this is the right was to specify what is in my package.
Capture.JPG
0
 
Adam LeinssSenior Desktop EngineerCommented:
Did you setup distribution points for the package?  By default, you need to create them yourself, because a package doesn't necessary need a DP.  You might be running a script from a DC and therefore a DP wouldn't be needed.
In the package itself, go to Distribution Points, right-click, pick New Distribution Points and walk throught the wizard.  When you are done, right click on on Distribution Points again and pick Update Distribution Points.
0
 
B_WhetterAuthor Commented:
Hi,

I was unable to update the dsitribution points because there is no Program associated with the package. Or at least that is what I think the problem is...

Ben.
0
 
Adam LeinssSenior Desktop EngineerCommented:
Yes, the command line would be part of the program you make which is contained in the package.
You can set many options in the program such as targeted OS, reboot options, reminders, etc.
0
 
B_WhetterAuthor Commented:
The auto IT solution was the simplest in the end. I created an autoIT exe that copied the shortcut to the startup folder, and pushed that using SCCM. Many thanks to everyone who had input.
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.

All Courses

From novice to tech pro — start learning today.