Pay attention to 1C:Subsystems Library. It already has several subsystems for updates. Here they are: Infobase version update Update legality check Dynamic update monitoring
Regarding your question to get the configuration version you can use the following script:
Code
Metadata.Version
Note that you might also need to know the 1C:Enterprise platform version if you use new features of new versions to determine if your application will work at this version platform correctly. To get the platform version use the following script:
Code
SystemInfo = New SystemInfo();
Message(SystemInfo.AppVersion);