Reputation: 2801
I'm trying to save a image into a local drive using Image.Save
method. It works fine in other OS but I see only problem in Win7.
In Win7 it can't overwrite existing images, even it does not throw any error. Possibly it's a bug in Win7 as I see a related hot fix here http://support.microsoft.com/kb/2028610 .
But this hot fix doesn't solve my problem. If anyone have encountered same issue please let me know.
Thanks.
Upvotes: 1
Views: 537
Reputation: 7176
What folder are you trying to save it to? The root folder of your C: drive? Win7 is fickle about programmitcally saving files to the root folder of a drive. Try saving it to a folder off of the root and see if that helps.
Upvotes: 0
Reputation: 13947
This is sort of a workaround, but can you delete the existing image first? System.IO.File.Delete(path)
before the save should give you more info.
Upvotes: 1
Reputation: 1246
You probably need elevated privileges.
See here Windows 7 and Vista UAC - Programmatically requesting elevation in C#
Upvotes: 0