PC Review


Reply
Thread Tools Rate Thread

How do I copy file from resources to C:\Notes?

 
 
Mark B
Guest
Posts: n/a
 
      31st May 2010
How do I programmatically copy SpecialNote.txt from my VB.NET app's project
resources to C:\Notes\ on user's PC at runtime?

 
Reply With Quote
 
 
 
 
Family Tree Mike
Guest
Posts: n/a
 
      31st May 2010
On 5/30/2010 10:59 PM, Mark B wrote:
> How do I programmatically copy SpecialNote.txt from my VB.NET app's
> project resources to C:\Notes\ on user's PC at runtime?


Why did you ask this here and in the C# group, with a slight modification?

--
Mike
 
Reply With Quote
 
Mark B
Guest
Posts: n/a
 
      31st May 2010
Dim myEncoding As New System.Text.ASCIIEncoding()
System.IO.File.WriteAllBytes(myXMLFileLocation,
myEncoding.GetBytes(Properties.Resources.AddinUserSettingsXML))


"Mark B" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> How do I programmatically copy SpecialNote.txt from my VB.NET app's
> project resources to C:\Notes\ on user's PC at runtime?


 
Reply With Quote
 
Phill W.
Guest
Posts: n/a
 
      1st Jun 2010
On 31/05/2010 03:59, Mark B wrote:
> How do I programmatically copy SpecialNote.txt from my VB.NET app's
> project resources to C:\Notes\ on user's PC at runtime?


Have you made this directory writeable by /every/ user?
If not, UAC will get in the way on Vista and Windows 7 - directories
outside the user's own hive are usually read-only.

Do you overwrite the file every time your application runs, or only to
first create it?

Why do you need to copy it there anyway?
Do you need to "feed" it to some other program?
If you're only using it within your own code, you can probably find a
way to use the text in the Resource object directly.

HTH,
Phill W.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I copy file from resources to C:\Notes? Mark B Microsoft C# .NET 3 31st May 2010 04:23 AM
How to copy Notes to Google notebook or to file, retaining paragra Dima Microsoft Outlook Discussion 0 17th Dec 2008 06:27 AM
How to copy Notes to Google notebook or to file, retaining paragra Dima Microsoft Outlook Installation 0 17th Dec 2008 06:27 AM
How to copy Notes to Google notebook or to file, retaining paragra Dima Microsoft Outlook Third-Party Utilities 0 17th Dec 2008 06:27 AM
How do I copy a sound/pic from my resources folder/resx file in my project to a folder in mydocs? yatrix7@hotmail.com Microsoft VB .NET 0 23rd Aug 2006 03:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:36 AM.