Processor Affinity - Add Set Affinity to Context Menu

How to Add or Remove "Run with CPU Affinity" to the Context Menu


   Information
By default, Vista, Windows 7, and Windows 8 runs an application on all available cores of the processor. If you have a multi-core processor, then this will show you how to add or remove Run with CPU Affinity from all application files and shortcuts context menu to set processor affinity to an application to control which core(s) of the processor an application will run on.

If the application and CPU supports Symmetric Multiprocessing (SMP) or HyperThreading (HT), then Windows will automatically adjust the application's usage of each processor core for the best performance. You will not gain much, if anything, from manually changing the processor affinity for these type of applications.
   Note
The affinity changes you make to the current instance of an application or process are only temporary and not set permanently.

Once you close the application or restart your system, Windows forgets your set affinity and automatically sets back the default affinity of the application running on all available cores of the processor.
   Warning
I have included REG downloads below to add context menu items for up to a 12 core processor. How many cores you actually have will depend on your processor. You can add one or more of any of the following Run with CPU Affinity context menu items below to use as needed.

DO NOT ADD A CONTEXT MENU ITEM numbered above how many cores you actually have.

You can quickly see how many processor cores you have by opening Task Manager (CTRL+SHIFT+ESC), clicking on the Performance tab, and counting how many CPU Usage History graphs you have.

Task_Manager.jpg

EXAMPLE: Run with CPU Affinity Added or Removed from Context Menu
Default.jpgAdded_exe_shortcuts.jpg
Added_Pinned_to_Start_Menu.jpgAdded_Takbar_icons.jpg



OPTION ONE

Using a REG File Download


NOTE: You can only merge these REG files while logged in as an administrator. See warning box above.

CPU-0 = Processor Core 1, CPU-1 = Processor Core 2, etc.......
1. To Add Run with CPU-0 Affinity to Context Menu
A) Click on the Download button below to download the file below.

Add_Run_with_CPU-0_Affinity_to_Context_Menu.reg

Download


2. To Remove Run with CPU-0 Affinity from Context Menu
A) Click on the Download button below to download the
file below.

Remove_Run_with_CPU-0_Affinity_from_Context_Menu.reg

Download


3. To Add Run with CPU-1 Affinity to Context Menu
A) Click on the Download button below to download the file below.

Add_Run_with_CPU-1_Affinity_to_Context_Menu.reg

Download


4. To Remove Run with CPU-1 Affinity from Context Menu
A) Click on the Download button below to download the
file below.

Remove_Run_with_CPU-1_Affinity_from_Context_Menu.reg

Download


5. To Add Run with CPU-2 Affinity to Context Menu
A) Click on the Download button below to download the file below.

Add_Run_with_CPU-2_Affinity_to_Context_Menu.reg

Download


6. To Remove Run with CPU-2 Affinity from Context Menu
A) Click on the Download button below to download the
file below.

Remove_Run_with_CPU-2_Affinity_from_Context_Menu.reg

Download


7. To Add Run with CPU-3 Affinity to Context Menu
A) Click on the Download button below to download the file below.

Add_Run_with_CPU-3_Affinity_to_Context_Menu.reg

Download


8. To Remove Run with CPU-3 Affinity from Context Menu
A) Click on the Download button below to download the
file below.

Remove_Run_with_CPU-3_Affinity_from_Context_Menu.reg

Download


9. To Add Run with CPU-4 Affinity to Context Menu
A) Click on the Download button below to download the file below.

Add_Run_with_CPU-4_Affinity_to_Context_Menu.reg

Download


10. To Remove Run with CPU-4 Affinity from Context Menu
A) Click on the Download button below to download the
file below.

Remove_Run_with_CPU-4_Affinity_from_Context_Menu.reg

Download


11. To Add Run with CPU-5 Affinity to Context Menu
A) Click on the Download button below to download the file below.

Add_Run_with_CPU-5_Affinity_to_Context_Menu.reg

Download


12. To Remove Run with CPU-5 Affinity from Context Menu
A) Click on the Download button below to download the
file below.

Remove_Run_with_CPU-5_Affinity_from_Context_Menu.reg

Download


13. To Add Run with CPU-6 Affinity to Context Menu
A) Click on the Download button below to download the file below.

Add_Run_with_CPU-6_Affinity_to_Context_Menu.reg

Download


14. To Remove Run with CPU-6 Affinity from Context Menu
A) Click on the Download button below to download the
file below.

