Method: Inspec::Resources::VBScript#initialize
- Defined in:
- lib/resources/vbscript.rb
#initialize(vbscript) ⇒ VBScript
Returns a new instance of VBScript.
| 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | # File 'lib/resources/vbscript.rb', line 36 def initialize(vbscript) @seperator = SecureRandom.uuid cmd = <<~EOH $vbscript = @" #{vbscript} Wscript.Stdout.Write "#{@seperator}" "@ $filename = [System.IO.Path]::GetTempFileName() + ".vbs" New-Item $filename -type file -force -value $vbscript | Out-Null cscript.exe /nologo $filename Remove-Item $filename | Out-Null EOH super(cmd) end |