Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Deploying a Shortcut to all Users

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,56709
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Deploying a Shortcut to all Users
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Deploying a Shortcut to all Users - 2/14/2008 11:06:08 PM   
  zagadka

 

Posts: 4
Score: 0
Joined: 2/14/2008
Status: offline
I'm trying to make a script to run in a group policy on our Windows 2003 server that will create a shortcut to a company specific web application (the actual url goes to a .dll) onto their desktop.

Here is the script:


set WshShell = WScript.CreateObject("WScript.Shell")
strDesktop = WshShell.SpecialFolders("Desktop")
set oUrlLink = WshShell.CreateShortcut(strDesktop & "\Ultra Control.url")
oUrlLink.TargetPath = "
http://ultra02/controlES/CtrlWebISAPI.dll"
oUrlLink.Save

 

This works locally, but does not work when deployed as a GP.

I have also tried this script which I found on the internet.


Set WshShell = CreateObject("WScript.Shell")
set objFSO = CreateObject("Scripting.FileSystemObject")

strDesktop = WshShell.SpecialFolders("Desktop")
IF Not objFSO.FileExists(strDesktop & "\Ultra Control.url") Then
set oShellLink = WshShell.CreateShortcut(strDesktop & "\Ultra Control.url")
oShellLink.TargetPath = "
http://ultra02/controlES/CtrlWebISAPI.dll"
oShellLink.WindowStyle = 1
oShellLink.IconLocation = "url.dll, 0"
oShellLink.Description = "Ultra Control"
oShellLink.WorkingDirectory = "
http://ultra02/controlES/CtrlWebISAPI.dll"
oShellLink.Save
set oShellLink = NOTHING
END IF

Set WshShell = NOTHING
Set objFSO = Nothing

 

Does exactly the same thing though; it works locally but not remotely. is there anything wrong with the script or is it due to the execution via GP?
 
 
Post #: 1
 
 RE: Deploying a Shortcut to all Users - 2/15/2008 5:51:16 AM   
  Rischip


Posts: 480
Score: 2
Joined: 3/26/2007
Status: offline
You may be running into a user context issue. Try changing the script to use the AllUsersDesktop special folder and see what you get...

strDesktop = WshShell.SpecialFolders("AllUsersDesktop")


_____________________________

Rischip
Author of - The Grim Linker

(in reply to zagadka)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Deploying a Shortcut to all Users Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts