Stace
Thu Jan 31 11:20:52 CST 2008
"Jake" <jake44@gmail.com> wrote in message
news:%233pTJfBZIHA.5900@TK2MSFTNGP02.phx.gbl...
> Hi,
>
> I would like to add a desktop shortcut to the 'All users' Start Menu
> folder from the below vbs logon script. I have two problems:
>
> A 'Normal' domain user cannot add anything (read: this shortcut) to the
> 'All Users' folder. How can I overcome this from a logon script..?
>
> Secondly I want to assign a specific icon to this shortcut. The .ICO file
> is located in the netlogon share (same location as the vbs logon file
> itself). What to I enter in .IconLocation below to assign MyIcon.ICO
> located in the netlogon folder of the domain controller?
>
> Thanks for tips on these two issues
>
> /jake
>
> With sho.CreateShortcut(strAlluserprofile & "\Desktop\Our Intranet.URL")
> .TargetPath = "
http://intranet"
> .Arguments = ""
> .Description = "Our intranet site. Enjoy! Use shortcut
> [ALT+CTRL+I]"
> .HotKey = "ALT+CTRL+I"
> .IconLocation = "MyIcon.ico, 0"
> .Save
> End With
Hi Jake,
I use CPAU (
http://www.joeware.net/freetools/tools/cpau/index.htm) to do
this.
Basically I create a script to do the task and test it under a normal admin
logon. Once I'm happy with it I use CPAU to encode it as a .job file and
specify the administrator account credentials which get encoded within the
job. In your logon script you can then use a call to CPAU to run the job
file. I usually have a folder under the netlogon share called CPAU with all
the relevant files in it.
For the shortcut, simplest way is to stick the .ico file in your windows
folder, create a desktop shortcut on your desktop as you want it. Use
SHORTCUT.EXE (From one of the Windows Resource Kits) to remove the UNC
information from the .lnk file. Now copy both your shortcut and the .ico
file onto your netlogon share. As part of your script running with admin
rights simply copy the ico file to %windir% and the shortcut to
%ALLUSERSPROFILE%\Desktop.
Hope this helps.
Regards,
Stace.