Internet Shortcuts
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
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
Answers (10)
Please log in to answer
Posted by:
nshah
12 years ago
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
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
Posted by:
ScottinOkla
12 years ago
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.
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.
Posted by:
rjonesdj
12 years ago
I currently do this using VB scripts to create the shortcuts rather than copying the .lnk files
might be of use to you.
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
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
Posted by:
jfrasier
12 years ago
Posted by:
darkhawktman
12 years ago
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
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
Posted by:
jfrasier
12 years ago
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.
Posted by:
cblake
12 years ago
Posted by:
jfrasier
12 years ago
Thanks. I did end up using File Synchronization, but the article about system variables is a good resource.
Comments:
-
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. - KFox 11 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.