I'm very new to programming, I appreciate some help with a command script I have:
This will add a set of random icons to an assigned drive letter to \C\
I need to call a vbs script for upto 26 drives, each from A - Z and with random Photos each and no repeated photos on the same drive letter
currently only works as on %chosen% as above command script
looking to replace this drive number A-Z to the registry HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\A - Z\DefaultIcon
example,
Drive Letter
A > Random photo1
B > Random photo2
...
Z > Random photo26
Currently trying to do this with a "Reg add ..." but will not work with Command scripts (I'm bad at scripting!)
Any help to write a vbs script to be called to replace the Reg add command.
Many thanks
Code:
echo off
setlocal enabledelayedexpansion
set folder="c:/photos"
set count=1
set x=1
for /r "%folder%" %%a in (*.ico) do (
set !count!=%%~a
set /a count+=1
)
set /a x="%random% %% count"
set chosen=!%x%!
Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\C\DefaultIcon" /d "%chosen%" /f >NULI need to call a vbs script for upto 26 drives, each from A - Z and with random Photos each and no repeated photos on the same drive letter
currently only works as on %chosen% as above command script
looking to replace this drive number A-Z to the registry HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\A - Z\DefaultIcon
example,
Drive Letter
A > Random photo1
B > Random photo2
...
Z > Random photo26
Currently trying to do this with a "Reg add ..." but will not work with Command scripts (I'm bad at scripting!)
Any help to write a vbs script to be called to replace the Reg add command.
Many thanks