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

Comments

Please log in to comment

Answers

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

Answered 03/14/2013 by: jagadeish
Red Belt

Please log in to comment
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"

Answered 03/14/2013 by: dugullett
Red Belt

  • 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
  • Thanks a bunch. I'll give it a shot.
Please log in to comment
1

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

 

Answered 03/14/2013 by: jknox
Red Belt

Please log in to comment
0

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

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

Answered 03/13/2013 by: andrew_lubchansky
Black Belt

Please log in to comment
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

Answered 03/15/2013 by: M P
Purple Belt

Please log in to comment
Answer this question or Comment on this question for clarity