I'm having trouble using the Configuration Policy : Enforce Shortcuts in the kace 1000 system. Shortcuts that have spaces in the target get created with underscore replacing the spaces. It looks like this is a bug related to the fact that the KACE server runs off unix/linux and its not replacing the underscores with spaces again when deploying the shortcuts.

Looking at the script that gets created by the policy wizard, it uses a program called ShortcutCreator.exe. The params passed to it according to the KACE script edit page look correct (the spaces are actual spaces). E.g.

Launch $(KACE_DEPENDENCY_DIR)\ShortcutCreator.exe with params -location=Desktop -name=Cambridge English Pronouncing Dictionary -target=X:\CEPD - 18th Edition\cepd18.exe -args=”“ -startin=X:\CEPD - 18th Edition“

The resulting shortcut that get created with this script end up with a target off


yet the start in param comes out correctly

"X:\CEPD - 18th Edition"

I cant get around it by using quotes in the enforce shortcuts wizard since it will complain about the target being invalid if i use quotes.

Answer Summary:
0 Comments   [ - ] Hide Comments


Please log in to comment

Community Chosen Answer



I'm not a big fan of that tool. I normally just zip up the links/shortcuts and use a script to unzip them into place (C:\Users\Public\Desktop for example).  I have a lot better success that way.

Answered 08/10/2012 by: jknox
Red Belt

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



I started using this tool as well and I ran into problems with my more complex shortcuts. My solution was this.

1. Install the software and create the shortcuts on a test machine. Set them exactly as needed.

2. Upload those shortcuts (.lnk) to the K1000 as dependencies (kscripts).

3. "Verify" file exists %allusersprofile%\desktop\shortcut1.lnk.

4. "Remediation" Run a batch file.

@echo off

Copy shortcut1.lnk %allusersprofile%\desktop\ /Y

Answered 08/10/2012 by: dugullett
Red Belt

  • This may be a silly question, but how do you upload the .lnk files? My machine always tries to follow the file when I upload it and it won't upload.
    • You know.... I answered that pre-coffee this morning. I've used this method for URL shortcuts in the past. I wasn't thinking. I think I'm also going to have to chalk it up to being Friday.
      I agree with Jason on zipping them. Although I've never done it that way on scripting, but using managed installs.
  • It doesn't do .lnk files well. I normally have to rename them.
Please log in to comment

Have you tried checking the XML for the script generated by the enforcement policy? Maybe it's being generated incorrectly and you could update it there.

Answered 08/10/2012 by: chucksteel
Red Belt

  • Well I looked at the XML of the script as it is on one of the computers it was deployed on. The script simply runs the shortcutcreator.exe program passing the params into it. Here is the scripts section for running the program.

    <launch_program parms=" -location="Desktop" -name="Cambridge English Pronouncing Dictionary" -target="X:\CEPD - 18th Edition\cepd18.exe" -args="" -startin="X:\CEPD - 18th Edition"" wait="false" program="ShortcutCreator.exe" path="$(KACE_DATA_DIR)\kbots_cache\packages\kbots\97"/>

    As you can see, it mirrors the script editor on the KACE webui, with the underscores not showing in the target.

    I decided to play and try to use the shortcut creator tool directly. It comes with a built in help which is nice. I copy and pasted the params out of the XML file and passed it directly to the shortcut program. To my surprise it worked. The new shortcut doesn't contain the underscores.

    Unfortunately this causes more confusion. If the KACE agent is reading the params field in the script and passing it to the shortcut program, why would only part of the params string get converted into underscores for spaces. Even weirder is that the target param is in the middle of the params string.

    I did notice that in the xml script the path field for the launch_program element is a variable, so I'm assuming that the KACE agent still analysing the string before passing it to the program.

    Its looking like somehow the KACE agent is getting confused reading the params string, switching from using spaces to underscores the spaces again, as strange as that sounds.
  • I would recommend that you submit this to technical support. It may be a bug.
  • I'll try that. Not sure if to mark this as answered or not.
  • I used the schortcut tool to make desktop shortcuts but it wouldn't take a UNC path. So I created the shortcut using a drive letter, then edited "To edit the policy using this editor" click here. Plugged in my UNC path and it worked great.
Please log in to comment

I used the schortcut tool to make desktop shortcuts but it wouldn't take a UNC path. So I created the shortcut using a drive letter, then edited "To edit the policy using this editor" click here. Plugged in my UNC path and it worked great.

Answered 12/20/2012 by: JimmytheGuru
Senior White Belt

Please log in to comment