Fórum
Ver pergunta

Obter PERCURSOAPL no Primavera Evolution   

24 visualizações
0
0

Boa tarde,

Tenho usado a rotina abaixo para obter o PERCURSOAPL do Primavera através do regedit, mas na versão Evolution estes valores já não existem…

Alguem tem solução? Obrigado.

 

private static string GetPathPlataforma()
       {
           string path;
           if (System.Environment.GetEnvironmentVariable("PERCURSOSGP100") != null)
           {
               path = System.Environment.GetEnvironmentVariable("PERCURSOSGP100");
           } else if (System.Environment.GetEnvironmentVariable("PERCURSOSGE100") != null)
           {
               path = System.Environment.GetEnvironmentVariable("PERCURSOSGE100");
           } else
           {
               RegistryKey registryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\PRIMAVERA\");
               if (registryKey.OpenSubKey("SGE100\") == null)
               {
                   registryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\PRIMAVERA\SGP100\Default\ADM\");
               }
               else
               {
                   registryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\PRIMAVERA\SGE100\Default\ADM\");
               }
               path = registryKey.GetValue("PERCURSOAPL").ToString();
           }
           return path;
       }

 

Faça login para poder traduzir
V10
Marcado como spam
Criado há 3 meses e 1 semana brunogomes
brunogomes Responsiveness Member