The strange thing is that if the script is run manually, it works. Even if UAC is not turned off...