I get this message after installing new versions of WWL every time the application starts when I log in – until I right-click on the application and run it at least one time as an administrator on a Vista 32 machine with UAC enforced via group policy… My guess is that the app is running in the user context and lacks privileges to delete a file when it runs… Perhaps the migration of the map data should be done at the end of the installer instead of during the first run as a user? From what I can tell, the map data is stored in the user’s profile directory - so I’m not sure why it would be denied…
The log shows the following until the maps successfully migrate:
01/14/2009 09:24:44: Error 70: Permission denied at line 0 (modMain.Main) (6.0.6)
When Weather Watcher Live is run after a new install, it checks to see if the files in “C:\Program Files\Weather Watcher Live\Skins” and maps in “C:\Program Files\Weather Watcher Live\Maps.ww” are newer than the files in your profile. If so, the skins will be updated and the maps will be merged/replaced.
This data could be copied by the installer, but it would only hit the profile for the current user. What do you suggest for computers that have multiple users?
Since the installer is already running elevated, can that check take place within the installer and not during the apps first run?
For the skins, yes, but the installer is not smart enough to merge the maps. If you tell the installer to execute Weather Watcher Live at the end of the install process, wouldn’t the installer launch Weather Watcher Live using the same permissions? It sounds like it would work, but I’d have to test out that idea to be sure.
What about multiple users?
Hmm… What Im not sure of now – if it is just doing a comparison and reading data from the Program Files directory, and only doing writes to the users profile directory, why would it be getting an access denied? From what I understand, UAC shouldn’t complain when an app writes data to the user profile.
The error message you posted above did not report the actual line number. Please try installing the following Weather Watcher Live build and let me know if the error changes:
I’m assuming the error message will be the same, but the line number should report something other than 0.
01/15/2009 23:48:18: Error 70: Permission denied at line 980 (modMain.Main) (6.0.7)
01/15/2009 23:49:22: Error 70: Permission denied at line 980 (modMain.Main) (6.0.7)
There you go… Is that during a delete operation? When this happens, I get the message everytime WWL starts up – until I run as admin…
I see that Vista has created a skins folder at %USERPROFILE%\AppData\Local\VirtualStore\Program Files (x86)\Weather Watcher Live\Skins – which tells me WWL is trying to write data in the user context to the Program Files folder, which isn’t permitted with UAC on without elevation… My guess is the program goes to write the data to Program Files, which it cant, Windows virtualizes it instead to the VirtualStore folder, and then when you’re done with the housekeeping, the file that needs to be deleted from Program Files never gets deleted.
Perhaps you should be writing and deleting the common map & skin data at install time to %PROGRAMDATA%?
Yes – Weather Watcher Live was attempting to delete the “Skins_New” folder in the Weather Watcher Live program folder.
That idea would most likely work if all versions of Windows used that folder.
I made some changes to the install process that I think will resolve this issue. Please give the following Weather Watcher Live installer a try and let me know what happens:
That seemed to do the trick… What changed?
The skins are now installed directly into the “Skins” folder – rather than copying them from “Skins_New”. That folder was more-or-less used to put up a flag when new skins have been installed.