exe

appending data to an exe

岁酱吖の 提交于 2019-11-27 19:29:35
This question extensions from one of the answers to my earlier question: how to save user registration in the exe... (C#) . The idea itself is still very new to me, but it seems plausible. My first attempt of simply appending a string to the exe from inside a different application didn't work. Then got a little smarter and tried appending bytes. Still no luck. I've found various documentations on Windows Portable Executable files: http://en.wikipedia.org/wiki/Portable_Executable http://msdn.microsoft.com/en-us/magazine/bb985997.aspx http://msdn.microsoft.com/en-us/windows/hardware/gg463125

Start exe after msi install but using current user privileges

时光毁灭记忆、已成空白 提交于 2019-11-27 18:30:55
问题 I am using Visual Studio 2008 to build an MSI install package. Within the install I have numerous custom actions. Within the OnAfterInstall custom action I attempt to start an exe which is deployed by the install. The exe starts ok, but runs within a security context of NT AUTHORITY\SYSTEM (i.e. under the elevated privileges granted to the Windows Installer process). I actually need the exe to run in the security context of the currently logged-on user who started the install in the first

Bat file to run a .exe at the command prompt

丶灬走出姿态 提交于 2019-11-27 17:11:22
I want to create a .bat file so I can just click on it so it can run: svcutil.exe /language:cs /out:generatedProxy.cs /config:app.config http://localhost:8000/ServiceModelSamples/service Can someone help me with the structure of the .bat file? To start a program and then close command prompt without waiting for program to exit: start /d "path" file.exe user2075928 You can use: start "windowTitle" fullPath/file.exe Note: the first set of quotes must be there but you don't have to put anything in them, e.g.: start "" fullPath/file.exe shinukb it is very simple code for executing notepad bellow

Make Java program as independent exe (run without JVM)

≯℡__Kan透↙ 提交于 2019-11-27 16:14:23
问题 Is there any way to make Java program as independent exe (run without JVM)? 回答1: I've used Excelsior JET to compile my Java into a native executable file on Windows. It worked real well. There are always opportunities for gotchas - I think JNI is a problem - but I was pretty happy. 回答2: http://gcc.gnu.org/java: GCJ is a portable, optimizing, ahead-of-time compiler for the Java Programming Language. It can compile Java source code to Java bytecode (class files) or directly to native machine

pyInstaller: Import Error

三世轮回 提交于 2019-11-27 15:17:12
I'm in Windows, using pyInstaller to package an python file. But something error occurred: Traceback (most recent call last): File "<string>", line 2, in <module> File "D:\Useful Apps\pyinstaller-2.0\PyInstaller\loader\iu.py", line 386, in i mportHook mod = _self_doimport(nm, ctx, fqname) File "D:\Useful Apps\pyinstaller-2.0\PyInstaller\loader\iu.py", line 480, in d oimport exec co in mod.__dict__ File "D:\Useful Apps\pyinstaller-2.0\server\build\pyi.win32\server\out00-PYZ.p yz\SocketServer", line 132, in <module> File "D:\Useful Apps\pyinstaller-2.0\PyInstaller\loader\iu.py", line 386, in i

Finding my main executable's path using Assembly vs AppDomain

旧时模样 提交于 2019-11-27 13:49:56
问题 I'm a .NET user, and my goal is as simple as finding the absolute path of the directory of my main executing assembly (the EXE file). I have several candidates: Assembly.GetExecutingAssembly().CodeBase Assembly.GetExecutingAssembly().Location AppDomain.CurrentDomain.BaseDirectory If to judge by the .NET documentation - I'm leaning towards CodeBase . Can anyone shed light over all three in a bit more specific terms than the .NET documentation? An example to demonstrate the difference perhaps?

Alternative to “Allow service to interact with desktop”?

落花浮王杯 提交于 2019-11-27 13:13:30
I have a windows service (C#) installed on a server that launches every 10 minutes an executable file (C#) to process some images from one directory to another. No interaction is required with any user. Nevertheless, since the executable file as an output window, to make the service run I have to enable the " Allow service to interact with desktop " checkbox which is considered as an insecure and bad practice . How would I go about this problem? I like to have the executable separated from my windows service because it makes it easier to debug and doesn't require a full windows service

Bundling Data files with PyInstaller 2.1 and MEIPASS error --onefile

放肆的年华 提交于 2019-11-27 12:55:36
This question has been asked before and I can't seem to get my PyInstaller to work correctly. I have invoked the following code in my mainscript.py file: def resource_path(relative_path): """ Get absolute path to resource, works for dev and for PyInstaller """ try: # PyInstaller creates a temp folder and stores path in _MEIPASS base_path = sys._MEIPASS except Exception: base_path = os.path.abspath(".") return os.path.join(base_path, relative_path) When I run the py file (within IDLE), my app runs perfectly and loads all of the data files. However, when I bundle it with PyInstaller 2.1 (one

How to check if a file is signed in C#? [closed]

断了今生、忘了曾经 提交于 2019-11-27 12:10:58
I'm writing a program that need to load a few other files. is there a way to check if those files are signed or not, without right clicking them and check? I use 300-400 files that change every few days I need to check DLL/EXE/CAB/OCX/MSI (and maybe also vbs/js) is there a way to check it? Assuming you want to check if a file is Authenticode signed and that the certificate is trusted you can pinvoke to WinVerifyTrust in Wintrust.dll . Below is a wrapper (more or less reproduced from here ) that can be called as follows: AuthenticodeTools.IsTrusted(@"path\to\some\signed\file.exe") Where

How to change an executable's properties? (Windows)

放肆的年华 提交于 2019-11-27 11:36:46
问题 When I create a .exe, I can right click it and go to properties->details. Then I get a list like: File Description | Type | Application File Version | Product Name | Product Version | Copyright | Size | 18.0 KB Date Modified | 6/16/2009 8:23 PM Language | How do I change these properties? (And on a side note, is there a way to change the icon?) 回答1: If you are using C/Win32 you can add something like this to your project encapsulated in a *.rc (resource) file: VS_VERSION_INFO VERSIONINFO