|
|
|||||||
hello everyone, I want to add a reg key when a key does not exist I need add UserTemplates RED_EXPAMD_SZ J:\test What can I do,Pls help me. |
||||||||
|
|
|||||||
Well it could be that you don't have the string in quotes and you're getting an error but since you don't show or log it you don't know. Try using this instead. Code: Dim $WV $WV = WriteValue("HKCU\Software\Microsoft\Office\12.0\Common\General","UserTemplates","j:\test","REG_EXPAND_SZ") 'Key update value: ' + @ERROR + ' - ' + @SERROR ? How to manage templates in 2007 Office programs http://support.microsoft.com/kb/924460 Frequently asked questions about the location of templates in Word 2003 or in Word 2007 http://support.microsoft.com/kb/826867 Provide custom Information Rights Management rights policy templates in Office 2007 http://technet2.microsoft.com/Office/en-...3.mspx?mfr=true Create, remove, or change a trusted location for your files http://office.microsoft.com/en-us/word/HA100319991033.aspx |
||||||||
|
|
|||||||
Shoud I use addkey to add a regedit in HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Common\General then use writevalue to change the value of regedit? |
||||||||
|
|
|||||||
Nope, WriteValue will create at any level all on it's own. |