executable

How can I run a program or batch file on the client side?

扶醉桌前 提交于 2019-11-26 14:47:49
How can I run a batch file on the client side? An exe file? Just to open pre-installed program in client side? [Edit] Regarding ActiveX, I tried var activeXObj = new ActiveXObject("Shell.Application"); activeXObj.ShellExecute("C:\\WINDOWS\\NOTEPAD.EXE", "", "", "open", "1"); but this doesn't work. Any suggestions? From Javascript? You can't. It's a security risk. Think about it - would you want every website to be able to run programs on your PC? DreamSonic You mean launch an external program thru a browser window using JavaScript? No way you can do that! That's a goddamn security black hole!

Inno Setup always installs into admin's AppData directory

走远了吗. 提交于 2019-11-26 14:44:23
问题 I want to store my app in the current user's AppData directory to avoid problems with permissions we had when auto-updating our app (when it's stored in Program Files). We don't give the user the option of where to install the app. We've had complaints from non-admin users that the installer stores the app in the admin's AppData directory (after UAC of course), instead of the current user's AppData directory, which then prevents the app from running in the future. Firstly, I had

Getting the absolute path of the executable, using C#?

跟風遠走 提交于 2019-11-26 14:38:26
Have a look at this pseudocode: string exe_path = system.get_exe_path() print "This executable is located in " + exe_path If I build the above program and place the executable in C:/meow/ , It would print out This executable is located in C:/meow/ each time it is run, regardless of the current working directory. How could I easily accomplish this using C# ? MSDN has an article that says to use System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase ; if you need the directory, use System.IO.Path.GetDirectoryName on that result. Or, there's the shorter Application.ExecutablePath

How to alloc a executable memory buffer?

橙三吉。 提交于 2019-11-26 14:34:38
问题 I would like to alloc a buffer that I can execute on Win32 but I have an exception in visual studio cuz the malloc function returns a non executable memory zone. I read that there a NX flag to disable... My goal is convert a bytecode to asm x86 on fly with keep in mind performance. Does somemone can help me? JS 回答1: You don't use malloc for that. Why would you anyway, in a C++ program? You also don't use new for executable memory, however. There's the Windows-specific VirtualAlloc function to

How to find out which version of the .NET Framework an executable needs to run?

耗尽温柔 提交于 2019-11-26 14:29:59
I've got an executable file, and I would like to know which versions of the .NET framework this file needs to be started. Is there an easy way to find this information somewhere? (So far I tried ILDASM and DUMPBIN without any luck.) I think the closest you can reliably get is to determine what version of the CLR is required. You can do this by using ILDASM and looking at the "MANIFEST" node or Reflector and looking at the dissasembly view of the "Application.exe" node as IL. In both cases there is a comment that indicates the CLR version. In ILDASM, the comment is "// Metadata version" and in

Running an outside program (executable) in Python?

≡放荡痞女 提交于 2019-11-26 14:12:52
I just started working on Python, and I have been trying to run an outside executable from Python. I have an executable for a program written in Fortran. Let’s say the name for the executable is flow.exe. And my executable is located in C:\Documents and Settings\flow_model . I tried both os.system and popen commands, but so far I couldn't make it work. The following code seems like it opens the command window, but it wouldn't execute the model. # Import system modules import sys, string, os, arcgisscripting os.system("C:/Documents and Settings/flow_model/flow.exe") How can I fix this? Those

Determining application path in a Python EXE generated by pyInstaller

牧云@^-^@ 提交于 2019-11-26 14:11:05
I have an application that resides in a single .py file. I've been able to get pyInstaller to bundle it successfully into an EXE for Windows. The problem is, the application requires a .cfg file that always sits directly beside the application in the same directory. Normally, I build the path using the following code: import os config_name = 'myapp.cfg' config_path = os.path.join(sys.path[0], config_name) However, it seems the sys.path is blank when its called from an EXE generated by pyInstaller. This same behaviour occurs when you run the python interactive command line and try to fetch sys

Why an executable program for a specific CPU does not work on Linux and Windows?

眉间皱痕 提交于 2019-11-26 13:59:41
问题 An executable problem like exe does not work on Linux (without wine). When compiling source code compiler produce object code which is specific to a particular cpu architecture. But same application does not work with on an another OS with same CPU. I know code may include instructions to specific to the OS that will prevent executable running. But what about a simple program 2+2 ? Confusing part is what the hell that machine code prevents working. Machine code specific to cpu right? If we

What Can I Do To Reduce My Executable's Size (Delphi)?

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-26 12:44:38
问题 I release a single executable (.EXE) for a desktop program using Delphi 2009. I have no external DLLs or resources that I need for the program to run. I use two components: LMD Innovative\'s ELPack and Sergey Tkachenko\'s TRichView that are compiled into my executable. When I build my production version, using the \"Release\" build configuration, the executable file produced is 13,533 KB. Prior to using Delphi 2009, I was using Delphi 4. The executable it produced was only 2,671 KB while

Reason for huge size of compiled executable of Go

六眼飞鱼酱① 提交于 2019-11-26 12:25:29
问题 I complied a hello world Go program which generated native executable on my linux machine. But I was surprised to see the size of the simple Hello world Go program, it was 1.9MB ! Why is it that the executable of such a simple program in Go is so huge? 回答1: This exact question appears in the official FAQ: Why is my trivial program such a large binary? Quoting the answer: The linkers in the gc tool chain ( 5l , 6l , and 8l ) do static linking. All Go binaries therefore include the Go run-time,