locked
how can I copy the ".js" file to Programes Files folder in win7 or vista? RRS feed

  • Question

  • I want to use System.IO.FileInfo.CopyTo() methord or System.IO.File.Copy() methord a ".js" file to "C:\Program Files\MyProgrameFolder" ,

    but in win7 or vista, it thow a UnauthorizedAccessException exception,

    and when I copy other file type(such as ".gif", ".html"), it works ok.

     

    how can I copy the ".js" file to Programes Files folder in win7 or vista?

    Thursday, August 11, 2011 4:28 AM

Answers

  • Hi,

     

    Thanks for posting in Microsoft TechNet Forum.

     

    Please ensure that you have the administrator privilege when you are changing the Programs Files settings and files.

     

    As this issue is a development issue, I suggest you post to MSDN forum for further help, they are the best resource to help you on this kind of issue:

     

    Windows: General Category

     

    Thanks for understanding and cooperation.

     

    Alex Zhao

    TechNet Subscriber Support in forum

    If you have any feedback on our support, please contact tnmff@microsoft.com.


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    • Marked as answer by Cloud_TS Monday, August 22, 2011 3:13 AM
    Monday, August 15, 2011 2:23 AM