executable

How can I know if my executable will also to run on other computers (linux)?

我是研究僧i 提交于 2019-12-12 15:12:25
问题 I have an executable I want to be able to distribute and run in other Linux systems. Is there a way to be reasonably sure if this will work, without access to the final runtime environment? For example, I am concerned my executable could be using a dynamic library that is only present on my development machine. 回答1: Supply any relevant shared libraries with the executable, and set $LD_LIBRARY_PATH in a shell script that invokes the executable to tell the linker where to find the shared

What are possible reasons for not mapping Win32 Portable Executable images at offset 0?

谁说胖子不能爱 提交于 2019-12-12 15:11:43
问题 I've been looking into Window's PE format lately and I have noticed that in most examples, people tend to set the ImageBase offset value in the optional header to something unreasonably high like 0x400000 . What could make it unfavorable not to map an image at offset 0x0 ? 回答1: First off, that's not a default of Windows or the PE file format, it is the default for the linker's /BASE option when you use it to link an EXE. The default for a DLL is 0x10000000. Selecting /BASE:0 would be bad

C# How to add my program to context menu?

烂漫一生 提交于 2019-12-12 11:14:59
问题 I have a c# executable file (created from a windows form application) and I would like to be able to add this file to the context menu. Furthermore, I should point out that I need to be able to add it to Windows XP, Vista, and 7. Thank you for any help, 回答1: It is not that difficult and it is called context menu. Check this out Add a context menu to the Windows Explorer Basically you will need to add item to the Registry.ClassesRoot.CreateSubKey registry. 回答2: Yeah add context menu using

Get compilation Date & Time from .exe

折月煮酒 提交于 2019-12-12 11:09:31
问题 I have the full name & path of an executable, e.g. C:\IW4\BIN\iw32.exe , and want to extract the compilation date and time of that executable. How can I do this? I couldn't find any suitable solution. My C++ program must compile under Windows using Borland C++ Builder, if that info is of any worth. EDIT: I found some sample code and it works, thanks for all your pointers and hints! The Code is : #include <stdio.h> #include <windows.h> int main (int argc, char** argv) { WIN32_FILE_ATTRIBUTE

Compile for windows on linux using MonoDevelop

梦想与她 提交于 2019-12-12 10:50:25
问题 I want to know, because I can't find anything on google, If I use MonoDevelop to compile an application on Linux, can I send the generated executable to a Windows computer and expect it to run? file outputs this: PE32 executable for MS Windows (console) Intel 80386 32-bit Mono/.Net assembly so I would expect it to run on Windows out-of-the box. But I sent it to a friend for testing, and it said 'this is not a valid win32 application'. So, what do I need to do? It is just a basic hello world

Python: Using wmi to start executable remotely

吃可爱长大的小学妹 提交于 2019-12-12 09:23:16
问题 Im trying to run an executable file remotely on Windows using the wmi module. it establishes the connection but I think my process line is incorrect, as when I check the server the executable definately has not been run. Can you guys help me on the syntax with this? import wmi, time ip = '10.12.62.186' username = "administrator" password = "CLARiiON!" from socket import * print "Establishing connection to %s" %ip connection = wmi.WMI(ip, user=username, password=password) print "Connection

How can I programmatically start a program in the 32 bits or 64 bits environment?

北慕城南 提交于 2019-12-12 08:59:08
问题 I have a binary that can be run in both 32 and 64 bits, that loads dynamic bundles for fiddling purposes. However, by default it runs on the 64 bits environment; so if I hit a 32-bits only bundle, dlopen fails. It's easy to check for this beforehand, so all I really need is a way to choose whether to launch it in 32 bits or 64 bits. How can I programmatically do that? I'm open to anything Snow Leopard might support. 回答1: In addition to what @GWW wrote, if you really want to do this

LINUX: Is it possible to write a working program that does not rely on the libc library?

▼魔方 西西 提交于 2019-12-12 07:58:31
问题 I wonder if I could write a program in the C -programming language that is executable, albeit not using a single library call, e.g. not even exit()? If so, it obviously wouldn't depend on libraries (libc, ld-linux) at all. 回答1: I suspect you could write such a thing, but it would need to have an endless loop at the end, because you can't ask the operation system to exit your process. And you couldn't do anything useful. Well start with compiling an ELF program, look into the ELF spec and

C# Application Scanning

半城伤御伤魂 提交于 2019-12-12 05:14:42
问题 I want to scan and get all the Application files in my computer. I know how to get them, but I want only the applications which are Executable (except for Installers). Basically, what I want is the same function steam uses. Example: 回答1: If you want to get the list of installed applications on your system, you can query the registry. Refer to Get installed applications in a system for an example. 回答2: You can use this code to find all exes recursively in a directory DirectoryInfo dirInfo =

How is a process created from an ELF file?

北战南征 提交于 2019-12-12 04:24:21
问题 Can anyone please share some link or book that explains in detail about how a process is created from an ELF file. Most of the materials freely available seems to be abstract with out explaining most details like what information is taken from program headers and how the process image is in memory using that information. Thanks 回答1: elf files work in the following way Every segment describes a bunch of sections sharing the same charcteristics together, such as Load to memory, each section has