Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

How to get Application Data folder/Word template folder in Vista

By: a guest on Feb 26th, 2012  |  syntax: None  |  size: 0.94 KB  |  views: 20  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. C:Documents and Settings<user>Application DataMicrosoftTemplates
  2.        
  3. <Property Id="APPDIR" Secure="yes">
  4.     <RegistrySearch Id="RegSearch_AppData"
  5.         Type="directory"
  6.         Key="SoftwareMicrosoftWindowsCurrentVersionExplorerShell Folders"    
  7.         Name="AppData"
  8.         Root="HKCU" />
  9. </Property>
  10.  
  11. <CustomAction Id="ActionWordTemplateFolderAssign"
  12.               Property="TEMPLATEFOLDER"
  13.               Value="[APPDIR]MicrosoftTemplates" />
  14.  
  15. <InstallExecuteSequence>
  16.     <Custom Action="ActionWordTemplateFolderAssign" Sequence="1" />
  17. </InstallExecuteSequence>
  18.        
  19. [AppDataFolder]MicrosoftTemplates
  20.        
  21. <Property Id="USERTEMPLATES">
  22.      <RegistrySearch Id="SearchUserTemplates"
  23.              Root="HKCU"
  24.              Key="SoftwareMicrosoftOffice11.0CommonGeneral"
  25.                  Name="UserTemplates"
  26.              Type="raw" />
  27.   </Property>
  28.        
  29. <DirectoryRef Id="TARGETDIR">
  30.    <Directory Id="TemplateFolder" Name="Templates"/>
  31. </DirectoryRef>
clone this paste RAW Paste Data