Remove_Run_with_CPU-6_Affinity_from_Context_Menu.reg

Download


15. To Add Run with CPU-7 Affinity to Context Menu
A) Click on the Download button below to download the file below.

Add_Run_with_CPU-7_Affinity_to_Context_Menu.reg

Download


16. To Remove Run with CPU-7 Affinity from Context Menu
A) Click on the Download button below to download the
file below.

Remove_Run_with_CPU-7_Affinity_from_Context_Menu.reg

Download


17. To Add Run with CPU-8 Affinity to Context Menu
A) Click on the Download button below to download the file below.

Add_Run_with_CPU-8_Affinity_to_Context_Menu.reg

Download


18. To Remove Run with CPU-8 Affinity from Context Menu
A) Click on the Download button below to download the
file below.

Remove_Run_with_CPU-8_Affinity_from_Context_Menu.reg

Download


19. To Add Run with CPU-9 Affinity to Context Menu
A) Click on the Download button below to download the file below.

Add_Run_with_CPU-9_Affinity_to_Context_Menu.reg

Download


20. To Remove Run with CPU-9 Affinity from Context Menu
A) Click on the Download button below to download the
file below.

Remove_Run_with_CPU-9_Affinity_from_Context_Menu.reg

Download


21. To Add Run with CPU-10 Affinity to Context Menu
A) Click on the Download button below to download the file below.

Add_Run_with_CPU-10_Affinity_to_Context_Menu.reg

Download


22. To Remove Run with CPU-10 Affinity from Context Menu
A) Click on the Download button below to download the
file below.

Remove_Run_with_CPU-0_Affinity_from_Context_Menu.reg

Download


23. To Add Run with CPU-11 Affinity to Context Menu
A) Click on the Download button below to download the file below.

Add_Run_with_CPU-11_Affinity_to_Context_Menu.reg

Download


24. To Remove Run with CPU-11 Affinity from Context Menu
A) Click on the Download button below to download the
file below.

Remove_Run_with_CPU-11_Affinity_from_Context_Menu.reg

Download


25. Save the .reg file to your desktop.

26. Double click/tap on the downloaded .reg file to merge it.

27. Clic/tap on Run, Yes (UAC), Yes, and OK when prompted.

28. When finished, you can delete the downloaded .reg file(s) on the desktop if you like.



OPTION TWO

Using a BAT File Download


NOTE: You can only merge these BAT files while logged in as an administrator. See warning box above. Special thanks to Dwarf for this option.

CPU-0 = Processor Core 1, CPU-1 = Processor Core 2, etc.......
1. To Add Run with CPU-0 Affinity to Context Menu
A) Click on the Download button below to download the file below.

Add_Run_with_CPU-0_Affinity_to_Context_Menu.bat

Download


2. To Remove Run with CPU-0 Affinity from Context Menu
A) Click on the Download button below to download the
file below.

Remove_Run_with_CPU-0_Affinity_from_Context_Menu.bat

Download


3. To Add Run with CPU-1 Affinity to Context Menu
A) Click on the Download button below to download the file below.

Add_Run_with_CPU-1_Affinity_to_Context_Menu.bat

Download


4. To Remove Run with CPU-1 Affinity from Context Menu
A) Click on the Download button below to download the
file below.

Remove_Run_with_CPU-1_Affinity_from_Context_Menu.bat

Download


5. To Add Run with CPU-2 Affinity to Context Menu
A) Click on the Download button below to download the file below.

Add_Run_with_CPU-2_Affinity_to_Context_Menu.bat

Download


6. To Remove Run with CPU-2 Affinity from Context Menu
A) Click on the Download button below to download the
file below.

Remove_Run_with_CPU-2_Affinity_from_Context_Menu.bat

Download


7. To Add Run with CPU-3 Affinity to Context Menu
A) Click on the Download button below to download the file below.

Add_Run_with_CPU-3_Affinity_to_Context_Menu.bat

Download


8. To Remove Run with CPU-3 Affinity from Context Menu
A) Click on the Download button below to download the
file below.

Remove_Run_with_CPU-3_Affinity_from_Context_Menu.bat

Download


9. To Add Run with CPU-4 Affinity to Context Menu
A) Click on the Download button below to download the file below.

Add_Run_with_CPU-4_Affinity_to_Context_Menu.bat

Download


10. To Remove Run with CPU-4 Affinity from Context Menu
A) Click on the Download button below to download the
file below.

