Run A .exe File From Inside A VS2010 Project?

Aug 22, 2011

I am currently working on a school project in VS2010. I have added a .exe file in the project folder and added it to the Project as a 'Existing Item'. In Project Properties -> Publish -> Application Files the .exe file is shown.

The .exe file runs quite nicely when I use the Process.Start("C:\NameOfMyApplicationFolder\MyProgram.exe") hard code path to the .exe file. However, I am faced with two(2) challenges that I need to overcome. These are they:

1. If published on another machine the .exe file will not run as the hard code path to the .exe file will be different from that on my machine. Therefore I need a way to create a generic path to the .exe file. I have tried these [Process.Start("C:\|DataDirectory|\MyProgram.exe")] AND [Process.Start("Localhost\|DataDirectory|\MyProgram.exe")]; I got an error message that "The system cannot find the file specified".

2. I am putting the Process.Start("xxxxx.\MyProgram.exe") on a button click event. I also want to put the running of the .exe file between two(2) lines of code. The first line of code is basically asking "Do you wish to run the executable file" - YesNo. If 'Yes' is selected the .exe file is run. Here is the problem: When the .exe program is closed the second line of code is to be executed. I have gotten the .exe to run (using the hard code file path) when 'Yes' is selected, and the second line of code to execute if 'No' is selected, but I have not been successful in getting the second line of code to execute after closing the .exe program. I have tried this: [If Process.Start("C:\NameOfMyApplicationFolder\MyProgram.exe").CloseMainWindow = True Then Do line 2 End if]. nothing happens when I close the .exe program.

View 14 Replies


ADVERTISEMENT

Updating An Project File From VS2008 To VS2010?

Oct 22, 2010

If I create a new project on VS2010, and add the WMP.dll reference place the WMP control on a blank VB form, build and debug the application it will run just fine.But if I upgrade a project that already had the WMP.dll reference in it, I cannot debug the application because I gives me this error

View 4 Replies

Working With A Text File Inside My Project

Feb 22, 2011

I have no code specifically for this part of my project just saying this ahead of time.I have not used text files that are inside my project but I want to be able to open the file when I load my form and save it when I close my form.I know how to save manualy and same with opening but that defeats the purpose this has to do as much as possible on its own.All I have are code from a project I made a while back which was a notepad program.[code]however I need this to all happen on its own and it needs to install these text files with the program hence why they are in with the project there are about 30 text files that will need to be with it so if I can get help with one then I can figure the rest out.

View 3 Replies

Save File To A Folder Created Inside Project?

Sep 1, 2011

I am confused on saving a file to a certain folder. I know how to save files and what not but what I can't figure out is this:I right clicked my project name in VS2010 -->New Folder and added a new folder. Now this folder shows up in my Solution Explorer. How to I reference this folders location?

View 5 Replies

Can A Vb6 Project Be Imported Into Vs2010

May 9, 2011

can a vb6 project be imported into vs2010? I have a vb6 project that I have been working on and would prefer not to start all over again.

View 6 Replies

Opening A VS2010 Project In VS2008?

Jul 24, 2009

I've made a few really simple VS2010 projects. I used .NET 3.5 for the last one. Should I be able to open them in VS2008?

View 3 Replies

VS 2010 Project Done In VS2010 To Use In A VS2008 PC?

Feb 15, 2011

Tomorrow, we have to submit our project for the first review.But I had created it in VS2010 ! But in our labs, we have VS2008, where this project will be copied and reviewed by our tutor.

I know, my project won't open in that system having VS2008 installed. Is there a solution to fix this issue that I'm going to face on tomorrow ?

View 10 Replies

Execute .net Code Using Vs2010 Without Running The Project?

Sep 29, 2010

This may be a strange question and have no answer but I thought I would post it to see how you would go about doing it. I have a line of code:

Grade = Math.Round((Math.Abs(CorrectAnswers) / TotalQuestions) * 100)

Basically that line just figures out the grade no major code work there, what I want to do is execute that specific line with different variables without running the whole application and navigating to the point in the application which for this segment would be completing a 150 question exam, or coding some #temp page and running it from there.

View 3 Replies

IDE :: VS2010 - Cannot Publish Because Project Failed To Build

May 20, 2010

