Solved

visual studio 2010

Posted on 2013-05-13
9
356 Views
Last Modified: 2013-05-14
I have searched and tried many solutions and am at my wit's end.  I am not a heavy programmer, but I can get things done.  I am writing a program that I wish to include files that will be copied to a specified directory when the application is executed.  Let's say a binary file named printme.plt needs to be copied from a solution directory (C:\program files\myCompnayName\Resources\ to C:\temp.

I have added printme.plt to the Resources folder and can call it in code.  The issue is that it is viewed as an array.  When I test to see what my.resources.printme.plt(0) is, I get "208".  Can someone help me with what I am doing wrong?

TIA.
Prostang
0
Comment
Question by:prostang
  • 5
  • 2
  • 2
9 Comments
 
LVL 85

Expert Comment

by:Mike Tomlinson
ID: 39162100
Write all those bytes out to your desired filename:
http://msdn.microsoft.com/en-us/library/system.io.file.writeallbytes.aspx
0
 

Author Comment

by:prostang
ID: 39162120
Idle_Mind,
I read what you posted and the link, but I don't get it.  According to what I understand, the array that vb is reading from my resource, I can use File.WriteAllBytes to create a file and write all that data into it?  What is the purpose of doing this?  Why create a file, when one already exists?  <mind fuzzy>
0
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 400 total points
ID: 39162140
I think what you're looking for is an installation package.  That would allow you to install the application, and during installation, place a copy of that file into a specified directory.
0
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 

Author Comment

by:prostang
ID: 39162165
I have that.  I thought Visual Studio w/ .net would allow me to package everything and then refer to it for copy and manipulation.  Thanks.
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 39164264
>I have that

You have a setup project?
0
 

Author Comment

by:prostang
ID: 39164910
I have another application that I use to package the application and checks for updates.
0
 
LVL 83

Assisted Solution

by:CodeCruiser
CodeCruiser earned 100 total points
ID: 39165087
>I have another application

That application can copy your exe file as well as the other file when installing the app.
0
 

Author Comment

by:prostang
ID: 39165143
That is what I have done in the past, but I thought I could include everything in the application.  I need to spend more time with VS2010 and get to know what I can and cannot do with installation packages.
0
 

Author Closing Comment

by:prostang
ID: 39165157
Not really a new solution, but it was pointed out that I continue on the path I have been on.
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show, step by step, how to integrate R code into a R Sweave document
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question