Make exe start with windows

Как запустить make файл в Windows?

У меня есть некоторые демо, которые я загрузил, и у них есть Makefile.win и Makefile.sgi. Как я могу запустить их в Windows для компиляции демонстраций?

Если у вас есть Visual Studio, запустите командную строку Visual Studio в меню “Пуск”, перейдите в каталог, содержащий Makefile.win , и введите следующее:

Вы также можете использовать обычную командную строку и запустить vsvars32.bat(c:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools для VS2008). Это создаст среду для запуска nmake и найдет инструменты компилятора.

Отъезд cygwin, среда Unix для Windows

Отъезд GnuWin make, который предоставляет собственный порт для Windows (без необходимости полная среда выполнения, такая как Cygwin)

Вот мой быстрый и временный способ запуска Makefile

  • скачать сделать из SourceForge: gnuwin32
  • установите его
  • перейдите в папку установки
  • скопируйте все файлы в корзину в папку , содержащую Makefile
  • откройте cmd (вы можете сделать это с помощью правого клика со сдвигом) в папке, содержащей Makefile, и запустить

Кроме того, вы можете добавлять аргументы после команды, например

С Visual Studio 2017 мне пришлось добавить эту папку в мою переменную env для Windows 10:

Там также HostX86

Во-первых, добавьте путь к общим инструментам визуальной студии ( c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools ) в системный путь. Чтобы узнать, как добавить путь в системный путь, ознакомьтесь с этим сайтом:
http://www.computerhope.com/issues/ch000549.htm. Вам просто нужно это сделать один раз.

После этого, когда вам нужно, откройте командную строку и выполните vsvars32.bat , чтобы добавить все необходимые пути визуальных студийных инструментов в системный путь.

Затем вы можете вызвать nmake -f makefile.mak

PS: Путь общих инструментов визуальной студии может отличаться в вашей системе. Пожалуйста, измените его соответствующим образом.

Если это “NMake Makefile”, то есть синтаксис совместим с NMake, он будет работать.

Часто предоставляются стандартные файлы Makefile для Linux, а NMake выглядит многообещающим. Однако следующая ссылка использует простой файл Makefile Linux и объясняет некоторые основные проблемы, с которыми вы можете столкнуться.

Если вы устанавливаете Cygwin. Убедитесь, что в программе установки выбрано “make”. Затем вы можете запустить следующую команду, если у вас есть Makefile.

Может быть, вы можете попробовать IDE NetBeans.

Этот вопрос может быть старым, но мое решение, которое является самым простым для любого пользователя Windows, я полагаю, не указано в списке.

Шаг 1: Установите менеджер пакетов шоколада для WINDOWS (совместимый с Windows 7+/Windows Server 2003+) здесь

Шаг 2: запустите choco install make

Шаг 3: Прибыль от ухоженного менеджера пакетов. Make будет добавлен в глобальный путь и работает на всех CLI (powershell, git bash, cmd…)

Where can I set path to make.exe on Windows?

When I try run make from cmd-console on Windows, it runs Turbo Delphi’s make.exe but I need MSYS’s make.exe . There is no mention about Turbo Delphi in %path% variable, maybe I can change it to MSYS in registry? Please, help.

Читайте также:  Equalizer apo эквалайзер для windows

5 Answers 5

The path is in the registry but usually you edit through this interface:

  1. Go to Control Panel -> System -> System settings -> Environment Variables .
  2. Scroll down in system variables until you find PATH .
  3. Click edit and change accordingly.
  4. BE SURE to include a semicolon at the end of the previous as that is the delimiter, i.e. c:\path;c:\path2
  5. Launch a new console for the settings to take effect.

here I’m providing solution to setup terraform enviroment variable in windows to beginners.

  1. Download the terraform package from portal either 32/64 bit version.
  2. make a folder in C drive in program files if its 32 bit package you have to create folder inside on programs(x86) folder or else inside programs(64 bit) folder.
  3. Extract a downloaded file in this location or copy terraform.exe file into this folder. copy this path location like C:\Programfile\terraform\
  4. Then got to Control Panel -> System -> System settings -> Environment Variables

Open system variables, select the path > edit > new > place the terraform.exe file location like > C:\Programfile\terraform\

  1. Open new terminal and now check the terraform.

How to install and use “make” in Windows?

I’m following the instructions of someone whose repository I cloned to my machine. What I want is simple: to be able to use the make command as part of setting up the code environment. But I’m using Windows, and I searched online only to find a make.exe file to download, a make-4.1.tar.gz file to download (I don’t know what to do with it next), and things about downloading MinGW (for GNU; but after installing it I didn’t find any mention of «make»).

I don’t want a GNU compiler or related stuff; I only want to use «make» in Windows. Please tell me what I should do to accomplish that.

Thanks in advance!

10 Answers 10

make is a GNU command so the only way you can get it on Windows is installing a Windows version like the one provided by GNUWin32. Anyway, there are several options for getting that:

The most simple choice is using Chocolatey. First you need to install this package manager. Once installed you simlpy need to install make (you may need to run it in an elevated/admin command prompt) :

Other recommended option is installing a Windows Subsystem for Linux (WSL/WSL2), so you’ll have a Linux distribution of your choice embedded in Windows 10 where you’ll be able to install make , gcc and all the tools you need to build C programs.

