Thank you! Could you know where I can put my new computer name "MYCOMPUTER" in the script? Code: @echo off CLS color 1f TITLE Checking for Admin... echo. cd %systemroot%\system32 call :IsAdmin :StartScript REM Enable Unicode chcp 65001 >nul :Start SET "NewCName=" SET "YN=" SET "strlength=0" TITLE Change Computer Name cls color 1f echo. echo Certain characters are not allowed, spaces will be converted echo to - {minus character}. echo. echo Pressing just enter without entering anything will close script. echo. echo ** Will attempt to convert to UPPERCASE and 16 Characters MAX or risk of computer boot loops. ** echo. set /p "NewCName=Please enter your new computer/device name: " IF DEFINED NewCName ECHO %NewCName%>"x" & FOR %%? IN (x) DO SET /A "strlength=%%~z? - 3" & del "x" IF NOT DEFINED StrLength SET "StrLength=0" IF "%StrLength%"=="0" GOTO :DoneScript IF %strlength% GTR 16 echo. & echo Error: More than 16 characters entered... & timeout /t 2 >nul & GOTO :Start IF NOT DEFINED NewCName GOTO :DoneScript CALL :UpCase NewCName REM Change any spaces to - (Minus) to prevent networking errors. SET "NewCName=%NewCName: =-%" REM Misc other Disallowed characters to remove/change. REM There are limitations with batch scripting for certain special REM characters which cannot be filtered. SET "NewCName=%NewCName:(=%" SET "NewCName=%NewCName:)=%" SET "NewCName=%NewCName:\=%" SET "NewCName=%NewCName:/=%" SET NewCName=%NewCName:^*=-% SET "NewCName=%NewCName:?=%" SET "NewCName=%NewCName::=%" SET NewCName=%NewCName:"=% SET "NewCName=%NewCName:^^=%" SET "NewCName=%NewCName:!=%" SET "NewCName=%NewCName:@=%" SET "NewCName=%NewCName:#=%" SET "NewCName=%NewCName:^&=%" :AskLoop CLS echo. echo New Computer Name: %NewCName% echo. set /p "YN=Is this correct {Y/N and press Enter}: " IF /I "%YN%"=="N" GOTO :StartScript IF /I "%YN%"=="Y" GOTO :ActionRequest GOTO :AskLoop :ActionRequest CLS echo. echo Modifying registry keys... echo. reg add "HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ActiveComputerName" /v "ComputerName" /d "%NewCName%" /f >NUL 2>&1 reg add "HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName" /v "ComputerName" /d "%NewCName%" /f >NUL 2>&1 reg add "HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters" /v "Hostname" /d "%NewCName%" /f >NUL 2>&1 reg add "HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters" /v "NV Hostname" /d "%NewCName%" /f >NUL 2>&1 reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "DefaultDomainName" /d "%NewCName%" /f >NUL 2>&1 reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "AltDefaultDomainName" /d "%NewCName%" /f >NUL 2>&1 echo Finished updating the registry... echo. echo Now to update the DNS cache to match new name... ipconfig /renew ipconfig /flushdns ipconfig /registerdns echo. echo Finished updating DNS Cache... set "computername=%NewCName%" echo. echo Done. echo. Pause exit :DoneScript echo. echo Nothing entered - script ended. echo. Pause exit ===================================================================================== :IsAdmin Reg query "HKU\S-1-5-19\Environment" If Not %ERRORLEVEL% EQU 0 ( Cls & echo. & Echo You must have administrator rights to continue ... & echo. Pause & Exit ) Cls exit /b :UpCase FOR %%i IN ("a=A" "b=B" "c=C" "d=D" "e=E" "f=F" "g=G" "h=H" "i=I" "j=J" "k=K" "l=L" "m=M" "n=N" "o=O" "p=P" "q=Q" "r=R" "s=S" "t=T" "u=U" "v=V" "w=W" "x=X" "y=Y" "z=Z") DO CALL SET "%1=%%%1:%%~i%%" exit /b I appreciate it very much. Thank you again!
You have to run the script manually after the install is finished. As @mxman2k specifically explained here: https://forums.mydigitallife.net/th...l-project-mrp-mk3.71555/page-255#post-1533980
Have been asked recently about the 'new', ( annoying ? ), change in the Explorer's view being set to say 'Today' , 'Yesterday' etc and if possible to reset the view to 'None' as the 'default' view it used to be for all Explorer windows and have it as a new option for MRP... After a few days checking changes in the registry when selecting different 'states' of the view parameters, i am now sure that i have worked that part out. Will be testing the 'possible' new option over the next few days with various test installations, then if it works correctly during OS installation and not get forcefully reset back, then it will be added into MRP v115. This will be a 'General OS' option item as it can affect all Windows OS's, but at moment seems to be Win 10 only, time will tell. There will be no revert script as it is not required, you just change the view within the Explorer window you're in to alter the look for that folder/window. Results later...
Nice to see that HP/Compaq seems to have been mastered and i can't remember the last time one slipped up MRP and failed to detect the brand. Query Tool 97.0 will be released within the next 24hrs, it just on last minute thrash testing. The 115.0 MRP will all being well be ready by the end of this weekend. Just a few cosmetic bits to sort out, also the changelog etc...
Query Tool v97.0 has been uploaded, 2nd post download link, password and hashes updated. Spoiler: Query Tool 97.0 Summary + Updated the headers to separate certain sections clearer. + Moved some sections and text into new placements. + Added more MS Office information, (under its new header), such as the Stock Keeping Unit ID (SKU ID), Globally Unique IDentifier (GUID) used for checking, reference type, if 32/64 bit Office was installed, last 5 digits of the product code and any error codes/reason text. The Office Error Code Database will expand as new codes are added/found. + Some code optimizations.