Did you try running the script As Administrator? Windows 7 is more finicky about permissions and seeing other programs running than XP, and Windows 8 is more finicky than Windows 7. I find many of my scripts that get the program that owns the current window and similar, have to run as administrator.