I am using VS2010. I have a project that has been deployed for several years. Project builds fine but now suddenly I get the message "Cannot publish because a project failed to build. This program is been updated and published hundreds of times.

View 11 Replies

IDE :: VS2010 EDMX And Modeling Project Integration?

Jun 18, 2009

hook up the edmx generated classes such that we can include them on the uml models? This would be great if we could because when we do support we could reverse engineer the database, generate the objects and then directly use them in our sequence diagrams and in our workflow services. Also if we could generate code, and or link code back to the model from the UML model classes that would be great as this would let us graphically show our applications at any point.

View 1 Replies

Billing System Project Using Vs2010 And Sqlserver 2008?

Aug 24, 2011

currently i am doing a billing system project using vs2010 and sqlserver 2008. i got 2 form, one for invoice & one for delivery order, and a button to submit the invoice details to DO form.

would like to ask a few question,

1) once i add new transaction, the invoice number will be auto increment and save all details into database table.

2) the invoice number cannot use again even after the transaction being canceled.

3) how to make the DO number and invoice number the same as per transaction done / undone.

View 7 Replies

.net - VS2010 ItemTemplate Throws Exception Until Project Properties Opened?

Feb 21, 2012

Okay, so I wrote a few custom ItemTemplates for VS2010 that implement IWizard in VB.NET (4.0). Straight forward enough. They work during my testing, but when someone else deploys and attempts to use any of them, Visual Studio throws an incredibly generic Exception has been thrown by a target of invocation error.

Stranger still, after they open up the project properties and try again... they work. Without changing anything. Anyone have any clue what is going on? Or perhaps even just a way of getting VS to give me a more specific error? I already tried devenv.exe /log but nothing out of the ordinary was there.

View 1 Replies

Data Binding In VB2010 - Migrating A Project From VS2008 To VS2010?

Sep 16, 2010

I am migrating a project from VS2008 to VS2010 (Framework 4)and I keep getting the following error when trying to use databinding with a child property in VB2010.

View 7 Replies

Open And See Data Inside A .ISO Bin File From Inside An Application

Mar 30, 2010

im new to coding (started coding last month) so im a little stuck on how to do this, im making some emulation programs to learn coding with, and a part of it is to point the app to a .iso/.bin file and scan the data inside of the iso/bin to check if a file exists.[code]My issue is i cant find any class examples, or any information etc on how to code it so my application can see the data inside of the iso/bin instead of just see'ing the iso/bin file, so that i can then check the data inside the iso to see if the file exists etc.Im a novice still at coding so making a new class myself to look inside the iso/bin is to complex for me.

View 1 Replies

VS2010 .NET And Windows 7 Access Denied On Writing To Or Creating Files In Project Files Folder?

May 22, 2012

Ok I know this question has been asked to death but I still have not seen a good answer. I have created an application in VS2010 using VB.NET. In my application I have an error log that is an XML file located in the Public gstLocalErrorLogLocation As String = Application.StartupPath & "ErrorLog"that gets written to in the event of an error so I can trouble shoot application easier. My application also downloads files from our FTP site and puts the files in Public gstLocalDownloadLocation As String = Application.StartupPath & "download"So I have files that get read and written to as well and created and deleted all in the Application.StartupPath which is either "c:Program Files(Application Directory)(Some Directory)(Some File)" or "c:Program Files (x86)(Application Directory)(Some Directory)(Some File)" depending on 32bit or 64bit Windows 7.

After creating the setup I install it on my test machine that have both Windows 7 32bit and 64bit.Everything in the application works great till I have to write to, delete or creat a file in those directories above. I know it is an access issue and the UAC. This will get installed on numerous systems so the options I have seen to change file or folder permission on the computers manually is not an option.What has to happen is after I install the application it just works like when you install it on XP. Some post have suggested that you us a user with administrator privilages or group which is all fine and dandy but the user I have used to test the application has all of that.

So what I am asking is how do you create an application with VS2010 in VB.NET that after creating a setup package and installing on Windows 7 will just work with out "Access to the path c:Program Files(Application Directory)(Some Directory)(Some File) is denied." If I have to install this on 100 Windows 7 computers it has to be a concreate no manually doing anything just install and work like when we installed on XP.

View 5 Replies

How To Run A .exe From Inside A VB 2008 Project

Oct 20, 2008

