KeithM said:
Yes, it's a PowerShell script. The key itself was created manually (via regedit.exe). Its name & location are purely arbitrary --- just be sure you're not in conflict with a valid key.

The first code block in my post is working code, you can copy & paste into a PowerShell window and then execute. The second code block is just a copy & paste from PowerShell after pasting & executing the code from the first block.

As it stands, the script exports the dummy key and echos its contents. That's all I can do without a better understanding of what you're trying to do.

You say you're wanting to create .reg files. The easiet way to get a proper .reg file is to export a key. You might find it easiest to create a dummy key with all your desiered EXPAND_SZ values, then export that key. Again, without a better understanding of your final goal, it's hard to be more precise.
well for example im taking over notepad with notepad++ but to return to default, i cant add text back in the string, it wont work as it not hex/not of the expand variant. I like to have useful changes made into regfiles (and the ability to revert them) backed up or at the ready for migrations etc. So yes, as you noted in your other post - im trying to make reg files for easy click importation.

so that script, if i leave the dummy key in place. can i just edit the value and re-run the script and it'll echo the hex and spit out a new reg to the directory listed?

for a one off, creating a reg expand sz string with ascii and exporting it seems like a fair enough solution (that i never thought of lol) but if its something that'll crop up relatively often, and your script functions as i just alluded to, i think thats a win.

either way, i appreciate your time very much!

- - - Updated - - -

dalchina said:
will convert single and multiple hex strings to ASCII text and also the reverse

- both ways..

anyway, it's there if it's of any use. 4 possible tools. That's just one extract.
lol yep, that was one of the first sites i went over. Trying to avoid command line as that would be slow n cumbersome but i tried the others. the only one that does what i want "almost" was OTConvertIt. But booooy is that guy old. It barely opens, the border is jacked up looks like a win9x window. it hasnt been updated in some years and at some point it started going awry.

actually it could be due to my using of windows scaling and it not even being remotely primed for it perhaps. As it also shows up pretty darn big.

of course all that is secondary, and with some simpler strings it does it well enough to work. with more complex/longer stuff it gets the formatting wrong and leaves the user to try and sort it out.

its actually the fallback plan now hanging out in my maintenence folder :P

I was unaware of the ability to simply make a reg_expand_sz in the registry and manually enter the value and have it export properly. So thats another option. (plus what looks like a nifty PS1 script)

I think between all of this im pretty covered <3