I need to precise detect the OS on which my app is running. The reason is complicated but basically I have a DLL which creates and manages the PDF files. This DLL works perfect on all Windows OS, except on Windows Server 2012 (Don't know about future Windows versions)
Works on all versions from XP to Windows 7, Windows 8, Windows Servers 2003, 2008.
Only Windows Server 2012 hangs the program when trying to access that DLL functions.
I need to detect the Windows Server 2012 OS and avoid calling this DLL and do some other PDF management is such case.
I was also thinking if there is some very specific file somewhere in Windows folder, which is solely related to Windows Server 2012 OS, maybe I can detect such file and then know that the machine runs Windows Server 2012?
Thanks
Reliable OS version detecting
Re: Reliable OS version detecting
I don´t know if its available under Windows Server 2012 but most Windows version I ran had the ver command that returns the current version. It can be redirected to file and easily treated.
Regards,
André Dutheil
FWH 13.04 HB 3.2 BCC 5.82 MinGW 4.5.2 MSVS 10
André Dutheil
FWH 13.04 HB 3.2 BCC 5.82 MinGW 4.5.2 MSVS 10
Re: Reliable OS version detecting
Yes, I was thinking about that but cannot confirm the reliability of the numbers yielded in VER command.
In any case, I solved the problem in different way. After I confirm the OS, I have a small file on some folder if the OS is 2012, which I check and according to that, decide to use the library or not.
In any case, I solved the problem in different way. After I confirm the OS, I have a small file on some folder if the OS is 2012, which I check and according to that, decide to use the library or not.
Re: Reliable OS version detecting
Have you tried the function?
Code: Select all
? "Version S.O.: "+ Os()
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.