executable

Make an executable at runtime

与世无争的帅哥 提交于 2019-12-06 09:06:12
问题 Ok, so I was wondering how one would go about creating a program, that creates a second program(Like how most compression programs can create self extracting self excutables, but that's not what I need). Say I have 2 programs. Each one containing a class. The one program I would use to modify and fill the class with data. The second file would be a program that also had the class, but empty, and it's only purpose is to access this data in a specific way. I don't know, I'm thinking if the

Is there a way to control a third-party EXE file from VB.NET?

被刻印的时光 ゝ 提交于 2019-12-06 08:37:06
My goal is to control an application from VB.NET . There is no API, and I do not have the source, only the compiled EXE file. Is there a way to find the opened application, find a button within the application, click a button and know it was clicked? Is there a way to read the contents of a textbox within the application? Cheeso Yes, with Windows Vista (or Windows 7, or Windows Server 2003 and later) there are " UI Automation " APIs. There are managed options; System.Windows.Automation is one, shipped with .NET 3.0, as part of WPF ... Though System.Windows.Automation was shipped as part of WPF

How to read content of .EXE file in Java

南笙酒味 提交于 2019-12-06 08:05:15
What are the possible options and the most appropiate for reading an executable file in Java. I want produce the hexadecimal representation of an .exe file. Im thinking of reading the file in binary and then doing the conversion. But how can i read the .exe? 1) read the file in as bytes. use BufferedInputStream( new FileInputStream( new File("bin.exe") ) ) 2) convert each byte to hex format. static final String HEXES = "0123456789ABCDEF"; public static String getHex( byte [] raw ) { if ( raw == null ) { return null; } final StringBuilder hex = new StringBuilder( 2 * raw.length ); for ( final

How to turn my Jersey REST API into an executable JAR?

帅比萌擦擦* 提交于 2019-12-06 05:48:32
I am using Jersey, Maven; and could use Jetty, Tomcat or J2EE Preview (is that embeddable?). What is the easiest way to port my REST API as a standalone/executable JAR? Can I do it without Spring Boot? Follow these steps to create a standalone application with Jersey and Tomcat : Adding Maven dependencies Add the following dependencies and properties to your pom.xml : <properties> <tomcat.version>8.5.23</tomcat.version> <jersey.version>2.26</jersey.version> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> <project.build.sourceEncoding>UTF-8<

GCC on Windows: Set “Description” field of C executable?

梦想的初衷 提交于 2019-12-06 05:12:13
问题 How does one set the "Description" property of an executable? By this I mean the value displayed when you right-click an executable in Windows Explorer and it shows "Description:" with what seems to be just the name of the executable without the file extension. I'm running GCC 3.4.5 (mingw-vista special r3) on Windows XP. I have googled the heck out of this to no avail, but I have a feeling I might have to use a resource file with windres... am I on the right track at least? I actually have

Exe to python with pyinstaller?

醉酒当歌 提交于 2019-12-06 04:56:48
问题 So I made a huge mistake and deleted my code file (python). The only thing I have is my python file as .exe that I created with pyinstaller. Is there a way to reverse this and to extract my code file from .exe? 回答1: You can extract the contents of the .exe file using PyInstaller Extractor. Run it like this: python pyinstxtractor.py executable.exe You will then get a bunch of files, including your original python file. 来源: https://stackoverflow.com/questions/36581073/exe-to-python-with

Pyinstaller - Calling GDAL from os.system (gdal_translate)

两盒软妹~` 提交于 2019-12-06 04:28:36
Greetings learned fellows. Running 32bit Python2.7 on Windows 7. I'm have a question regarding including GDAL executables in a pyinstaller build. I am making a system call to run two GDAL functions from the FWTools release. These functions are in the PATH variable on windows C:\Program Files (x86)\FWTools2.4.7\bin and so it runs fine from the Python27 environment. However, this path is not carried over to the pyinstaller build. The code in question is calling a GDAL function to re-translate an image onto different geospatial co-ordinates. os.system("gdal_translate -of GTiff -a_ullr 694440.7939

Haskell Stack build specific executable

試著忘記壹切 提交于 2019-12-06 03:22:36
How to build an specific stack executable file, ie. those specified in projectname.cabal , like: executable executable-name hs-source-dirs: tools main-is: ExecutableModule.hs ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N build-depends: base , hsass , hlibsass I would need to compile executable-name and no other. It would be something like: stack build --executable executable-name Stack uses a component based lookup , e.g. stack build packagename:component-type:component-name So if your package is called "foo", and your executable is called "bar", you can use stack build foo:exe:bar

C# - How to call an exe added into project solution

混江龙づ霸主 提交于 2019-12-06 01:39:18
问题 So I added an EXE to my project's solution. The EXE does some stuff and outputs data via stdout. I want to capture the output, but more importantly how do I execute that EXE within my program? 回答1: Process p = new Process(); p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.FileName = "myExec.exe"; p.Start(); 回答2: Process.Start. To capture stdout you need to redirect it via ProcessStartInfo - there is an example on MSDN. Make sure also that the exe is

C# Application.ExecutablePath on WPF Framework 3.5

别说谁变了你拦得住时间么 提交于 2019-12-05 23:44:10
This line is fine in a WinForm Framework3.5 but not in a WPF Framework3.5. Path.GetDirectoryName(Application.ExecutablePath); How can I get the exe path on a WPF app ? Dzmitry Martavoi There are several ways to get exe path. Try the next: Application.StartupPath Path.GetDirectoryName(Environment.GetCommandLineArgs()[0]) Path.GetDirectoryName(System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName) Path.GetDirectoryName(Assembly.GetEntryAssembly().Location) System.Reflection.Assembly.GetEntryAssembly().Location Try this: System.IO.Path.GetDirectoryName( System.Reflection.Assembly