Created
January 7, 2013 22:34
-
-
Save jclement/4479168 to your computer and use it in GitHub Desktop.
Helper code to push Crystal Reports folder into Environment to help with periodic startup issues
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void SetCrystalPath() | |
{ | |
string crpath; | |
if (Environment.Is64BitProcess) | |
{ | |
crpath = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86) + @"\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win64_x64"; | |
} | |
else | |
{ | |
crpath = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) + @"\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86"; | |
} | |
Environment.SetEnvironmentVariable("path", Environment.GetEnvironmentVariable("path") + ";" + crpath); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment