cEPRSInstallBlendSDK.psm1

enum Ensure
{
    Present
    Absent
}

[DSCResource()]

class InstallBlendSDK
{
    [DSCProperty(Key)] [String] $FilePath
    [DSCProperty(Key)] [String] $InstallDir
    [DSCProperty(Key)] [String] $FileName
   
    
    [InstallBlendSDK] Get()
    {
        $config = @{
        InstallDir = $this.InstallDir;
        FileName = $this.FileName
        }  

        return $config
    }

    [Bool] Test()
    {
       return $false
    }

    [void] Set()
    {
        $LogFile = "$Env:TEMP\Install_BlendSDK.log"
       
        try
        {
            Write-Verbose "FileDir: $($this.FilePath)" -Verbose
            Write-Verbose "InstallDir: $($this.InstallDir)" -Verbose
            Write-Verbose "LogFile: $LogFile" -Verbose
           
            Start-Process -FilePath msiexec -ArgumentList " /i `"$($this.FilePath)`" /qn " -Wait -Verbose
                  }
        Catch [system.exception]
        {
            write-Verbose $_.exception.message | Out-File $LogFile -Append
            write-Verbose $_.exception.message
        }
    }


}