Rob,

Thanks so much for pointing out the write up!  Here's what's happening now:

I updated the manifest to the following:

exec { 'sageset.bat':
        path => "c:\\windows\\sysnative;c:\\windows\\system32;$::path",
        command => "cmd.exe /c c:\\temp\\sageset.bat",
        provider => windows,
        logoutput => true,
     }

If I run the Puppet agent interactively from the node, I get the results I 
expect (all Disk Cleanup boxes are checked when I run "cleanmgr /d c: 
/sageset:100").  However, if I let manifest run normally from the 
puppetmaster, the boxes remain unchecked.  Why is that, and what steps do I 
have to take so that the manifest will create successful results when run 
from the master?

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/c9774515-e294-4223-a096-ee74f3b5c698%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to