Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

Startup script takes 5 reboots to complete

  • 18-09-2020 07:42PM
    #1
    Registered Users, Registered Users 2 Posts: 4,460 ✭✭✭


    Have to copy folder(with sub's) to multiple PC's. total ~300MB. Its program without need to be installed, just copy files.
    Have created .bat to run on startup, deployed over GPO and it works.

    However, it takes exactly 5 reboots to complete full folder/file copy. It does it in portions:

    1. first reboot - root folder(empty)
    2. second reboot - subfolders(empty)
    3. reboot - some files
    4. so on
    only after 5 reboots full set of files in place, despite allowing ~30min after each

    am i missing something?

    bat file single liner:
    robocopy /copyall /s /e \\Server\Folder$ "C:\Program Files\Folder"


Comments

  • Moderators, Computer Games Moderators, Recreation & Hobbies Moderators Posts: 11,116 Mod ✭✭✭✭CatInABox


    The /s and /e might be redundant:

    /s Copies subdirectories. This option automatically excludes empty directories.
    /e Copies subdirectories. This option automatically includes empty directories.

    From Microsoft here.

    Try it out with just the /e


  • Registered Users, Registered Users 2 Posts: 4,460 ✭✭✭smuggler.ie


    CatInABox wrote: »
    The /s and /e might be redundant:

    /s Copies subdirectories. This option automatically excludes empty directories.
    /e Copies subdirectories. This option automatically includes empty directories.

    From Microsoft here.

    Try it out with just the /e
    Thanks.
    Now this is even more interesting.
    Where it appear that program running after 5 reboots, i am not the end user and cannot confirm that all utilities/features within it are functional. So i conduct further testing.

    Original directory DIR /s
    Total Files Listed:
    1677 File(s) 308,213,097 bytes
    293 Dir(s) 2,192,687,104 bytes free

    With /e only - it actually take 8 reboots to get complete set of folders/files


    After 1st reboot dir /s
    Total Files Listed:
    0 File(s) 0 bytes
    2 Dir(s) 119,388,102,656 bytes free ## despite only root folder shown, no hidden items either

    After 2nd reboot dir /s
    Total Files Listed:
    0 File(s) 0 bytes
    38 Dir(s) 119,367,569,408 bytes free

    After 3rd reboot dir /s
    Total Files Listed:
    436 File(s) 249,678,601 bytes
    140 Dir(s) 119,054,286,848 bytes free

    After 4th reboot dir /s
    Total Files Listed:
    581 File(s) 257,298,720 bytes
    227 Dir(s) 119,101,177,856 bytes free

    After 5th reboot dir /s
    Total Files Listed:
    895 File(s) 282,122,640 bytes
    275 Dir(s) 119,042,473,984 bytes free ## program runs, but cant be sure re full functionality

    After 6th reboot dir /s
    Total Files Listed:
    1385 File(s) 305,433,699 bytes
    290 Dir(s) 119,086,342,144 bytes free

    After 7th reboot dir /s
    Total Files Listed:
    1646 File(s) 308,192,763 bytes
    293 Dir(s) 119,079,321,600 bytes free

    After 8th reboot dir /s
    Total Files Listed:
    1677 File(s) 308,213,097 bytes
    293 Dir(s) 119,089,819,648 bytes free


    With /s only it takes only 2 reboots.

    After 1st reboot dir /s
    Total Files Listed:
    0 File(s) 0 bytes
    290 Dir(s) 119,328,423,936 bytes free

    After 2nd reboot dir /s
    Total Files Listed:
    1677 File(s) 308,213,097 bytes
    290 Dir(s) 119,021,010,944 bytes free


    Program run, but i cant be certain if those missing 3 directories(empty suppose) will be created by program itself and not fire back during "production" at later stage. Total files size match.

    :confused::confused::confused:


  • Registered Users, Registered Users 2 Posts: 11,101 ✭✭✭✭28064212


    Use the /log+ switch to output the log to a file and see what robocopy is actually doing

    Boardsie Enhancement Suite - a browser extension to make using Boards on desktop a better experience (includes full-width display, keyboard shortcuts, dark mode, and more). Now available through your browser's extension store.

    Firefox: https://addons.mozilla.org/addon/boardsie-enhancement-suite/

    Chrome/Edge/Opera: https://chromewebstore.google.com/detail/boardsie-enhancement-suit/bbgnmnfagihoohjkofdnofcfmkpdmmce



  • Registered Users, Registered Users 2 Posts: 4,460 ✭✭✭smuggler.ie


    28064212 wrote: »
    Use the /log+ switch to output the log to a file and see what robocopy is actually doing
    Thanks.
    Did, got this repeatedly :
    2020/09/19 14:46:08 ERROR 1314 (0x00000522) Copying NTFS Security to Destination Directory C:\Program Files\FOLDER\
    A required privilege is not held by the client.



    GPO run against Computer not user
    And it suddenly, bit-by-bit gains privileges!?!?! Makes no sense, either you have or you don't


    Will try later to change destination directory, makes no difference where to run program from, will see.


  • Registered Users, Registered Users 2 Posts: 11,101 ✭✭✭✭28064212


    use /copy:DATSO instead of /copyall (unless you have a particular need for the auditing attributes of course)

    Boardsie Enhancement Suite - a browser extension to make using Boards on desktop a better experience (includes full-width display, keyboard shortcuts, dark mode, and more). Now available through your browser's extension store.

    Firefox: https://addons.mozilla.org/addon/boardsie-enhancement-suite/

    Chrome/Edge/Opera: https://chromewebstore.google.com/detail/boardsie-enhancement-suit/bbgnmnfagihoohjkofdnofcfmkpdmmce



  • Advertisement
Advertisement