How to add a program in registry using batch file?

0

I want to add an .exe program to this registry path:

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

I tried this code

@echo off

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

but not working... please help me.

Ari Dey

Posted 2015-01-24T22:12:58.997

Reputation: 1

1Read, Set or Delete registry keys and values – DavidPostill – 2015-01-24T22:19:54.613

Do you think that notepad.exe could become a full scope Windows shell? – JosefZ – 2015-01-25T00:13:16.493

Easiest way to add a key is to manually use Regedit to create the key, then export just that key. This i a .REG file, rather than a .BAT or .EXE, but you can add it via "regedit.exe /S yourfile.reg" in a CMD prompt or BAT file run as Administrator. – DrMoishe Pippik – 2015-01-25T04:55:27.757

No answers