17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/puppet/provider/regpowershell.rb', line 17
def self.run(command, precommand = nil)
command = precommand + command unless precommand.nil?
utilpath = File.expand_path('../../../puppet_x/util', __FILE__)
utilpath = File.join(utilpath, 'Set-RegOwner.ps1').gsub(File::SEPARATOR, File::ALT_SEPARATOR)
newcommand = "\n. #{utilpath}\n" + command
time = Time.new
output = powershell(newcommand)
Puppet.debug "Reg_acl: Powershell Command result - #{output}"
endtime = Time.new
Puppet.debug "Reg_acl: Powershell command execution time: #{((endtime - time) * 1000.0).round(2)} ms"
output
end
|