For older Windows versions (MS Windows 2000 / XP / 2003 / Vista / 2008 / 7 with msvcrt.dll) you can use GnuWin32.

An outdated alternative was MinGw, but the project seems to be abandoned so it’s better to go for one of the previous choices.

Create Windows service from executable

Is there any quick way to, given an executable file, create a Windows service that, when started, launches it?

Читайте также:  Windows embedded handheld rdp

10 Answers 10

To create a Windows Service from an executable, you can use sc.exe :

You must have quotation marks around the actual exe path, and a space after the binPath= .

Note that it will not work for just any executable: the executable must be a Windows Service (i.e. implement ServiceMain). When registering a non-service executable as a service, you’ll get the following error upon trying to start the service:

Error 1053: The service did not respond to the start or control request in a timely fashion.

There are tools that can create a Windows Service from arbitrary, non-service executables, see the other answers for examples of such tools.

Use NSSM( the non-Sucking Service Manager ) to run a .BAT or any .EXE file as a service.

  • Step 1: Download NSSM
  • Step 2: Install your sevice with nssm.exe install [serviceName]
  • Step 3: This will open a GUI which you will use to locate your executable

Extending (Kevin Tong) answer.

Step 1: Download & Unzip nssm-2.24.zip

Step 2: From command line type:

C:\> nssm.exe install [servicename]

it will open GUI as below (the example is UT2003 server), then simply browse it to: yourapplication.exe

Many existing answers include human intervention at install time. This can be an error-prone process. If you have many executables wanted to be installed as services, the last thing you want to do is to do them manually at install time.

Towards the above described scenario, I created serman, a command line tool to install an executable as a service. All you need to write (and only write once) is a simple service configuration file along with your executable. Run

will install the service. stdout and stderr are all logged. For more info, take a look at the project website.

A working configuration file is very simple, as demonstrated below. But it also has many useful features such as and

these extras prove useful.. need to be executed as an administrator

If your service name has any spaces, enclose in «quotes».

I’ve tested a good product for that: AlwaysUp. Not free but they have a 30 days trial period so you can give it a try.

Same as Sergii Pozharov’s answer, but with a PowerShell cmdlet:

See New-Service for more customization.

This will only work for executables that already implement the Windows Services API.

You can check out my small free utility for service create\edit\delete operations. Here is create example:

Go to Service -> Modify -> Create

Executable file (google drive): [Download]

Probably all your answers are better, but — just to be complete on the choice of options — I wanted to remind about old, similar method used for years:

SrvAny (installed by InstSrv)

I created the cross-platform Service Manager software a few years back so that I could start PHP and other scripting languages as system services on Windows, Mac, and Linux OSes:

Читайте также:  Как удалить windows если компьютер не включается

Service Manager is a set of precompiled binaries that install and manage a system service on the target OS using nearly identical command-line options (source code also available). Each platform does have subtle differences but the core features are mostly normalized.

If the child process dies, Service Manager automatically restarts it.

Processes that are started with Service Manager should periodically watch for two notification files to handle restart and reload requests but they don’t necessarily have to do that. Service Manager will force restart the child process if it doesn’t respond in a timely fashion to controlled restart/reload requests.

How to make an exe start at the Windows Startup [duplicate]

Suppose I have built an application in C#, Once I install it, I want it to run in the background whenever windows starts up,or you can say a user logs in to his windows account. Is there any way I can do that? Except writing a windows service?

The application basically shows messages when a certain event is triggered Thanks

9 Answers 9

Add to shortcut to Windows start-up folder:

Or add to registry, something like this:

You can change CurrentUser to LocalMachine if you want it to run with every user. Thanks to Aidiakapi.

This can be done using the windows registry. I recomend you to check this registry keys.

You could add your application to the registry to run on startup at

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
or
HKEY_CURREN_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

or you could add it to the startup folder for the system.

These are probably the most common/easiest options if you do not want to write a service.

You have to set up a new key in the registry pointing to your executable.

Easiest way is to put it or a shortcut to it in %userprofile%\Start Menu\Programs\Startupdirectory or %allusersprofile%\Start Menu\Programs\Startup

The registry keys HKLM\Software\Microsoft\Windows\CurrentVersion\Run (all users) and HKCU\Software\Microsoft\Windows\CurrentVersion\Run (current user only) will also serve.

Installing it as a service is often a good approach, but not if you’re going to be interactive as you say.

You can put a shortcut to the application in C:\Users\@username@\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup .

Are you using Visual Studio Setup Project? If yes you can set the shortcut directly from there.

Well this really sounds like you should use a «windows service».

There are other options like including a shortcut to the EXE into the «Startup» folder in the Programs Menu («All Users» if you want it to run for all users on that system).

Another option would be to use the windows registry. You could add an entry to «Run» which points to the exe:

Since no-one else has mentioned it, I’ll point out that you can also achieve this using a Scheduled Task who’s trigger is ‘At System Startup’. However, I haven’t tried this with an app that needs UI interaction — it works for a background process, but I suspect it wouldn’t work with something that needs a desktop context (since there isn’t one until a user logs-on).

Оцените статью