Access to the registry key 'Global' is denied.
在这条线上:
ramCounter = new PerformanceCounter("Memory","Available MBytes");