Hi valuable Monks,
the problem:
Read a given (Windows) Registry key and store the "value" into another registry Key.
(Office 12 Upgrade to Office 16 and migrate the Templates Path)
-> Any way to accomplish this is welcome, even if it is not Perl as long as your are not offended ;-).
I tried it already with a .bat file too, but that was broken cause of the "hexcode"
what i want to do:
Read this:
[HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Common\General]
"SharedTemplates"=hex(2):47,00,3a,00,5c,00,4f,00,46,00,46,00,49,00,43,
+00,45,00,\
32,00,30,00,30,00,37,00,5c,00,57,00,4f,00,52,00,44,00,37,00,5c,00,56
+,00,4f,\
00,52,00,4c,00,41,00,47,00,45,00,4e,00,00,00
and directly "paste" it into the section listed below or save it into variable?
[HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Common\General]
"SharedTemplates"=hex(2):47,00,3a,00,5c,00,4f,00,46,00,46,00,49,00,43,
+00,45,00,\
32,00,30,00,30,00,37,00,5c,00,57,00,4f,00,52,00,44,00,37,00,5c,00,56
+,00,4f,\
00,52,00,4c,00,41,00,47,00,45,00,4e,00,5c,00,00,00
This translates to the Path G:\Office2007\... but this is different path for other users,
so i must read the key and store the same REG_EXPAND_SZ value into the ...\16.0 path.
I read the Modules examples but its not possible for me to accomplish this, and i dont understand this completely.
I only get some "subkeys" listed but i cant read or store it in the needed section.
I am at my other machine and saved the code on local drive,
so i cant provide an example of my (very bad) code right now.
Perhaps you did something similar already and maybe could provide me with your code which i may could adjust to my needs?
I tried it with StrawberryPortable which seems to include the Tie::Registry functionality.
I could only use Modules which are integrated into a portable Perl Version.
Thanks for your help
mh88
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.