Like so by creating multiple text files to read from, i can sthe actual script very small if you use the type command, also have you ever tried WMIC?
create disclaimer.txt file
The purpose of adminify is to make a computer more fixable by tweaking
the windows GUI, while providing a way to get things back to normal after
the fixes have been performed...
*DISCLAIMER: This program will modify the registry of the computer you run
it on, automatically if you use arguments. Use with caution and create a
restore point before continuing. Of course, you can edit the .reg files in
any way you like, but the author recommends that before you do so you
understand the rationale of the order of operations used by the program
(Full Backup of Keys/Values, Modify Keys/Values, Restore Default Keys/Values,
Restore User Keys/Values.)*
Create welcome.txt
Welcome to adminify!
Press any key to view Program Explanation and Disclaimer.
Main Menu:
1. Adminify
*Backup registry settings to be changed to \backups
*DISABLE User Account Control - Reboot Required!
*Make Hidden, SuperHidden, Protected Operating System Files, and
File Extensions visible.
*Display full path in address bar and title bar
*STOPs and DISABLEs the Themes Service
*STOPs and RESTARTs the explorer process
2. De-adminify
*Set adminified values to default
*Re-apply backed-up user settings
*Move backed-up user settings into a dated folder in \backups
*RESTART stopped services and/or prompt for reboot.
3. Open program folder to manually run .reg files
*Do this if for some reason you adminified multiple times
and need to restore older .reg backups.
4. Open services.msc to manually change settings for other services
5. Open the User Account Control Settings dialog
6. Not Implemented
Create regdisplay1.txt
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] >> %mf_name%
"AlwaysShowMenus"=dword:00000001 ;Show menu in Windows Explorer (1=Do, 0=Don't) >> %mf_name%
"Hidden"=dword:00000001 ;Show hidden files and folders (1=Do, 2=Don't) >> %mf_name%
"HideFileExt"=dword:00000000 ;Hide file extentions (1=Enabled, 0=Disabled) >> %mf_name%
"DontPrettyPath"=dword:00000001 ;Files/directories in all caps displayed as mixed-case (1=False, 0=True) >> %mf_name%
"ShowSuperHidden"=dword:00000001 ;I'm not really sure (1=Enabled, 0=Disabled) >> %mf_name%
"IntelliMenus"=dword:00000000 ;Menus (such as the start menu) are personalized (1=True, 0=False) >> %mf_name%
ECHO. >> %mf_name%
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\CabinetState] >> %mf_name%
"FullPath"=dword:00000001 ;Display the Full Path in the Title Bar (1=Enabled, 0=Disabled) >> %mf_name%
"FullPathAddress"=dword:00000001 ;Display the Full Path in the Address Bar (1=Enabled, 0=Disabled) >> %mf_name%
ECHO. >> %mf_name%
[HKEY_CURRENT_USER\Control Panel\Desktop] >> %mf_name%
"MenuShowDelay"="100" ;Shorten menu delay (Default value "400") >> %mf_name%
ECHO. >> %mf_name%
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system] >> %mf_name%
"EnableLUA"=dword:00000000 ;Enable UAC (1=Enabled, 0=Disabled) >> %mf_name%
ECHO. >> %mf_name%
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Themes] >> %mf_name%
"Start"=dword:00000004 ;Themes Service (2=Automatic[Default], 3=Manual, 4=Disabled) >> %mf_name%
create regdisplay2.txt
Windows Registry Editor Version 5.00 > %mf_name%
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] >> %mf_name%
"AlwaysShowMenus"=dword:00000001 ;Show menu in Windows Explorer (1=Do, 0=Don't) >> %mf_name%
"Hidden"=dword:00000002 ;Show hidden files and folders (1=Do, 2=Don't) >> %mf_name%
"HideFileExt"=dword:00000001 ;Hide file extensions (1=Enabled, 0=Disabled) >> %mf_name%
"DontPrettyPath"=dword:00000000 ;Files/directories in all caps displayed as mixed-case (1=False, 0=True) >> %mf_name%
"ShowSuperHidden"=dword:00000000 ;I'm not really sure (1=Enabled, 0=Disabled) >> %mf_name%
"IntelliMenus"=dword:00000001 ;Menus (such as the start menu) are personalized (1=True, 0=False) >> %mf_name%
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\CabinetState] >> %mf_name%
"FullPath"=dword:00000000 ;Display the Full Path in the Title Bar (1=Enabled, 0=Disabled) >> %mf_name%
"FullPathAddress"=dword:00000000 ;Display the Full Path in the Address Bar (1=Enabled, 0=Disabled) >> %mf_name%
[HKEY_CURRENT_USER\Control Panel\Desktop] >> %mf_name%
"MenuShowDelay"="400" ;Shorten menu delay (Default value "400") >> %mf_name%
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system] >> %mf_name%
"EnableLUA"=dword:00000001 ;Enable UAC (1=Enabled, 0=Disabled) >> %mf_name%
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Themes] >> %mf_name%
"Start"=dword:00000002 ;Themes Service (2=Automatic[Default], 3=Manual, 4=Disabled) >> %mf_name%
You get qwhere this is going, i havnt done the rest but im sure you could
After that the edit version would look like so
@ECHO OFF
:c_set
COLOR 2
SET spacer=*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
:p_set
SET p_path=%~dp0
SET p_path=%p_path:~0,-1%
SET p_name=adminify
SET p_type=.bat
set p_tools=.
@title %p_name%
:ifequal
IF '%1' == '' GOTO p_mainmenu
IF '%1' == 'go' GOTO backup_user_settings
IF '%1' == 'un' GOTO restore_create_settings
GOTO p_mainmenu
:p_about
set step_name=About adminify
CLS
@title %p_name% - %step_name%
:: Show the disclaimer text
type disclaimer.txt
@pause
GOTO p_mainmenu
:p_mainmenu
CLS
@Title %p_name% - Main Menu
SET substatus=p_chosen
::Create the Welcome message
type welcome.txt
GOTO p_choice
:p_choice
SET x=
SET /p x=Pick:
ECHO.
:p_chosen
@Title %p_name%
IF '%x%' == '1' GOTO backup_user_settings
IF '%x%' == '2' GOTO restore_create_settings
IF '%x%' == '3' START explorer %p_path%
IF '%x%' == '4' START services.msc
IF '%x%' == '5' START %systemroot%\system32\UserAccountControlSettings.exe
:IF '%x%' == '6'
GOTO p_about
:make_files
:make_file1
set mf_name=adminify_tweaked_values.reg
:: Display the registry changes
type regdisplay1.txt
GOTO make_file2
:make_file2
set mf_name=adminify_default_values.reg
:: Display registry changes
type regdisplay2.txt
GOTO set_desired_values
:make_file3
REM Create code to make .lnk file to adminify.bat on desktop and assign administrator rights to it.
GOTO p_chosen
:backup_user_settings
set step_name=Backing up User Settings
CLS
@title %p_name% - %step_name%
IF NOT EXIST %p_path%\backups md %p_path%\backups
IF EXIST "%p_path%\backups\*-backup.reg" md "%p_path%\backups\adminify_old"
IF EXIST "%p_path%\backups\*-backup.reg" move "%p_path%\backups\*-backup.reg" "%p_path%\backups\adminify_old"
ren "%p_path%\backups\adminify_old" "adminify_pre-%date:~4,2%-%date:~7,2%-%date:~10,4%_H%time:~0,2%_M%time:~3,2%_S%time:~3,2%"
ECHO Backing up current user/computer registry keys/subkeys/values for all
ECHO areas of the registry to be modified
ECHO.
REGEDIT /E %p_path%\backups\HKCU_explorer_advanced-backup.reg "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
REGEDIT /E %p_path%\backups\HKCU_explorer_cabinetstate-backup.reg "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\CabinetState"
REGEDIT /E %p_path%\backups\HKCU_CP_desktop-backup.reg "HKEY_CURRENT_USER\Control Panel\Desktop"
REGEDIT /E %p_path%\backups\HKLM_policies_system-backup.reg "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system"
REGEDIT /E %p_path%\backups\HKLM_services_themes-backup.reg "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Themes"
ECHO %spacer%
ECHO.
ECHO The files listed below are the backups of the registry keys/values that
ECHO will be modified. If there is nothing listed below, something is wrong
ECHO and you should close this window!
ECHO.
ECHO %spacer%
ECHO.
dir /b %p_path%\backups\*-backup*.reg
ECHO.
ECHO %spacer%
@pause
GOTO set_desired_values
:set_desired_values
IF NOT EXIST %p_path%\adminify_tweaked_values.reg GOTO make_files
IF NOT EXIST %p_path%\adminify_default_values.reg GOTO make_files
set step_name=adminifying (Importing desired values)
CLS
@title %p_name% - %step_name%
ECHO adminifying (Importing desired values for registry keys/subkeys we backed
ECHO up previously.)
ECHO.
REGEDIT /S adminify_tweaked_values.reg
ECHO %step_name% complete.
ECHO.
:SET __COMPAT_LAYER=WINXPSP3
ECHO Stopping the Themes service...
ECHO.
sc stop Themes
GOTO restart_explorer
:restore_create_settings
IF NOT EXIST %p_path%\backups\*-backup.reg ECHO No backup files exist! You must adminify before de-adminifying!
IF NOT EXIST %p_path%\backups\*-backup.reg ECHO.
IF NOT EXIST %p_path%\backups\*-backup.reg pause
IF NOT EXIST %p_path%\backups\*-backup.reg GOTO p_mainmenu
:import_default_values
set step_name=de-adminifying (step 1 - Importing Default Values)
CLS
@title %p_name% - %step_name%
ECHO Importing default values for previously imported values that may have not
ECHO existed in the registry before we started...
REGEDIT /S adminify_default_values.reg
ECHO.
ECHO %step_name% complete.
ECHO.
GOTO restore_user_settings
:restore_user_settings
set step_name=de-adminifying (step 2 - Importing User Values)
CLS
@title %p_name% - %step_name%
ECHO Restoring current user/computer registry keys/subkeys/values we backed up
ECHO before adminifying...
ECHO.
REGEDIT /S %p_path%\backups\HKCU_explorer_advanced-backup.reg
REGEDIT /S %p_path%\backups\HKCU_explorer_cabinetstate-backup.reg
REGEDIT /S %p_path%\backups\HKCU_CP_desktop-backup.reg
REGEDIT /S %p_path%\backups\HKLM_EnableLUA-backup.reg
REGEDIT /S %p_path%\backups\HKLM_services_themes-backup.reg
ECHO %step_name% complete.
ECHO.
ECHO Starting the Themes service (a reboot may be required)...
ECHO.
sc start Themes
ECHO.
GOTO restart_explorer
:restart_explorer
ECHO Stopping Explorer process...
ECHO.
taskkill /f /im explorer.exe
ECHO.
ECHO Wait 3 seconds...
ping -n 3 127.0.0.1 > nul
ECHO.
ECHO Starting Explorer process...
ECHO.
START %systemroot%\explorer
ECHO.
GOTO reboot_notification
:reboot_notification
ECHO %spacer%
ECHO A Logoff/Logon or Reboot is required to impose changes to User Account
ECHO Control settings and/or restart the Themes service in some cases...
ECHO %spacer%
ECHO.
GOTO done
:done
IF '%1' == 'go' ECHO adminification complete.
IF '%1' == 'un' ECHO adminification reversed.
ECHO.
@pause
IF '%1' == 'go' GOTO end
IF '%1' == 'un' GOTO end
CLS
GOTO p_mainmenu
:end
exit