I don't think I had active desktop on, but I did have my display set to none for wallpaper. Once I put a generic bitmap as my wallpaper and then ran the script it worked and changed my wallpaper to the one in the script.