(imported topic written by Syro91)
Ok, so my next dumb “Hey I wonder if I can do this…” question:
Is it possible to append a line termination character to a string bound for __Appendfile or __createfile?
“Uhm…you can just Appendfile or enter a blank line when using CreatFile Until” you say?
well, yes and no. Unless I’ve missed something really simple (in which case, oh look, more egg on my face…), there is no way to combine itteration and concatenation while working with CreateFile or AppendFile
For example, I would like to set a value in all subkeys of the HKU hive:
this would, ideally look something like:
HKU\S-1-5-19
“Name”=“Test”
HKU\S-1-5-20
“Name”=“Test”
Now, if we want to leave the Values, out, the following just about works for actually listing all of the subkeys you are eventually targetting:
CreateFile until EOF
Windows Registry Editor Version 5.00
{("") of keys of key “HKU” of registry}
EOF
this results in soemthing like
http://HKEY_USERS\S-1-5-19\Software\Policies\Microsoft\Office\12.0\Excel\Security\FileOpenBlock
http://HKEY_USERS\S-1-5-20\Software\Policies\Microsoft\Office\12.0\Excel\Security\FileOpenBlock
Notice that the entries are not on separate lines. Appendfile behaves the same way.
So my question is, is there a way to concatanate a newline character? I tried using & “%00” but that really just gives me the first result, and doesn’t serve my purpose. Any ideas?