Trying to copy code into registry and it changes

regsamp
regsamp used Ask the Experts™
on
Trying to copy code from a Notepad file into a registry key and it keeps turning into the code below.  How can I keep the original format that is in the attached file?  
A6S52-01C0000-GG000GM
131599125
2639482340

cr-ent.txt
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Ivano ViolaSystem Administrator

Commented:
Did you try it like this?:
"1A6S52-01C0000-GG000GM1315991252639482340"
Ivano ViolaSystem Administrator

Commented:
Using the "   "

Author

Commented:
I tried using the "  " and the code still changes.  
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Ivano ViolaSystem Administrator

Commented:
What is the full path to the registry key you are trying to add/edit?
HKLM - Software - ???
Most Valuable Expert 2011
Top Expert 2011

Commented:
Can you please post the actual .reg file?

Author

Commented:
I am trying to get access to the computer to get the full path for the registry.  The actual code I want to use is in the attachment.  

Author

Commented:
The path is Local Machine/Software/Crystal Decisions/9.0/Crystal Reports/Keycodes/CR Ent
Ivano ViolaSystem Administrator

Commented:
Try the attached reg file. I've tried it and seems to work fine.
code.reg
Ivano ViolaSystem Administrator

Commented:
One sec.....is it a new string value you're adding?
Ivano ViolaSystem Administrator

Commented:
The above reg file adds the code a DWORD value.
The one attached to this post adds it as a new String Value (named: code). You can change the name (Code) by opening the reg file with notepad and changing the name.
code2.reg

Author

Commented:
Ivanoviola, I am trying to add this value.  The one I listed above is what it turns into and I do not want to add that.  This is a new string.  The attachment below is the value I needed added unchanged.  
clip-image002.jpg
System Administrator
Commented:
What about this then:
see attached
code2.reg

Author

Commented:
Okay, thank you and let me try that.  
Bryon HSenior Technical Support Analyst
Top Expert 2010
Commented:
you can very easily do this thru a command prompt, either locally or from a different machine with authentication... see code below

reg add "HKLM\Software\Crystal Decisions\9.0\Crystal Reports\Keycodes\CR Ent" /v ValueName /t Type /d "1A6S52-01C0000-GG000GM1315991252639482340" /f

if you want to do it from "upstairs" and push it to another machine:
reg add "\\computer\HKLM\Software\Crystal Decisions\9.0\Crystal Reports\Keycodes\CR Ent" /v ValueName /t Type /d "1A6S52-01C0000-GG000GM1315991252639482340" /f

in either case, you have to change "ValueName" to whatever you want the value to be called
and, change "Type" to whatever it should be:  REG_SZ or REG_DWORD
(string or dword)

Open in new window

Bryon HSenior Technical Support Analyst
Top Expert 2010

Commented:
line 1 for doing it locally, or line 4 for doing it from a remote machine.  note lines 6 and 7 too.

Author

Commented:
Thank you for the command line approach bryon.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial