How to run a program in Windows with only the first core.

Mods and development for mods. Including WoG & Equilibris (RU) subforums.
User avatar
Steven Aus
War Dancer
War Dancer
Posts: 350
Joined: 08 Feb 2006
Location: Perth, Australia
Contact:

How to run a program in Windows with only the first core.

Unread postby Steven Aus » 06 Nov 2017, 08:49

Right click in the Explorer window for the directory you want to create the .cmd file in.
Click New -> Text Document.
Rename the file replacing the extension with .cmd, for example I called mine "H4GreatestModStart.cmd".
Right click on the new .cmd file and click Edit. This will open it in Notepad.

Put these two lines in:

Code: Select all

@echo off
start "<NAME OF CMD WINDOW, CAN BE ANY VALID NAME>" /D "<PATH HERE, NOT INCLUDING FILENAME>" /affinity 1 "<PROGRAM NAME HERE INCLUDING EXTENSION>"
So for example, for Greatest Mod:

https://www.celestialheavens.com/forum/7/16518

Needs HOMM4 Complete or Winds of War.

I have a "H4GreatestModStart.cmd" file that has these two lines:

Code: Select all

@echo off
start "GreatestMod17" /D "<PATH TO DIRECTORY - NOTE INVERTED COMMAS ARE ONLY NECESSARY IF YOU ARE USING SPACES/LONG FILENAMES>" /affinity 1 "Equivocado 17 NoVore.exe"
This will run the program with only CPU 0 enabled. If you want to use any other commands, put it just before /affinity.

Here is the help file for .cmd files (which is basically a Windows batch file):

https://ss64.com/nt/
Last edited by Steven Aus on 06 Nov 2017, 09:00, edited 4 times in total.
My Life Purpose Is To Teach The World To Fish For Life. I AM Steven Russell Lynch Abundance That I AM. Empowerment And Fostering Self-Responsibility Is My Game.

Return to “Modcrafting Guild”

Who is online

Users browsing this forum: No registered users and 5 guests