/build/static/layout/Breadcrumb_cap_w.png

Configuration Policy : Enforce Shortcuts

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

X:\CEPD_-_18th_Edition\cepd18.exe

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.


0 Comments   [ + ] Show comments

Answers (4)

Answer Summary:
Posted by: jknox 11 years ago
Red Belt
4

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.

Posted by: dugullett 11 years ago
Red Belt
2

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


Comments:
  • 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. - chucksteel 11 years ago
    • 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. - dugullett 11 years ago
  • It doesn't do .lnk files well. I normally have to rename them. - jknox 11 years ago
Posted by: chucksteel 11 years ago
Red Belt
1

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.


Comments:
  • 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. - CraigEmmottOLSH 11 years ago
  • I would recommend that you submit this to technical support. It may be a bug. - chucksteel 11 years ago
  • I'll try that. Not sure if to mark this as answered or not. - CraigEmmottOLSH 11 years ago
  • 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. - JimmytheGuru 11 years ago
Posted by: JimmytheGuru 11 years ago
Senior White Belt
0

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.

Don't be a Stranger!

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

Sign up! or login

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