Remove_Run_with_CPU-4_Affinity_from_Context_Menu.bat

Download


11. To Add Run with CPU-5 Affinity to Context Menu
A) Click on the Download button below to download the file below.

Add_Run_with_CPU-5_Affinity_to_Context_Menu.bat

Download


12. To Remove Run with CPU-5 Affinity from Context Menu
A) Click on the Download button below to download the
file below.

Remove_Run_with_CPU-5_Affinity_from_Context_Menu.bat

Download


13. To Add Run with CPU-6 Affinity to Context Menu
A) Click on the Download button below to download the file below.

Add_Run_with_CPU-6_Affinity_to_Context_Menu.bat

Download


14. To Remove Run with CPU-6 Affinity from Context Menu
A) Click on the Download button below to download the
file below.

Remove_Run_with_CPU-6_Affinity_from_Context_Menu.bat

Download


15. To Add Run with CPU-7 Affinity to Context Menu
A) Click on the Download button below to download the file below.

Add_Run_with_CPU-7_Affinity_to_Context_Menu.bat

Download


16. To Remove Run with CPU-7 Affinity from Context Menu
A) Click on the Download button below to download the
file below.

Remove_Run_with_CPU-7_Affinity_from_Context_Menu.bat

Download


17. To Add Run with CPU-8 Affinity to Context Menu
A) Click on the Download button below to download the file below.

Add_Run_with_CPU-8_Affinity_to_Context_Menu.bat

Download


18. To Remove Run with CPU-8 Affinity from Context Menu
A) Click on the Download button below to download the
file below.

Remove_Run_with_CPU-8_Affinity_from_Context_Menu.bat

Download


19. To Add Run with CPU-9 Affinity to Context Menu
A) Click on the Download button below to download the file below.

Add_Run_with_CPU-9_Affinity_to_Context_Menu.bat

Download


20. To Remove Run with CPU-9 Affinity from Context Menu
A) Click on the Download button below to download the
file below.

Remove_Run_with_CPU-9_Affinity_from_Context_Menu.bat

Download


21. To Add Run with CPU-10 Affinity to Context Menu
A) Click on the Download button below to download the file below.

Add_Run_with_CPU-10_Affinity_to_Context_Menu.bat

Download


22. To Remove Run with CPU-10 Affinity from Context Menu
A) Click on the Download button below to download the
file below.

Remove_Run_with_CPU-0_Affinity_from_Context_Menu.bat

Download


23. To Add Run with CPU-11 Affinity to Context Menu
A) Click on the Download button below to download the file below.

Add_Run_with_CPU-11_Affinity_to_Context_Menu.bat

Download


24. To Remove Run with CPU-11 Affinity from Context Menu
A) Click on the Download button below to download the
file below.

Remove_Run_with_CPU-11_Affinity_from_Context_Menu.bat

Download


25. Save the .bat file to your desktop.

26. Right click or press and hold on the downloaded .bat file, and click on Run as administrator.

27. Click/tap on Run and Yes (UAC) when prompted.

28. When finished, you can delete the downloaded .bat file(s) on the desktop if you like.
That's it,
Shawn




 

Attachments

Last edited:
Hello,

This is just what I need. I have to set cpu affinity for my program every time I launch it.

How can I add the batch scripts to each other? From 0-11 I need only want 4-11 to run the program. Otherwise it hangs.

Do I just open them in an editor and add them to each other in one batch?
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom build
OS
Windows 7 Ultimate x64
CPU
Intel i7-3930k @4000Mhz
Motherboard
ASRock X79 Extreme4
Memory
Kingston HyperX 16GB DDR3 @2400Mhz
Graphics Card(s)
NVIDIA GeForce GTX 690
Hard Drives
Samsung SSD 830 Series 500GB
and 1TB storage.
Browser
Firefox(newest)
Hello Atoteh,

Sure, you could add the contents of each .bat file into just one .bat file instead if you like. :)
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
So this:
Code:
@ECHO OFF
REG ADD "HKCR\exefile\shell\Run with CPU-4 Affinity" /ve /f
REG ADD "HKCR\exefile\shell\Run with CPU-4 Affinity\Command" /ve /t REG_SZ /d "cmd.exe /c start \"Run with CPU-4 Affinity\" /affinity 5 \"%%1\"" /f
REG ADD "HKCR\exefile\shell\Run with CPU-5 Affinity" /ve /f
REG ADD "HKCR\exefile\shell\Run with CPU-5 Affinity\Command" /ve /t REG_SZ /d "cmd.exe /c start \"Run with CPU-5 Affinity\" /affinity 6 \"%%1\"" /f
REG ADD "HKCR\exefile\shell\Run with CPU-6 Affinity" /ve /f
REG ADD "HKCR\exefile\shell\Run with CPU-6 Affinity\Command" /ve /t REG_SZ /d "cmd.exe /c start \"Run with CPU-6 Affinity\" /affinity 7 \"%%1\"" /f
REG ADD "HKCR\exefile\shell\Run with CPU-7 Affinity" /ve /f
REG ADD "HKCR\exefile\shell\Run with CPU-7 Affinity\Command" /ve /t REG_SZ /d "cmd.exe /c start \"Run with CPU-7 Affinity\" /affinity 8 \"%%1\"" /f
REG ADD "HKCR\exefile\shell\Run with CPU-8 Affinity" /ve /f
REG ADD "HKCR\exefile\shell\Run with CPU-8 Affinity\Command" /ve /t REG_SZ /d "cmd.exe /c start \"Run with CPU-8 Affinity\" /affinity 9 \"%%1\"" /f
REG ADD "HKCR\exefile\shell\Run with CPU-9 Affinity" /ve /f
REG ADD "HKCR\exefile\shell\Run with CPU-9 Affinity\Command" /ve /t REG_SZ /d "cmd.exe /c start \"Run with CPU-9 Affinity\" /affinity 10 \"%%1\"" /f
REG ADD "HKCR\exefile\shell\Run with CPU-10 Affinity" /ve /f
REG ADD "HKCR\exefile\shell\Run with CPU-10 Affinity\Command" /ve /t REG_SZ /d "cmd.exe /c start \"Run with CPU-10 Affinity\" /affinity 11 \"%%1\"" /f
REG ADD "HKCR\exefile\shell\Run with CPU-11 Affinity" /ve /f
REG ADD "HKCR\exefile\shell\Run with CPU-11 Affinity\Command" /ve /t REG_SZ /d "cmd.exe /c start \"Run with CPU-11 Affinity\" /affinity 12 \"%%1\"" /f
..would result in my CPU affinity being set to CPU- 0 to 3 off and CPU- 4 to 11 on?

Can this be done for a specific *.exe only? I mean, can I still let other processes run on CPU- 0 to 3? Is there a way to clean it up a bit? Maybe 2 strings that sets the affinity of all instead of 16, 2 for each processor core.

I know how to add to the registry at the same time as I launch the program, but I don't know how to make the removal batch run automatically when I close the program. How is that done?

***UPDATE***
I found a solution that fits my problem better. I will let the rest of my question stay though, maybe others can get use of that.

This command line sets the CPU affinity for the program as you start it:
C:\Windows\System32\cmd.exe /C start "" /affinity XX "*PATH OF PROGRAM*"

XX = The hexadecimal number for the logical processors you want to use.

1 = use CPU 0
2 = use CPU 1
3 = use CPU 1 and 0
4 = use CPU 2 ...
9 = use CPU 3 and 0
A = use CPU 3 and 1 ...
F = use CPU 3, 2, 1 and 0

If you have a lot of CPUs to choose from you might wanna use binary numbers and convert it to hexadecimal afterwards.

1 = use CPU 0
10 = use CPU 1
100 = use CPU 2
...
100000000000 = use CPU 11
110 = use 1 and 2
101010101010 = use CPU 11, 9, 7, 5, 3 and 1

The placement of a certain digit represents a certain processor. The value of that digit represents if the processor is to be on or off.

You can convert it here:
http://www.mathsisfun.com/binary-decimal-hexadecimal-converter.html

Hope I helped a little in return for your time :)
 
Last edited:

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom build
OS
Windows 7 Ultimate x64
CPU
Intel i7-3930k @4000Mhz
Motherboard
ASRock X79 Extreme4
Memory
Kingston HyperX 16GB DDR3 @2400Mhz
Graphics Card(s)
NVIDIA GeForce GTX 690
Hard Drives
Samsung SSD 830 Series 500GB
and 1TB storage.
Browser
Firefox(newest)
hmm what about making casscade context menu with this content ?, could smone explain me why my context menu dont reveal when i get mose on exe and move over entry ive created by code below
Code:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\exefile\shell\rdzenie]
@=""
"SubCommands"="cpu0123;cpu123;cpu23;cpu2;cpu3"
"Icon"="%windir%\\System32\\SetupApi.Dll,21"
"MUIVerb"="Koligacja procesorów"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\cpu0123]
@="CPU - 0,1,2,3"
"icon"="%windir%\\System32\\NetCenter.Dll,12"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\cpu0123\command]
@="cmd.exe /c start \"rdzenie\" /affinity f \"%1\""
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\cpu123]
@="CPU - 1,2,3"
"icon"="%windir%\\System32\\NetCenter.Dll,11"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\cpu123\command]
@="cmd.exe /c start \"rdzenie\" /affinity e \"%1\""
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\cpu23]
@="CPU - 2,3"
"icon"="%windir%\\System32\\NetCenter.Dll,10"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\cpu23\command]
@="cmd.exe /c start \"rdzenie\" /affinity c \"%1\""
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\cpu3]
@="CPU - 3"
"icon"="%windir%\\System32\\NetCenter.Dll,8"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\cpu3\command]
@="cmd.exe /c start \"rdzenie\" /affinity 8 \"%1\""
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\cpu2]
@="CPU - 2"
"icon"="%windir%\\System32\\NetCenter.Dll,8"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\cpu2\command]
@="cmd.exe /c start \"rdzenie\" /affinity 4 \"%1\""

@ belowed files works, but only on exe files, what to add to make it possible on liks to exe files ( content menu shows on lnk to exe but nothing happens ;P)

Code:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\exefile\shell\rdzenie]
@=""
"SubCommands"=""
"Icon"="%windir%\\System32\\SetupApi.Dll,21"
"MUIVerb"="Koligacja procesorów"
[HKEY_CLASSES_ROOT\exefile\shell\rdzenie\Shell]
[HKEY_CLASSES_ROOT\exefile\shell\rdzenie\Shell\cpu0123]
"muiverb"="CPU - 0,1,2,3"
"icon"="%windir%\\System32\\NetCenter.Dll,12"
[HKEY_CLASSES_ROOT\exefile\shell\rdzenie\Shell\cpu0123\command]
@="start "Koligacja CPU - 1,2,3" /affinity E %1 & pause"
 
Last edited:

My Computer

Computer type
PC/Desktop
OS
Win NeXT 7 SP 1 x64 bit Pro
Hello kkmks, :)

This should work for you instead. You just had the command incorrect a bit.

Code:
Windows Registry Editor Version 5.00
 
[HKEY_CLASSES_ROOT\exefile\shell\rdzenie]
@=""
"SubCommands"=""
"Icon"="%windir%\\System32\\SetupApi.Dll,21"
"MUIVerb"="Koligacja procesorów"
 
[HKEY_CLASSES_ROOT\exefile\shell\rdzenie\Shell\cpu0123]
"muiverb"="CPU - 0,1,2,3"
"icon"="%windir%\\System32\\NetCenter.Dll,12"
 
[HKEY_CLASSES_ROOT\exefile\shell\rdzenie\Shell\cpu0123\command]
@="cmd /c start \"Koligacja CPU - 1,2,3\" /affinity E \"%1\""
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
yeah it works on exe files, but it won work on shortcuts ;'(thats wahts makes me all the problem here ;P
who run program directly from original exe ;P
what is strange that your original non cascade files works fine even with lnk
 

My Computer

Computer type
PC/Desktop
OS
Win NeXT 7 SP 1 x64 bit Pro
What I posted worked on a shortcut of notepad.exe for me.

As a test, create a new shortcut of notepad.exe to see if it works for you as well.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
nope win 7 x 64 dont respond ;P but thx 4 trying
 

My Computer

Computer type
PC/Desktop
OS
Win NeXT 7 SP 1 x64 bit Pro
Ok. Let's strip it back down to a non cascading context menu to see how it works for you with this below.

Code:
Windows Registry Editor Version 5.00
 
[-HKEY_CLASSES_ROOT\exefile\shell\rdzenie]
 
[HKEY_CLASSES_ROOT\exefile\shell\rdzenie]
@="Koligacja procesorów"
"Icon"="%windir%\\System32\\SetupApi.Dll,21"
 
[HKEY_CLASSES_ROOT\exefile\shell\rdzenie\command]
@="cmd.exe /c start \"Run with CPU-0 Affinity\" /affinity E \"%1\""
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
as said earlier non cascade works great ;) but im planning ot add 10 variants so ...
im trying right now to make some files in windir to run for now batch but probably will try to use vbs or maybe powershell to catch just runned process
 

My Computer

Computer type
PC/Desktop
OS
Win NeXT 7 SP 1 x64 bit Pro
Yep, I know. I just wanted to verify if it was an issue with the current command or something else.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
hmm could it work with exefile extensions and links ?[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\cpu123\command] ???
 

My Computer

Computer type
PC/Desktop
OS
Win NeXT 7 SP 1 x64 bit Pro
No. It would need to only be on application file types instead.

As a test, download and merge the .reg file for the listed .lnk item in the tutorial below to restore its default associations and registry entries to see if that may help.

Default File Type Associations - Restore
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
hmm ive checked the reg files and dont apply whole, beacuse of my additional keys inside some nvxxxxxx keys, but lets go to sum all up:
after comparison my registry with file iv looked that i ve been mising of:
Code:
[HKEY_CLASSES_ROOT\InternetShortcut]
"IsShortcut"=""
additionally im not sure that ive checked belowed strings precisely what are inside:
Code:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons]
"29"=-

[-HKEY_CLASSES_ROOT\SystemFileAssociations\.lnk]

[HKEY_CLASSES_ROOT\SystemFileAssociations\.lnk]
"FileOperationPrompt"="prop:System.ItemTypeText;System.FileOwner;System.Author;System.Title;System.Subject;System.Comment;System.DateModified;System.Link.TargetParsingPath"
"FullDetails"="prop:System.PropGroup.Description;System.ItemTypeText"



BUT EVERYTHING START TO WORK AFTER APPLY BELOW REG FILES, so it seems that ive trapped myself making much mods to my os ;) (shred to much)

Code:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\InternetShortcut]
"IsShortcut"=""

[HKEY_CLASSES_ROOT\piffile]
"IsShortcut"=""

[HKEY_CLASSES_ROOT\WSHFile]
"IsShortcut"=""

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons]
"29"=-

[-HKEY_CLASSES_ROOT\SystemFileAssociations\.lnk]

[HKEY_CLASSES_ROOT\SystemFileAssociations\.lnk]
"FileOperationPrompt"="prop:System.ItemTypeText;System.FileOwner;System.Author;System.Title;System.Subject;System.Comment;System.DateModified;System.Link.TargetParsingPath"
"FullDetails"="prop:System.PropGroup.Description;System.ItemTypeText"


So thx for advises everything is working now :D:D:D:D( good taht i have copy of code here ;P)
Personally im thinking ( why i dont make backup and checked it ;P <facepalm>) that \SystemFileAssociations structure was the point of problem



later when im done with my things ill check on similar one machine and post precisely which registry keys does the thing ;)
 
Last edited:

My Computer

Computer type
PC/Desktop
OS
Win NeXT 7 SP 1 x64 bit Pro
Great news. I had a suspicion that something was off with your .lnk registry entries. :party:

Those are also part of setting .lnk back to default, and are safe if wanted.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
Sorry for relive the post and sorry for my English again. This option about affinity works in Windows 7, at least to me, if I choose run application with 2 cores, it works, but in Windows 10 1709 doesn't work ... There are any way to solve? It's a very interesting option and useful for me.

Greetings and thanks.
 

My Computer

Computer type
PC/Desktop
OS
Windows 7/10 64 Bits
Hello Triceratops, and welcome to Seven Forums. :)

It would be best to ask about Windows 10 at our sister site www.tenforums.com instead.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
Hello Triceratops, and welcome to Seven Forums. :)

It would be best to ask about Windows 10 at our sister site www.tenforums.com instead.
Thanks for welcome and for responding.

It's a pitty, :sarc: :(, i don't know why, but now it doesn't work in Windows 7 for all cores, only CPU-0 works correctly.

I will ask at tenforums. Thank you.
 

My Computer

Computer type
PC/Desktop
OS
Windows 7/10 64 Bits
Aaaahhh, i've got (I think) that it works thanks to your info and the video of this link of forum, hahaha:

How to access screen without Task Manager? - Windows 7 Help Forums

It's a long process but I think that I solve it.

If I get to create the reg file (for 4 cores, my processor has 4), I post it here if you want and you think that it's suitable.

Greetings.

PD: I don't know if my English is understandable.
 

My Computer

Computer type
PC/Desktop
OS
Windows 7/10 64 Bits
Back
Top