[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Deploying a shortcut with SCCM

Posted on 2009-04-29
12
Medium Priority
?
9,767 Views
Last Modified: 2013-12-12
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.
0
Comment
Question by:B_Whetter
12 Comments
 
LVL 22

Expert Comment

by:Adam Leinss
ID: 24261256
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
 
LVL 22

Expert Comment

by:Adam Leinss
ID: 24261284
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
 

Author Comment

by:B_Whetter
ID: 24261879
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 22

Expert Comment

by:Adam Leinss
ID: 24262078
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
 
LVL 29

Accepted Solution

by:
matrixnz earned 1500 total points
ID: 24263590
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
 
LVL 31

Expert Comment

by:merowinger
ID: 24267385
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
 

Author Comment

by:B_Whetter
ID: 24267703
Thanks for your comments, I will try them and let you know.
0
 

Author Comment

by:B_Whetter
ID: 24278425
"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
 
LVL 22

Expert Comment

by:Adam Leinss
ID: 24278624
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
 

Author Comment

by:B_Whetter
ID: 24323727
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
 
LVL 22

Expert Comment

by:Adam Leinss
ID: 24324843
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
 

Author Closing Comment

by:B_Whetter
ID: 31575860
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

Featured Post

Industry Leaders: 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!

Question has a verified solution.

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

Here in this article, you will get a step by step guidance on how to restore an Exchange database to a recovery database. Get a brief on Recovery Database and how it can be used to restore Exchange database in this section!
Steps to fix “Unable to mount database. (hr=0x80004005, ec=1108)”.
The viewer will learn how to successfully download and install the SARDU utility on Windows 8, without downloading adware.
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

831 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