I am trying to use a script to put a couple of Internet shortcuts on users' desktops. When I ran the wizard it didn't like a URL for a target. I created an Internet shortcut on my own desktop and then used that file for the dependency.

Here is part of my script:

<on_verify_success>
<launch_program path="SYS" program="cmd.exe" wait="true" parms="/C copy $(KACE_DEPENDENCY_DIR)\EWS.url %ALLUSERSPROFILE%\desktop /y" />
<launch_program path="Sys" program="cmd.exe" wait="true" parms="/c copy $(KACE_DEPENDENCY_DIR)\ADMIN.url %ALLUSERSPROFILE%\desktop /y" />


The files end up on the clients workstation in the kbots/Packages/339 folder but it does not copy them to the all users desktop.

Here is what runbot.log says:

[Tue Feb 07 13:53:46 2012] Kbot [339-1328648018] not found locally, downloading ...
[Tue Feb 07 13:53:48 2012] runkbot : Failed to create kbot process: (1) Incorrect function.


What is my mistake?

Thanks.

Jane
0 Comments   [ + ] Show Comments

Comments

  • This content is currently hidden from public view.
    Reason: Removed by member request
    For more information, visit our FAQ's.
Please log in to comment

Community Chosen Answer

3
You actually might want to try and use the File Synchronization under Distribution if you are going to install on all users. It's a lot easier and all you have to do is:

1. create your shorts cuts
2. zip them up
3. create a software title manually under Inventory > Software
4. Upload the zip file to the software title
5. Go to Distribution > File Synchronization
6. Choose Action > Add New Item
7. Select your software title from the dropdown
8. in the "Location (full directory path):" put in the pathway (full pathway c:\documents and setting\all users\desktop...etc..(win 7 would be another file sync you would create)
9. Fill in username and passwords that have admin rights on the box(s) you are targeting
Answered 02/07/2012 by: nshah
Red Belt

Please log in to comment
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
I did something similar, but actually tricked the machine into thinking it was a software install.

Zipped up the shortcut.website with a registry import that adds the keys in HKLM\Software\Microsoft\Windows\Current Version\Uninstall

Then I was able to have a batch file copy the shortcut to all users desktop.
Answered 02/07/2012 by: ScottinOkla
Orange Belt

Please log in to comment
0
Thanks so much. That worked fine.

[:)]
Answered 02/07/2012 by: jfrasier
Seventh Degree Black Belt

Please log in to comment
0
I currently do this using VB scripts to create the shortcuts rather than copying the .lnk files
might be of use to you.

set WshShell = WScript.CreateObject("WScript.Shell" )
strDesktop = WshShell.SpecialFolders("AllUsersDesktop" )
set oShellLink = WshShell.CreateShortcut(strDesktop & "\SHORTCUT NAME.lnk" )
oShellLink.TargetPath = "http:\\www.url.com"
oShellLink.WindowStyle = 1
oShellLink.IconLocation = "c:\program files\internet explorer\iexplore.exe, 1"
oShellLink.Description = "SHORTCUT DESCRIPTION"
oShellLink.Save


i add the script as a dependancy, then run it via a batch 'start /wait shortcutscript.vbs'
you can customise the icon in the .IconLocation line too, which is handy
Answered 02/09/2012 by: rjonesdj
Orange Senior Belt

Please log in to comment
0
Thanks. I will try that also. If the shortcut is to a program and not a URL would the target path be something like c:\windows\system32\notepad.exe, or is this script just for Internet shortcuts?
Answered 02/09/2012 by: jfrasier
Seventh Degree Black Belt

Please log in to comment
0
I'm creating a link on a test machine then zip up that link file with 7-zip. I throw this into a Kbox script and use the unzip a file command and my settings in that are:

Directory: $(KACE_DEPENDENCY_DIR)
File: "Name of zipped link file"
Target: c:\documents and settings\all users\desktop (Note if you are using XP)

When doing this you will get a broken icon graphic. So after running the unzip command I have a bat file that runs with:

copy IconFileName.ico c:\admin\icons /y
cscript iconchange.vbs

I'm adding an ico file for the particular link and adding it to the script that copies the file to an admin directory on the local machine and then I run a VB script that sets the link to use the icon file.

Here is the VB script contents:

Const ALLDESKTOPS = &H19&

Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.NameSpace(ALLDESKTOPS)

Set objFolderItem = objFolder.ParseName("Name of Link.lnk")
Set objShortcut = objFolderItem.GetLink

objShortcut.SetIconLocation "C:\admin\Icons\IconFileName.ico", 0
objShortcut.Save
Answered 02/09/2012 by: darkhawktman
Green Belt

Please log in to comment
0
ORIGINAL: rjonesdj

I currently do this using VB scripts to create the shortcuts rather than copying the .lnk files
might be of use to you.

set WshShell = WScript.CreateObject("WScript.Shell" )
strDesktop = WshShell.SpecialFolders("AllUsersDesktop" )
set oShellLink = WshShell.CreateShortcut(strDesktop & "\SHORTCUT NAME.lnk" )
oShellLink.TargetPath = "http:\\www.url.com"
oShellLink.WindowStyle = 1
oShellLink.IconLocation = "c:\program files\internet explorer\iexplore.exe, 1"
oShellLink.Description = "SHORTCUT DESCRIPTION"
oShellLink.Save




I tried that and it seems that you are using Windows 7 because of the path to the allusers desktop. How do I do that for Windows XP? I tried strDesktop = WshShell.SpecialFolders("%ALLUSERSPROFILE%\Desktop" ) but the shortcut ended up in c:\.

Thanks.
Answered 02/10/2012 by: jfrasier
Seventh Degree Black Belt

Please log in to comment
0
jfrasier - have you tried File Sync in Distribution? Simpler to use and accounts for different OSes well. Another option if you are using scripting is to use system variables such as %ALLUSERSPROFILE%
More Vars here: http://technet.microsoft.com/en-us/library/dd560744%28WS.10%29.aspx
Answered 02/11/2012 by: cblake
Red Belt

Please log in to comment
0
Thanks. I did end up using File Synchronization, but the article about system variables is a good resource.
Answered 02/13/2012 by: jfrasier
Seventh Degree Black Belt

  • jfrasier,

    How did you use the File Synchronization tool with this? I have a mixed environment of XP, 7, 2003, and 2008 terminal servers. Did you have to create a different Synchronization job for the different OSes?

    I was hoping to use the Shortcut Wizard as well, but ran into the same problem as you did: it wouldn't accept a URL as a valid target.
Please log in to comment
0
Original instructions above worked for me. 

Thanks. 
Answered 06/08/2015 by: FloRod621
Yellow Belt

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