Executable Directory Where Application Is Running From?
Apr 7, 2010I need to get the path (not the executable) where my application is running from:System.AppDomain.CurrentDomain.BaseDirectory()
View 3 RepliesI need to get the path (not the executable) where my application is running from:System.AppDomain.CurrentDomain.BaseDirectory()
View 3 RepliesIt appears that the executable application I created can only be run on a computer with .net 4. How can I compile/create the executable to run on a computer with .net 2?
View 3 RepliesFirstly I'm not a programmer and do not pretend to be one. I just enjoy killing some spare time I've been usining Visual Basic (started with VS2005 and now onto VS2010) to develop a program. Up until now I've been happy to plod along running the progam from the development environment. However, I recently was asked by an colleague if they could have a copy of the program to use.Therefore I opted to create an executable file for him to use. The problem is that whislt the executable file runs fine on my machine (Win 7) where VS2010 is installed, it does not deploy correctly on his machine (XP pro). Following is the message that I get:See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.
[Code]...
This may be simple but I have brain freeze on just nowIf I cd into a directory from a command line and then run my executable VB.net application, is there a way to detect the directory that it was launched from. I currently have the executable in my PATH however ideally the person would cd into the directory that they were wanting the executable to act upon.
View 3 RepliesI'm trying to run a program (mame.exe) within a vb program. Mame is a program that allows you to run old video games. The games are stored in rom files. If you want to run mame.exe from a dos prompt, the syntax is "c:/mame.exe [rom]". The [rom] is the particular game you are running. I'm trying to create a front end menu from which I can execute games.
I've tried:
Process.Start(
"c:/mamefiles/mame.exe [rom]")
and I get an error that says it can't find the file.
I tried
Process.Start(
"c:/mamefiles/mame.exe", "[rom]")
and it seems to start the program but immediately shuts down mame.I tried
Shell("c:/mamefiles/mame.exe [rom]")
and again it seems to start the program but immediately shuts down mame.
how to write/read a file in the same directory as the executable? I know how to read and write files, I just need to know how to read/write files in the same directory as the EXE.
View 19 RepliesCan a VB2005 executable created from VS2005 run on any Windows OS (vista, 7)? If not what is the "patch"?
View 1 RepliesVS sets your project up with the default directory structure: ...indebug which also seems to contain some other files besides your dll (I assume these are related to the debug symbols, etc).So how do you set it up to copy your dll to another directory when debugging?Right now, I'm having to manually copy the built dll with every run and that's getting to be a bit annoying.I'm using VS 2008?
View 11 RepliesI would like to implement into my program a version query of the executable and I figured the easiest way would be having a check on the date of the executable. So how can I check the creation date of the executable that is currently running (from the program itself that is)?In short - double click on .exe and it will tell the date of its creation
View 10 RepliesI have an old Fortran program that I've compiled to a windows executable. On opening this from an explorer window the executable runs fine, however on using Shell to run the program a traceback error occurs. Just to be sure I used Shell to open a batch file which runs cmd /K ...exe Why is it that on double-clicking the batch file it will run the executable correctly, however on calling it from my visual basic (very simple button) program the batch file opens the command prompt just fine but does not execute the whole Fortran code successfully? Incidentally I have found that the error occurs on a line to do with reading from a file; it can print to the command prompt etc. with no problems just not deal with the reading the external text file for some reason. By the way paths for files etc. are definitely correct. It makes no sense to me, but from a bit of research it may have something to do with correcting the read statements - at the moment they are just in the form: read(99,*)
View 1 RepliesI have a legacy vb6 application that uses a shell command to launch a newer .net application. It's a very simple command, just launches an app. Here's the problem. When I run the .net app through the shell command, it tries to connect to a database that is not referenced in it. If I double-click the .net executable, it runs just fine and connects the way it is supposed to. Normal, no problems. Only when I run it from the shell command do I have problems. I have checked everything I can think of and simply can not come up with a reason why the app would behave differently when launched from a shell command.
View 3 RepliesIt's probably the most basic of things, but all I can find is how to launch a program, and not with the interactions I desire. Any tips as to the terms to use to search for answers, or links to topics regarding questions similar to mine, would be very appreciated. I have a wealth of info to read through, but I could use your knowledge to save myself time.Here is what I am trying to do:
Use a Button (A) to Launch a Prompt where User Selects Directory Path to an executable Program. The Selection is to be Persistent after the initial selection (saved in a settings file i assume?), and the Selected Path (or just "programname.exe") is to be Displayed in a Text Field (B). Launch Selected and Indicated Program via a Launch Button (C)
I have an application that creates desktop shortcuts. To do this I have to reference the Windows Script Host Object Model. When I add it as a reference, it always creates the DLL, Interop.IWshRuntimeLibrary.dll, in the objx86Debug directory, then references itself to it, rather than looking at wshom.ocx. Even if I add reference wshom.ocx it reverts to saving the file in the objx86Debug directory. The problem is if I move my application to another computer without that DLL being present, the program fails to run.
View 1 RepliesI wrote this VB program to be able to throw a device we developed into programming mode where we use an ATMEL Flip installer to upload new firmware. I can program one device after another running the application off of Visual Studio Express 2010 or Visual Studio 2010, but when I go to publish this file and run it on another machine, it becomes unstable and crashes after each upload. On those same computers if I run the raw unpackaged program under Visual Studio Express, the system does not crash, and I can program devices repeatedly.
View 5 RepliesHow can I find the location of my application's executable in WPF (C# or VB.Net)?
I've used this code with windows forms:
Application.ExecutablePath.ToString();
But with WPF I received this error from Visual Studio:
System.Window.Application does not contain a definition for ExecutablePath.
I have an VB executable application(.exe) and I would like to get back sourcecode for my .exe application. Please help me if you have any software to get back source code from VB exe program.
View 4 RepliesI am trying to set up an application process to run an executable, which I include in the project's installation directory, and pass it the necessary parameters; however, I am running into issues as it doesn't appear to be doing anything at all.
Here is what I have:
I define the Process As
Private WithEvents conversionProc As New System.Diagnostics.Process
Then I setup the arugments and the process start info as follows:
Dim ogrDirectory As String
[Code].....
I have a program that outputs a file. I want the user to be able to just double-click the output file and launch the program, just like Word and Excel. In Word for instance, one doesn't necessarily have to open WORD then click on File--> Open and locate another Word doc. He can just go to the folder and open the Word doc. I want to implement the exact scenario in my program.
So far I have tried creating TextFile and added it to the Resources. On FormLoading, I simply I stream-read the Resouce file, but I can't write to the Resource on FormClosing, since the Resource is ReadOnly. Also, the Resource is built & compiled so I suppose you can't add anything to it at run time.How you lunch an output file without launching the Executable program that created it?
I have an executable that I was able to get working on all XP machines by registering all the .dll's associated with it.On Vista, however, I go through the exact same registration process but right when I open the executable it goes to a "WindowsApplication1 has stopped working" dialog. I registered the DLLs in the SysWOW64 folder. I also ran Dependency Walker which came up with IEFrame.dll as flagged, don't know if that is relevant though.
View 6 RepliesI have an application that has file extensions associated with it. The application has been deployed using ClickOnce. I have checked the associations table to confirm the entry is there and the association is to the 'ClickOnce Application Deployment Support Library'. When the application is triggered using a file with my extension, it does not pass the filename / directory in the CommandLine Arguments, instead you get the executable path of the application.
Which is under ..LocalSettingsApp"Random Strings"MyApp.exe
I have checked the Registry entry to confirm what the extension is set to open with and the application is dfshim.dll. Is there a way to overcome this, or is this just another limitation of ClickOnce deployment?
I have finish writing my codes for a project in VB, I now need to convert to an executable application that I can install on another machine.
View 2 RepliesJust trying to insert data from my application to web DB, but client starts lagging when inserting stared..I need each second insert data.
[code]...
code inserting data to web, but when it's lagging inpossible to do something..how to fix lagging?
If i have a file ( appres.exe ) in the resources of my VB 2008 Application (myVbApp.exe), how can I start from there? I don't want to save it (appres.exe) somewhere else before start, i want only myVbApp.exe, no more files.
View 1 RepliesThis is rather hard to explain but, I want to find a way to copy a file to another directory (where the file has already been executed, and cannot be access using normal means).I'm having a really hard time with this, it was easier in vb6, it basically unhooked itself from the executable after it started
View 5 RepliesI had done one application using api which send the message to given number. The working of software is very fine without any error working on windows XP SP2. I heard that vista already contain the .net frame work so didnt installed .net frame work in machine. I checked in vista it shows .net frame work is in machine. But when same code i tried to run on Vista it gives the error. Error is as follows
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at SmsSendingApplication.frmSingleMessage.InternetOpenUrl(Int64 hInternetSession, String& lpszUrl, String& lpszHeaders, Int64 dwHeadersLength, Int64 dwFlags, Int64
[Code].....
I've built an app that uses the Groupwise (email client) API. It will perform as expected when I hit F5,everything is good, when I use ctrl+F5 it fails with an access violation (see below). I tried to used JIT debugging, but I never get to see the source code, just the assembly. The app *never* fails with this error when run in the IDE.Groupwise documentation is sparse.[code]...
View 7 RepliesSince I sign my project .exe files with my code signing certificate, I want to check in my application MainForm_Load if the executable is signed and the signature is valid?If not signed or signature has been tampered it must exit the code.
View 2 RepliesI need to get the location/name of the directory that contains my application. I know I can get location of my app using My.Application.Info.DirectoryPath but I don't know how to get the directory above this. I can of course mess around with String.Split etc.. but I don't think that is necessary.
View 3 RepliesThere is a .Net executable (with a group of DLL's etc) that up to 100 people will be using simulatiously during the course of the day. Is it still acceptable/good practice to have all the users just have a shortcut to the network path for this executable? Or would it be better to copy the .exe, .dll's, etc locally to each users machine?
View 2 Replieswhat account for this error message in ls beta 2?'' The last change wasn't successfully persisted.Please shot down the running application.
View 1 Replies