# Installation Service - A mídia está protegida contra gravação

**URL:** <https://community.latromi.com.br/t/installation-service-a-midia-esta-protegida-contra-gravacao/359>\
**Category:** Backlog\
**Tags:** erro, atualização, triagem\
**Created:** [Janeiro 27, 2020, 3:01pm UTC](https://community.latromi.com.br/t/installation-service-a-midia-esta-protegida-contra-gravacao/359 "2020-01-27T15:01:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![daniel.giacomelli](https://community.latromi.com.br/user_avatar/community.latromi.com.br/daniel.giacomelli/32/1476_2.png) [@daniel.giacomelli](https://community.latromi.com.br/u/daniel.giacomelli)\
**Post date:** [Janeiro 27, 2020, 3:01pm UTC](https://community.latromi.com.br/t/installation-service-a-midia-esta-protegida-contra-gravacao/359/1 "2020-01-27T15:01:36Z")

</div>

## Problema

Em alguns casos, quando o serviço **LATROMI Installation Service** tenta gravar informações no registro do Windows, ocorre o erro “A mídia está protegida contra gravação” e o serviço para.

Detalhes do erro:

```nohighlight
    System.IO.IOException: A mídia está protegida contra gravação.
    
       em Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)
       em Microsoft.Win32.RegistryKey.CreateSubKeyInternal(String subkey, RegistryKeyPermissionCheck permissionCheck, Object registrySecurityObj, RegistryOptions registryOptions)
       em Microsoft.Win32.RegistryKey.CreateSubKey(String subkey, RegistryKeyPermissionCheck permissionCheck)
       em Microsoft.Win32.RegistryKey.CreateSubKey(String subkey)
       em LATROMI.Install.AutoUpdateSettings.Save()
       em LATROMI.Install.AutoUpdateSettings.SaveDefault()
       em LATROMI.Install.AutoUpdateSettings.Load()
       em LATROMI.AutoUpdate.AutoUpdateService.CheckDefaultUpdates()
       em LATROMI.AutoUpdate.AutoUpdateService.StartUpdate()

    em LATROMI.AutoUpdate.AutoUpdateService.StartUpdate()
       em LATROMI.AutoUpdate.AutoUpdateService.Start()
       em System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       em System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       em System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       em System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       em System.Threading.ThreadHelper.ThreadStart()

```

## Causa

Desconhecida.

## Solução

Pendente
