Link to home
Start Free TrialLog in
Avatar of coolsport00
coolsport00Flag for United States of America

asked on

Add Show Desktop icon to Quick Launch via VBScript

The subject line says it all - I wanna add the Show Desktop icon to the Quick Launch bar for my end users via login script (VBScript). I want the script to 1. verify the user and 2. Copy the Show Desktop icon from a network location (using UNC path) to the logged on user's Quick Launch folder (C:\Documents and Settings\%Userprofile%\Application Data\Microsoft\Internet Explorer\Quick Launch). I need to verify the user because there would obviously be a permissions issue if the copy process happened to all the %userprofile% locations and the person logged in isn't an admin. Now, I'm obviously not a scripter or I wouldn't be here, I guess, but I can make out a bit of what scripts do. That being said, not knowing scripting too well, I may be missing more details; like, does verification need to happen to check if the Quick Launch bar is even enabled? Does a check need to be made to see if the Show Desktop icon is present, if it is end the script but if not, copy it?

My desktops are WinXP; my end users do not have local admin access, but shouldn't need it for adding items to the Quick Launch area (folder).

Let me know if more info is needed.

Thanks/regards,
~coolsport00
Avatar of johnb6767
johnb6767
Flag of United States of America image

As part of thier login script, you could have a simple

if not exist "%appdata%\Microsoft\Internet Explorer\Quick Launch\Show Desktop.scf" copy /Y "\\server\share\Show Desktop.scf" "%appdata%\Microsoft\Internet Explorer\Quick Launch\"

If it isnt there, it will copy it.

Scripting to see if the QL Toolbar is enabled is another story....

Oh, and You dont need to check user rights really... As you said, it is not needed for thier OWN profile.....
Avatar of coolsport00

ASKER

Thanks "johnb6767"...I'll test it out.

~coolsport00
ASKER CERTIFIED SOLUTION
Avatar of johnb6767
johnb6767
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Can you explain the 1st line? What does 'md' mean?

Thanks.
Also, I'm needing a bit more detail for the script. I need to know the whole thing, not the 'gist/meat' of the script (sorry I didn't really explain that in my initial post). So, what would the script look like in its entirety?

Thanks.

~coolsport00
if not exist "%appdata%\Microsoft\Internet Explorer\Quick Launch\" md "%appdata%\Microsoft\Internet Explorer\Quick Launch\"
if not exist "%appdata%\Microsoft\Internet Explorer\Quick Launch\Show Desktop.scf" copy /Y "\\server\share\Show Desktop.scf" "%appdata%\Microsoft\Internet Explorer\Quick Launch\"

Thats pretty much it....Nothing complicated....

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Script provided was, at least for me, incomplete, but helped me finalize what I already had. I provided an accurate VBscript that should work for most anyone.
Thanks.