Skip to main content
Skip table of contents

Configuration by script - Power Shell

For a more streamlined configuration, you can use a PowerShell script to make it easier to grant permissions to the NDD Print MF Epson application on the installation server. Below are the steps to follow.

The steps below must be performed by a user with administrator permissions on the server where NDD Print MF Epson will be installed.

1. Open PowerShell with elevated permissions

  1. Right-click on the Windows Start menu.

  2. Select Windows PowerShell (Admin).

  3. Confirm execution with administrative privileges, if prompted.

2. Run the script to grant permissions

  1. Copy the code block below and paste it into PowerShell:

CODE
$path = 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\NDDigital'
$acl = Get-Acl $path
$rule = New-Object System.Security.AccessControl.RegistryAccessRule (
    'IIS APPPOOL\nddPrintEpsonAppPool',
    [System.Security.AccessControl.RegistryRights]::FullControl,
    [System.Security.AccessControl.InheritanceFlags]::ContainerInherit,
    [System.Security.AccessControl.PropagationFlags]::None,
    [System.Security.AccessControl.AccessControlType]::Allow
)
$acl.SetAccessRule($rule)
Set-Acl -Path $path -AclObject $acl

This command grants full control to the IIS APPPOOL\nddPrintEpsonAppPool identity in the registry key HKEY_LOCAL_MACHINE\SOFTWARE\NDDigital.

3. Verify that the permission has been applied correctly

  1. Paste the following script into PowerShell to validate the configuration:

    CODE
    $acl = Get-Acl -Path $registryPath
    $found = $false
    
    foreach ($rule in $acl.Access) {
        if (
            $rule.IdentityReference -eq $expectedRule.IdentityReference -and
            $rule.RegistryRights -eq $expectedRule.RegistryRights -and
            $rule.InheritanceFlags -eq $expectedRule.InheritanceFlags -and
            $rule.PropagationFlags -eq $expectedRule.PropagationFlags -and
            $rule.AccessControlType -eq $expectedRule.AccessControlType
        ) {
            $found = $true
            break
        }
    }
    Clear-Host
    if ($found) {
        Write-Host "✅ Permissão encontrada"
    } else {
        Write-Host "❌ Permissão NÃO encontrada"
    }
    Write-Host ""
    Write-Host ""
  2. If everything is correct, you will see the message:✅ Permission found

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.