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

    • Microsoft PC Manager 3.17.4.0 (Offline Installer) by Razvan Serea With Microsoft PC Manager, users can easily perform basic computer maintenance and enhance the speed of their devices with just one click. This app offers a range of features, including disk cleanup, startup app management, virus scanning, Windows Update checks, process monitoring, and storage management. Microsoft PC Manager key features: Storage Manager- easily uninstall infrequently used apps, manage large files, perform a cleanup, and set up Storage Sense to automatically clear temporary files. Health Checkup feature -scans for potential problems, viruses, and startup programs to turn off. It helps you identify unnecessary items to remove, optimizing your system's performance. Pop-up Management - block pop-up windows from appearing in apps. Windows Update - scans your system for any pending updates. Startup Apps - enable or disable startup apps on your PC, allowing you to optimize your system's startup performance. Browser Protection - rest assured that harmful programs cannot alter your default browser. Also enables you to change your default browser. Process Management - allows you to conveniently terminate any active process, ensuring optimal system performance and resource utilization. Anti-virus protection - Fully integrated with Windows Security. Safeguard your PC anytime. Quick Steps: Download Microsoft PC Manager Offline Installer (APPX/MSIX) with Adguard Adguard serves as a third-party online service, offering a user-friendly method for directly downloading appx, appxbundle, and msixbundle files from the Microsoft Store. Official download links will be generated for both the app's various versions and its dependency packages. How to download Microsoft PC Manager Offline Installer (APPX/MSIX) 1. Initially, you must find the app URL within the Microsoft Store. Access the Microsoft Store via your browser and search for "Microsoft PC Manager". Once located, copy the app URL, which includes the product ID, either from the address bar or from the provided link below. https://apps.microsoft.com/detail/9PM860492SZD 2. Now paste the app URL into the designated area, then click the check mark button to produce a direct download link. 3. To download, right-click the relevant link and select “Save link as…” from your browser's menu. Occasionally, Microsoft Edge may flag the download as insecure. In such cases, consider utilizing alternative browsers such as Google Chrome or Firefox to successfully complete the download. Microsoft PC Manager is a completely free tool optimized exclusively for use on Windows 10 (version 1809 or newer) and Windows 11. Download: Microsoft PC Manager 3.17.4.0 | from Microsoft Store View: Microsoft PC Manager Home Page Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • You might want to update to 1TB drive.  They are not very expensive these days, there are plenty of options - simple look I would think you could find a 1TB ssd or even nvme somewhere between 50 and 100 bucks. when I have moved to larger ssds in laptop in the past, you can just connect the drive via usb - image.  Then take the old drive out, put in the new drive and there you go..  If your concerned about how much space you have left this prob your best bet..   
    • I see! Wasn’t aware of that. Even though they started off with desktop app for Mac before Windows. Should be on it’s way soon! 🤞
    • support.microsoft.com/en-us/topic/microsoft-defender-update-for-windows-operating-system-installation-images-1c89630b-61ff-00a1-04e2-2d1f3865450d
    • It's a Developer Beta 1 not even a Public or User Beta, I doubt any of the design is 100% finalized yet.
  • Recent Achievements

    • First Post
      Johnny Mrkvička earned a badge
      First Post
    • Week One Done
      viraltui earned a badge
      Week One Done
    • One Month Later
      serfegyed earned a badge
      One Month Later
    • Dedicated
      firey earned a badge
      Dedicated
    • Dedicated
      fettermanj earned a badge
      Dedicated
  • Popular Contributors

    1. 1
      +primortal
      627
    2. 2
      ATLien_0
      223
    3. 3
      Michael Scrip
      217
    4. 4
      Xenon
      149
    5. 5
      Steven P.
      139
  • Tell a friend

    Love Neowin? Tell a friend!