/build/static/layout/Breadcrumb_cap_w.png

Create All Users/Public Users desktop shortcuts

Looking for a good way to create Desktop shortcuts for users. I have the K1100 and have tried the script wizard that is built in but for some reason it doesn't seem to work.


0 Comments   [ + ] Show comments

Answers (5)

Posted by: jagadeish 11 years ago
Red Belt
1

Try with this VBScript 

 Option Explicit
 On Error Resume Next

 Dim objShell,lnk,ProgramFiles,PublicFold

 Set objShell = CreateObject("WScript.Shell")
 ProgramFiles=objShell.ExpandEnvironmentStrings("%ProgramFiles%")
 PublicFold=objShell.ExpandEnvironmentStrings("%Public%")


 Set lnk = objShell.CreateShortcut(PublicFold & "\Desktop\MyShortcut.LNK")
   
    lnk.TargetPath = ProgramFiles & "\MyApp\MyProgram.exe"
    lnk.Arguments = ""
    lnk.Description = "MyProgram"
    lnk.HotKey = "ALT+CTRL+F"
    lnk.IconLocation = ProgramFiles & "\MyApp\MyProgram.exe, 0"
    lnk.WindowStyle = "1"
    lnk.WorkingDirectory = ProgramFiles & "\MyApp"
    lnk.Save
    Set lnk = Nothing

 Set objShell = Nothing

 WScript.Quit

Posted by: dugullett 11 years ago
Red Belt
1

Zip all of your shortcuts (.lnk) up along with a .cmd file. Call your .cmd in the install command like you usually would. 

 

@echo off

copy /y shortcut.lnk "%public%\desktop"

copy /y shortcut2.lnk "%public%\desktop"

copy /y shortcut3.lnk "%public%\desktop"


Comments:
  • You can also ZIP your shortcuts and create an online Kscript.

    Add your ZIP as a dependency.

    VERIFY the shortcuts exist %public%\desktop\shortcut.lnk

    REMEDIATION Unzip a File

    Directory: $(KACE_DEPENDENCY_DIR)
    File: <Name of ZIP in dependency>
    Target: c:\users\Public\desktop - dugullett 11 years ago
  • Thanks a bunch. I'll give it a shot. - ckubaska 11 years ago
Posted by: jknox 11 years ago
Red Belt
1

It's usually easiest in my experience to just use a kscript that unzips the link to All Users desktop.

 

Posted by: andrew_lubchansky 11 years ago
2nd Degree Black Belt
0

Not a KACE method, but you can use GPO to create shortcuts:

http://technet.microsoft.com/en-us/library/cc753580.aspx

Posted by: M P 11 years ago
Purple Belt
0

I would assume that you are targetting systems that are Windows Vista and above since you are using the Public profile for All Users.  Also, you are getting the "%ProgramFiles%" variable and not the "%ProgramFiles(x86)%" variable so you must be either only running on 32-bit or the software is 64-bit.  Either way, the below script works just fine for me.

 

Option Explicit
On Error Resume Next

Dim objShell, lnk, ProgramFiles, PublicFold

Set objShell = WScript.CreateObject("WScript.Shell")
ProgramFiles = objShell.ExpandEnvironmentStrings("%ProgramFiles%")
PublicFold = objShell.ExpandEnvironmentStrings("%PUBLIC%")

Set lnk = objShell.CreateShortcut(PublicFold & "\Desktop\MyShortcut.lnk")
lnk.TargetPath = ProgramFiles & "\MyApp\MyProgram.exe"
lnk.Arguments = ""
lnk.Description = "MyProgram"
lnk.HotKey = "ALT+CTRL+F"
lnk.IconLocation = ProgramFiles & "\MyApp\MyProgram.exe, 0"
lnk.WindowStyle = "1"
lnk.WorkingDirectory = ProgramFiles & "\MyApp"
lnk.Save


Set objShell = Nothing
Set lnk = Nothing
ProgramFiles = Null
PublicFold = Null

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