0

I want to edit the registry key below...

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

The default data for valuename Shell is explorer.exe

I want to edit to be like explorer.exe,Myapp1,Myapp2

I did it manually, but is it possible to do it with a batch script?

Terry Jan Reedy
  • 18,414
  • 3
  • 40
  • 52
Ari Dey
  • 23
  • 1
  • 5

1 Answers1

0

You can use:
REG ADD [ROOT\]RegKey /v ValueName [/t DataType] [/S Separator] [/d Data] [/f]

in your batch to change/add registry keys. So it would be:

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "explorer.exe,Myapp1,Myapp2" /f

For more details refer to: http://ss64.com/nt/reg.html

Albert F D
  • 529
  • 2
  • 13
  • 33
  • Really appreciate your help. but unfortunately after running this script dont see any change in shell value data. – Ari Dey Mar 18 '15 at 04:22
  • Can you post your script here...? Strange, I've tested it on my computer and it works paste `reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "explorer.exe,Myapp1,Myapp2" /f` into notepad and save it as TEST.bat then try it – Albert F D Mar 18 '15 at 04:24
  • @echo off reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "explorer.exe,C:\Program Files\User Timer\Timer.exe" /f – Ari Dey Mar 18 '15 at 04:29
  • 1
    also, do you have administrator privileges? – Albert F D Mar 18 '15 at 04:37
  • As i told you before i am the only user and i have admin privilege...... can you post the exact script you used? – Ari Dey Mar 18 '15 at 04:46
  • Yes sorry for repeating my question, there was a delay before receiving your reply... Well I'm stumped, I've tried your: `reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "explorer.exe,C:\Program Files\User Timer\Timer.exe" /f ` on my machine successfully... You have created a batch file right? Not just a notepad text file named "TEST.bat"? – Albert F D Mar 18 '15 at 04:47
  • yes i saved it as .bat not .txt ..... and the file run successfully but no changes in reg value. did you check your re value change manually? i am using 32bit window 7.... is there anything got to do with os version? – Ari Dey Mar 18 '15 at 04:59
  • No, I don't think OS version matters. Just to be sure, open regedit -> click "edit" in the menu bar -> click "permissions..." -> in Group or user names: click "Administrators" check that the "Full control" box under allow is ticked. – Albert F D Mar 18 '15 at 05:18
  • ...also try left-click on the batch and "Run as Admin...". You may also want to check the batch file associations. – Albert F D Mar 18 '15 at 05:45