Hezi Israeli
Hezi Israeli

Reputation: 439

exclamation mark in registry value

I have a problem when I tried to update via batch file registry key as follows:

REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /f /v DefaultPassword /t REG_SZ /d "vovaogova!"

but the exclamation mark is missing when I check it!! I know that there is meaning of exclamation mark in the path but what about the value?

Upvotes: 0

Views: 208

Answers (2)

Hezi Israeli
Hezi Israeli

Reputation: 439

As as aschipfl said.

I removed SETLOCAL EnableDelayedExpansion from my script and it works!!

Upvotes: -1

Anic17
Anic17

Reputation: 807

Maybe try using an escape character: ^

Like that: REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /f /v DefaultPassword /t REG_SZ /d "vovaogova^!"

For me, it adds the caret, but, try that.

Upvotes: 0

Related Questions