Search found 5 matches

by goudeuk
21 Dec 2015 08:21
Forum: DOS Batch Forum
Topic: Overwriting a reg key in command line
Replies: 10
Views: 7476

Re: Overwriting a reg key in command line

PenPen and Aacini

Thank you for your detail explanation and examples. Very helpful
by goudeuk
21 Dec 2015 08:04
Forum: DOS Batch Forum
Topic: Overwriting a reg key in command line
Replies: 10
Views: 7476

Re: Overwriting a reg key in command line

Why wouldn't you just execute the command like this. The variable will expand to whatever is assigned to that variable before it executes the REG command. reg add "HKCU\Software\BBWin\hostname" /f /v "%hostname%.domain.co.uk" /t REG_SZ /d "Yes" Squashman thank you for ...
by goudeuk
21 Dec 2015 07:58
Forum: DOS Batch Forum
Topic: Overwriting a reg key in command line
Replies: 10
Views: 7476

Re: Overwriting a reg key in command line

Does it work if you put the set statement on the line above? I don't understand. The set statement is in the one-liner. In the spirit of teaching a technique to someone who isn't too sure, when programming it is always useful, and even vital, to try different things to find out if it works, and als...
by goudeuk
18 Dec 2015 10:50
Forum: DOS Batch Forum
Topic: Overwriting a reg key in command line
Replies: 10
Views: 7476

Re: Overwriting a reg key in command line

foxidrive wrote:Does it work if you put the set statement on the line above?


I don't understand. The set statement is in the one-liner.

foxidrive wrote:The pipe in that spot is not how a pipe is intended to be used.


I would appreciate it, if you could tell me how a pipe is intended to be used.
by goudeuk
18 Dec 2015 08:43
Forum: DOS Batch Forum
Topic: Overwriting a reg key in command line
Replies: 10
Views: 7476

Overwriting a reg key in command line

Hello everyone I am trying to change the following registry key: HKEY_LOCAL_MACHINE\SOFTWARE\BBWin\hostname Type: REG_SZ Data Value: %computername% The default value is %computername% but I need to change it to the full computer name, like this for example: PCname.domain.co.uk How can I do this at t...