Scripts Thread, Script to copy a shortcut to all users and overwrite an exis in Coding and Web Development; I need a script to copy a shortcut from a location on our server to the all users desktop and ...
Script to copy a shortcut to all users and overwrite an exis
I need a script to copy a shortcut from a location on our server to the all users desktop and all users start menu. All staff currently have a shortcut in this location but after reconfiguring our network the current short cut points to the wrong place. With 2000+ users, i cannot rely on them creating their own.
Is there a way i can have a script that copies the new shortcut and tells it to over write the old one.
Also if run in a GPO on Computer Configuration will it have the authority to do it or do i need a admin password in the script?
Re: Script to copy a shortcut to all users and overwrite an
@Ric_: Why will he have to do anything with his roaming profiles? He does not want to change them, only to affect the content of the All Users profile on his PCs. and STOP SLAGGING OFF ROAMING PROFILES.
@tosca: You can run a startup script which copies anything from a network location to anywhere you like on the local computer. The only requirement is that you give the 'domain computers' group at least Read/List permissions to the share/files you will be copying from. Another solution is to include the files you are copying in the GPO scripts folder (the same place as the script is stored).
Re: Script to copy a shortcut to all users and overwrite an
I'd go (and do) with re-directed desktop and start menus. I don't think Ric is being over critical of roaming profiles. He is merely pointing out one of the problems they create as opposed to centrally managing folders.
Re: Script to copy a shortcut to all users and overwrite an
Originally Posted by Dos_Box
I'd go (and do) with re-directed desktop and start menus. I don't think Ric is being over critical of roaming profiles. He is merely pointing out one of the problems they create as opposed to centrally managing folders.
Except you can do the same thing with mandatory profiles. I add network wide shortcuts to the mandatory profile and machine specific to the local all users startmenu.
Two different ways to do the same thing, they both have disadvantages and neither is entierly as flexible as we might like.
Re: Script to copy a shortcut to all users and overwrite an exis
I mentioned the roaming profiles and then had a thought - you could write a script to change all 1000+ instances of the shortcut Mandatory profiles would require less effort since there would only be a handful to change.
The most flexable way is still folder re-direction in this instance. If you aren't using this, it may be a good time to make the change.
Re: Script to copy a shortcut to all users and overwrite an exis
@Ric_: I think you may have misread the original post. I believe what tosca is aksing for is a script which copies shortcuts to the 'All Users' desktop and 'All Users' Start Menu as opposed to all users' desktops & start menus.
When I get a chance (I'm on a training course this week), I will write a script which can be used to copy data to any location on PCs. I'll write it on the basis that the data will be included in the GPO (and should therefore be limited to shortcuts/links to keep it tight). It should be quiet simple, along the lines of;
Sit the script at the top level of a directory structure as follows;
.\ - Script goes here
.\AllUsersDesktop - Links for All Users desktop
.\AllUsersStartMenu - Links for All Users Start Menus
etc.
This should run fine as a startup script, provided the environment variables exist (if not, it will have to be in VB Script).
The script (and associated dir structure) could be used on any GPO.
PS - Ric_: Which is easiest for your USERS (you know, the people who you SERVICE), for you to write a script, or for them to recreate all their profiles and associated data?
Re: Script to copy a shortcut to all users and overwrite an
Quick and dirty file copying script.
NB - THIS IS SUPPLIED WITH MINIMAL TESTING (BUT IT DID WORK, HONEST!), PLEASE TEST CAREFULLY BEFORE USING IN PRODUCTION ENVIRONMENT.
1 - Create (or use an existing) GPO
2 - Edit the GPO and go to Computer Config\Windows Settings\Scripts (Startup/Shutdown)
3 - Double click Startup
4 - Click Show Files...
5 - Make a folder 'CopyShortcuts' and extract the content of the CopyShortcuts.zip file into it.
6 - Copy any shortcuts into the sub-folders (AllUsersDesktop, AllUsersStartMenu etc.)
7 - Close the explorer window to return to the Startup Properties dialog box
8 - Click Add then Browse, CopyShortcuts (folder), CopyShortcuts.cmd, Open, OK
9 - OK to close Startup Properties
10 - Close GP Editor
11 - Link to GPO to an OU containing computer accounts you want to apply the script to.
If anyone uses this, let me know if it works/crashes. Thanks again to Geoff for headsup on %0