i was wondering if anyone knows how to get a VB 2008 project to run a .exe from withinside it???say i wanted a muti installer...with the installer packages embedded inside it....is it possible to call tghe .exe by clicking a button?

View 14 Replies

Reference A Folder Inside A Project?

Jun 24, 2011

I have added a folder with a bunch of images inside my vs2010 project. I want to reference this folder through code.Since the final prog may be deployed into different location absolute path won't do!

What is the standard way to get the folders relative path?

View 3 Replies

Run A Csharp Form Inside A VB Project?

Apr 16, 2011

i want to know how I could run a Csharp form from a VB project by pressing on a button.

View 6 Replies

Use The Images Inside The Resources Within Project?

May 6, 2010

I am trying to use a combobox that when a user selects an item than that particular item (image) is drawn on the form.

View 4 Replies

VS 2008 How To Open Other .exe Inside Project

Jan 18, 2011

i want the .exe file inside my project open when i click the button i add.someone said, try this:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
System.Diagnostics.Process.Start(GetType(TEST), "firefox.exe")

[code].....

View 8 Replies

Forms :: Set The Path To A Directory Inside The Project?

May 2, 2010

I have a directory listbox, I try to set the path to a directory inside the project. how do I do that?

View 7 Replies

Get Path Of The Directory Inside WinForm App Project?

Jun 8, 2010

I have a directory named reports inside my winform project in .net. My project name is AccountingReports and inside that Directory reports exists. So i need the way to access this path via code. In Asp.net we use Request.PhysicalApplicationPath property. So is there any method or property exists that will give me the root of my project

View 2 Replies

Include Git Revision Number Inside .NET Project?

Feb 5, 2012

I am using Git for source control on a .NET project. Is there any way to include the current Git revision number in my EXE upon compile time?

I'd like to be able to have the revision number available for an "About" dialog, or similar. Perhaps there is a way to update Settings.vb right before build?

View 2 Replies

Add A Desktop Shortcut Icon To Inside The Project Settings?

Nov 25, 2010

I just created a game program out of VBE2008 and did the build process to turn it into a .exe file.When I did the build function I apparently missed the step of attaching an icon to the project.Now when I do a desktop shortcut to the .exe file there is no pretty icon - just an ordinary looking window box.How do I add a desktop shortcut icon to inside the project settings?

View 1 Replies

Create A Sub Main Inside A Class Which Is Itself Part Of A Project

May 17, 2009

why, when i create a sub main inside a class which is itself part of a project, i need to create it as a shared sub like this.[code]

View 2 Replies

How To Access To A Folder Created Inside The Project From The Code

Apr 4, 2009

how to access to a folder created inside the project from the code

View 1 Replies

Reusing A Menu Strip On Another Form Inside Project?

Mar 26, 2010

created a menustrip (MenuStrip1) by dragging the tool onto my form (form1.vb). And designed the headings/items etcI have now created another form (form2.vb) within the same project.I would like to use MenuStrip1 that i designed for form1.vb in my new form2.vb.

View 6 Replies

Reading Info From A XML File - VS2010

Mar 23, 2011

I have a XML document that im loading in to VS2010 This is the first time iv looked at XML in this sort of way

[Code]....

What i want to achieve is reading the Information from the XML document and then writing it to my back office (SQL) again this is for my own personal Use, i just want to get use to reading info from a XML file and doing things with the information i recieved from the file.

View 3 Replies

IDE :: Files Are Sometimes Placed In Miscellaneous File Folder By Vs2010?

Oct 7, 2011

in my solution explorer miscellaneous file folder i have aspx pages the same as in the project folder where i am working on, its is confusing, i dont see the folder in the windows explorer, if i delete the asp pages in the misc. file folder are the files i am working on also deleted? i dint put them there, vs does. is it a bug

View 4 Replies

Upgrading From VS2008 To VS2010 Breaks XSD File?

Dec 26, 2010

I've upgraded to VS2010 version 10.0.30319.1 RTMRel; when upgrading my VS2008 project, all is well and appears correct until I run the code. Then I get the following error when I run a report that uses an XSD file for the schema"Inconvertible type mismatch between SourceColumn 'TemplateName' of Byte[] and the DataColumn 'TemplateName' of String.".When I look in the original XSD file and in the new XSD file, one of my fields has been converted from a string to a byte and I have no idea why.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved