create share folder shortcut on desktop using script

H

Huang

Hi, there:


I am a new with script and look around on Microsoft website for a solution
to my problem:



Basically I would like to use logon script with group policy in Windows
server 2003 to achieve the following goal:



1): create a shortcut in user’s desktop, the target of this shortcut is a
share folder on file server.



When I search the Microsoft website, I write the following script:



objWSHShell = CreateObject("Wscript.Shell")

strDesktop = objWSHShell.SpecialFolders("Desktop")



strShortcutName="Corporate Public Folder"

strShortcutPath="\\w2k3chsvr\public"



objShortcut=objWSHShell.creatShortcut(strDesktop + "\" + strShortcutName +
".lnk")

objShortcut.TargetPath=strShortcutPath

objShortcut.Save



I create a script file with name “logon.wsf†on a test XP machine and run
the file, however it pops up an error window saying “on jobs are define in
the fileâ€,

Now I wonder what should be added to this scipt file.


thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top