On Wed, Jul 29, 2015 at 4:28 PM, Dimitri Yioulos <dyiou...@gmail.com> wrote:
> Bob, > > I installed puppet-3.8.1-x64 on my 64-bit Win2k8 hosts. As you asked, I > looked in the registry location, and saw "StateFlags0100 REG_DWORD > 0x00000002 (2)". That's what I'd expect. However, in > ""HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Active > Setup Temp Folders", where the batch file is supposed to make the change, I > see ""StateFlags0100 REG_DWORD 0x00000000 (0)", meaning it isn't changed > when I run the manifest. Great catch! How do I remediate? > I did a write up on this recently - take a look at Compensating for Redirection[1] and changing the path appropriately. [1] http://docs.puppetlabs.com/puppet/latest/reference/lang_windows_file_paths.html#compensating-for-redirection > > > Dimitri > > On Wednesday, July 29, 2015 at 3:48:50 PM UTC-4, Dimitri Yioulos wrote: >> >> Hello, all. >> >> I'm trying to execute the following batch file (sageset.bat) on Win2k8 >> servers: >> >> @ECHO OFF >> REM Enable components to cleanup >> REG ADD >> "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Active >> Setup Temp Folders" /v StateFlags0100 /d 2 /t REG_DWORD /f >> REG ADD >> "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\BranchCache" >> /v StateFlags0100 /d 2 /t REG_DWORD /f >> REG ADD >> "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Downloaded >> Program Files" /v StateFlags0100 /d 2 /t REG_DWORD /f >> REG ADD >> "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\GameNewsFiles" >> /v StateFlags0100 /d 2 /t REG_DWORD /f >> ~ >> >> It makes changes to registry settings so that the disk cleanup utility >> will do a more thorough job of cleanup. It's the equivalent of running >> "cleanmgr /d c: /sageset:100", which opens a dialog box that presents a >> list of files to clean that one can check. >> >> The following is in my manifest: >> >> exec { 'sageset.bat': >> path => $::path, >> command => "cmd.exe /c c:\temp\sageset.bat", >> provider => windows, >> logoutput => true, >> } >> >> The results of the manifest run are that everything executed >> successfully. However, if I run "cleanmgr /d c: /sageset:100" after that, >> none of the boxes is checked. Running the batch file in a Windows CLI does >> work, and if I run "cleanmgr /d c: /sageset:100" after that, all of the >> boxes are checked. >> >> Why am I not getting this to work? >> >> Dimitri >> > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to puppet-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/cc065ede-60d5-42c9-860d-69eb5f5a4916%40googlegroups.com > <https://groups.google.com/d/msgid/puppet-users/cc065ede-60d5-42c9-860d-69eb5f5a4916%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- Rob Reynolds Developer, Puppet Labs *PuppetConf 2015 <http://2015.puppetconf.com/> is coming to Portland, Oregon! Join us October 5-9.* *Register now to take advantage of the Early Bird discount <https://www.eventbrite.com/e/puppetconf-2015-october-5-9-tickets-13115894995?discount=EarlyBird> * *—**save $249!* -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAMJiBK7d0RKoyYvsnyiNd3ua64cPiTwHgevMqw6hYf9Z2MxaUw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.