converter icon indicating copy to clipboard operation
converter copied to clipboard

[suggestion] make MountUUP W10UIuup folder name unique

Open eladkarako opened this issue 2 years ago • 9 comments

MountUUP W10UIuup folders shares the name for both W10 and W11 build actions,
which prevents running W10 build and W11 build process in parallel.
MountUUP10+UIuup10, MountUUP11+UIuup11 would allow such parallel action.

this still means no two W10 build actions can be done in parallel,
since those actions would either fail to mount or unmount the folder,
or overwrite files.

making a short, but unique suffix to the folder names,
at the start of the build session would make it possible to build more than one ISO at once, which is more time efficient. suffix can be as short as the current minute and seconds for the current time, it is sufficiently different.

all the batch files and dism and imagex are already capable of handling multiple input and outputs by their nature.

eladkarako avatar Aug 09 '22 22:08 eladkarako

Maybe randomize suffix like W10UI.cmd?

set "_mount=!_mount!_%random%"
if exist "!_mount!\" set "_mount=!_mount!_%random%"
set "_cabdir=!_cabdir!_%random%"
if exist "!_cabdir!\" set "_cabdir=!_cabdir!_%random%"

abbodi1406 avatar Aug 09 '22 23:08 abbodi1406

sure, why not.
just need to make all the scripts be aware of that. probably writing the session name to a text file and reading it at the start of each script would be fine (basically a global variable).

eladkarako avatar Aug 10 '22 00:08 eladkarako

What scripts? virtual and multi_arch?

abbodi1406 avatar Aug 10 '22 00:08 abbodi1406

The thing is, some users would want the static folder names, so they could exclude them in Anti-virus to speed up the conversion/updating using randomation will prevent that

we could make the randomized folders as sub-directories under MountUUP/W10UIuup folders but in that case, the parent folder will be left (empty) after the script finish

abbodi1406 avatar Aug 10 '22 12:08 abbodi1406

afaik convert-UUP.cmd handles most of the actions that uses those two folders.
just thought it is a good idea to keep a reference to the working folders in-case you'll ever want to spread the functionality over few files.
that aside, it is best to keep the folder name under 12 characters (8+3),
that leaves maybe 2-3 characters, that short - random might be insufficient (I.E. repeating) for that, number of seconds or milliseconds in the current time might work better
cmd for /f "tokens=3-4 delims=/:." %%a in ("%TIME%") do ( echo "%%a%%b" )
powershell ((Get-Date).millisecond))

eladkarako avatar Aug 10 '22 12:08 eladkarako

Could test this with parallel actions or so? convert-UUP84.zip

abbodi1406 avatar Aug 14 '22 06:08 abbodi1406

The thing is, some users would want the static folder names, so they could exclude them in Anti-virus to speed up the conversion/updating using randomation will prevent that

we could make the randomized folders as sub-directories under MountUUP/W10UIuup folders but in that case, the parent folder will be left (empty) after the script finish

in this case,
either lets settle down on just two variations,
MountUUP10+UIuup10 for W10, and MountUUP11+UIuup11 for W11.

or use the randomness/time-based suffix,
but instead of placing the folder directly under the same drive,
first create a folder named uupdump, and place everything in it.

D:/
|-- /uudump
|   |-- /MountUUP666
|   |-- /UIuup666

this way users will be able to add to the ignore list /uudump and "whatever" sub-folders it may have would be automatically be ignored as well.


or possibly with this naming scheme...

D:/
|-- /uup
|   |-- /uup_mnt_10_666
|   |-- /uup_cab_10_666

or

D:/
|-- /uup
|   |-- /mnt_10_666
|   |-- /cab_10_666

or

D:/
|-- /uup
|   |-- /10
|   |   |-- /mnt_666
|   |   |-- /cab_666
|   |   |
|   |-- /11
|   |   |-- /mnt_777
|   |   |-- /cab_777

or

D:/
|-- /uup
|   |-- /666
|   |   |-- /mnt
|   |   |-- /cab
|   |-- /777
|   |   |-- /mnt
|   |   |-- /cab

having session as a folder and short folders,
is both very organised (ordered by session, you can just clean up the session folder afterwards),
and will assure you'll have very short folder-names!

this means you can also increase the length of the session id,
up to 12 characters and be perfectly fine (even back in ms-dos you could have created a long folder tree, as long as each folder name wasn't more than 8+3 characters).

so it might be useful to create a more unique session id.

eladkarako avatar Aug 15 '22 22:08 eladkarako

Directories are set before processing UUP files, differentiation isn't feasible

why short names are important? you are not exactly working on Windows XP :)

like i said, parent folder concept is good, but it would be left empty afterwards (to avoid confliction with other sessions)

abbodi1406 avatar Aug 15 '22 23:08 abbodi1406

Directories are set before processing UUP files, differentiation isn't feasible

explained above already.
generate the name early, write it to a text file in the project folder,
read its content at the start of every script that needs to use the folder name,
either mount or cab file storage/extraction.
and this way you can share the data across multiple scripts. (I think there is just one script that actually handles it all though).

why short names are important? you are not exactly working on Windows XP :)

whitespace 100% breaks stuff,
short('ish) names are just good practice.
as long as you use _ instead of , cmd and dism should be fine I guess..

parent folder .. left empty afterwards

  1. project self clean first (remove mount, ui).
  2. after deleting mount and ui folders, check to see if there are other folders there.
  3. if there are no other folders: you are the last project to finish, also delete uup.
  4. if there are folders, let their cleanup worry about that (they will run steps 1,2,3, 4 as well), do nothing, quit.
  5. safe. since you delete the folders only in the last step in your script.

eladkarako avatar Aug 16 '22 01:08 eladkarako

Did you try convert-UUP84 above?

abbodi1406 avatar Aug 16 '22 12:08 abbodi1406