GPO, VBScript, Replace files


Recommended Posts

History:

I have a lot of AutoCAD users. There is a folder that holds the pen styles and plotter configs (pc3 files). Some people are in charge of setting up the configurations of these files. The files must be the same on all CAD pc's. Some users change the configurations on their local pc's. Sometimes this is necessary for a specific job.

Problem:

Every morning I need to have the exact same files on all CAD pc's.

The files are updated by the authorised editors from time to time and need to be distributed.

There are too many pc's to update manually.

There are too many pc's to have the folder redirected to the server.

Permissions are not an option as the user do need to create or edit their files on an "as needed" basis.

Most of the users are not capable / too stubborn to remove "custom" files and replace with authorised ones.

Some users insist on creating their owe files over authorised ones or distributing corrupt ones.

Question:

I would like a VB Script that would clear out all files in a specific folder and copy the authorised ones into that folder every time a user logs on.

ie: user logs on -> folder emptied -> authorised files copied over from server.

I will be applying the script via a GPO specific to the users (ie various departments have differing files)

Link to comment
https://www.neowin.net/forum/topic/278937-gpo-vbscript-replace-files/
Share on other sites

Tried it out and it worked.

I created a .cmd file with the Robocopy command and some extra switched (ie log files). Also I added a pause in the cmd file so that I could see it working while testing. That will be taken out when deploying.

I then created a vbs file that would run the cmd file (I can't VB for s***).

Lastly I assigned a group policy to the OU that executes the VBS at logon.

I tested it with my logon and it worked. Now I think I need to assign permissions on the robocopy for authenticated users or will server allow the VBS and cmd to use the file? Robocopy is only on the server. My account is a member of Domain Admins.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Xbox June Update brings unsynced save management, publisher browsing, and more by Pulasthi Ariyasinghe June has been a busy month for Microsoft, bringing major software upgrades across its product stack. It even announced new hardware for its Xbox lineup, finally entering the handheld gaming space. The company's roundup for this month's new features has now been published, and it's touting a great deal of changes. To start off on the PC side, the Xbox app on the platform now has a section to browse by publishers. The company says that this will let players easily discover more games made by their favorite developers and franchises. Copilot for Gaming also landed in beta form recently, letting users ask AI for help when a game gets too difficult. It's only available for iOS and Android for now, with ROG Xbox Ally support coming later this year. Another feature that will hit the Xbox Ally is the new universal launcher feature for the Xbox app on PC. Microsoft just kicked off Xbox Insider testing for this functionality earlier today. Get all the details here. Over on consoles, the ability to hide system apps, pin favorites to the list, and reduce the number of tiles displayed are now available. Game Hubs also arrived as a fresh feature to easily display relevant information when selecting a game to play, offering data on player stats, achievements, friends currently playing, recent captures, available add-ons, events, and more. Double-tapping the play button will quick-launch the game instead. On both Xbox consoles and in the cloud, a new progress bar will now appear when a save has been left behind on a device in an offline state. "A new progress bar, device names, timestamps, and additional details are now displayed when you have previous game saves on another device in an unsynced state," says the company. Microsoft has also added mouse and keyboard controls as well as touch controls for more cloud games this month. These join the fresh additions that have landed on the 'Stream your own game' collection and the Retro Classics app. Check out the full lists on the announcement page here. On top of all this, Microsoft has also announced that Xbox will be at Gamescom this year. While no details have been announced yet, more announcements from Xbox Game Studios may happen at the major gaming event.
    • Hopefully this is a precurser to them linking other launchers to the Xbox console. With this current gen the Xbox has had dismal sales compared to the competition. If they did support Steam, Epic, Ubisoft Connect, etc etc they'd crush on the next gen battle.
    • My update. Didn't see much point in the top panel since global menu isn't there, so going with a win/kde layout now. Overall, I would say Gnome is a disappointment - it's been 15 years and you still have to rely on a bunch of extensions to get anything useful out of it. At the same time, the way Universal Blue / Bluefin is approaching the desktop feels like what Ubuntu should have started doing five years ago (no wonder the guy I learned about this from used to work for Canonical). Maybe I should have gone with Aurora (the KDE variant), or Bazzite with KDE, but I think I have Gnome where it works for me now.       
    • GOG Galaxy offers connecting of other launchers into theirs. And while idea is interesting, I always had issues with Steam that would just lose connection and just not work. Which was annoying.
    • I remember that during the earlier development of Windows 10 a big deal was made about the Recycle Bin icon(s). https://www.neowin.net/news/wi...pdated-icons-in-this-build/
  • Recent Achievements

    • Dedicated
      Camlann earned a badge
      Dedicated
    • Week One Done
      fredss earned a badge
      Week One Done
    • Dedicated
      fabioc earned a badge
      Dedicated
    • One Month Later
      GoForma earned a badge
      One Month Later
    • Week One Done
      GoForma earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      650
    2. 2
      Michael Scrip
      225
    3. 3
      ATLien_0
      220
    4. 4
      +FloatingFatMan
      146
    5. 5
      Xenon
      136
  • Tell a friend

    Love Neowin? Tell a friend!