May 6, 20197 yr I use a batch file to start 6 addon programs and P3Dv4.4 in a 4 core non-HT Win10 system. For each of the addons I set an affinity mask (Hex E) to keep the addon from using core 0 which is heavily used by P3D. This works fine for all the addons except Active Sky. Active Sky starts up OK, but when I use the Task Manager to check the Active Sky affinity mask it always shows all 4 cores are being assigned. I have tried everything I can think of, including running a separate batch file just for Acitve Sky, but nothing works. Everything is run as Administrator. I would appreciate any ideas on what might be preventing setting the Active Sky affinity mask. Thanks, Al The batch file is: @echo off REM Start Voice Attack cd "C:\Program Files (x86)\VoiceAttack" start "" /AFFINITY E "VoiceAttack.exe" REM Insert 2 sec pause TIMEOUT /T 2 REM Start TrackIR cd "C:\Program Files (x86)\NaturalPoint\TrackIR5" start "" /AFFINITY E /MIN "TrackIR5.exe" REM Insert 2 sec pause TIMEOUT /T 2 REM Start LittleNavMap cd "C:\Users\Al\Documents\Al's Flight Simulation\AddOns\Little NavMap&NavConnect\LNM Files\LittleNavmap-win-2.2.4\LittleNavmap" start "" /AFFINITY E "littlenavmap.exe" REM Insert 2 sec pause TIMEOUT /T 2 REM Start Active Sky for P3Dv4 cd "C:\Program Files (x86)\HiFi\AS_P3Dv4" start "" /AFFINITY E "AS_P3Dv4.exe" REM Insert 2 sec pause TIMEOUT /T 2 REM Start P3Dv4 Note Affinity Mask of Hex F start "" /AFFINITY F "Prepar3D.exe" REM Insert 12 sec pause TIMEOUT /T 10 REM Start Kneeboard Viewer 2 cd "C:\Users\Al\Documents\Al's Flight Simulation\AddOns\KneeboardViewer\KVv2.0\KV2Files" start "" /AFFINITY E "KV2.exe" REM Insert 2 sec pause TIMEOUT /T 2 REM Start PDF Lite cd "C:\Program Files (x86)\PDFlite" start "" /AFFINITY E "PDFlite.exe" exit Edited May 6, 20197 yr by ark
May 6, 20197 yr Have you tried using Process Lasso instead? [MSI MPG X870E Carbon | 9800X3D (PBO +200Mhz / -20 Offset) | Corsair 64GB DDR5 (Custom Timings) | RTX 4090 Founders Edition (Undervolted) | WD SNX 850X 4TB + 4TB | Antec Flux Pro]
May 6, 20197 yr Author 47 minutes ago, Sethos1988 said: Have you tried using Process Lasso instead? Yes, I have and Process Lasso works. But I'd rather not have that running in the background, and I really want to figure out why the batch file approach does not work for Active Sky on my system (it does work for others, however). There must be a setting somewhere (Registry?) that is blocking, or over-writing, the batch file's affinity mask for Active Sky. Thanks for the suggestion, Al Edited May 6, 20197 yr by ark
May 6, 20197 yr Good catch. I just tested this with my own existing BAT file, which has worked correctly for years with Active Sky products (Although I can't say I've checked how it works with ASP4 in a while). My BAT file no longer works, so it's possible that HiFi now forces ASP4 to run on all cores. The only way to defeat that is to change the affinity once ASP4 is running. I do that with the replacement task manager Process Explorer. I just tried to change the affinity of ASP4 that way and it works. Project Lasso will probably work also, but I don't use it anymore. You should ask about this on the HiFi official forums, as HiFi may have made this change to force smoother weather transitions.
May 6, 20197 yr 3 minutes ago, newtie said: Be sure to run your .bat file as administrator. Mark Let me try that. I'm pretty sure that I do, but I use a shortcut to run the BAT file so maybe I changed something. EDIT: That's it. Thanks. If ark hadn't posted this, I would have never known. Maybe I shouldn't care, since I couldn't tell the difference. Edited May 6, 20197 yr by jabloomf1230 Update
May 6, 20197 yr Well, for some reason, although running a BAT file from a shortcut that is set up to "run as administrator", used to work, that approach no longer works for me (Win 10). However, there are additional lines that can be added to your the BAT file directly that assures that every app in the BAT file will be run as administrator:. See some of the response as to how add a few line to the top of the BAT file that will do the trick: https://superuser.com/questions/788924/is-it-possible-to-automatically-run-a-batch-file-as-administrator
May 6, 20197 yr If there is an affinity mask set in the PE file header (something the developer would select as a compile-time option) then I think that overrides external processor affinity control. We used to have to go in and set the old 3GB switch in the PE file header in the FS9.exe file the same way to get the program to work beyond the 32-bit default 2GB process VAS allocation. It's still possible (but messy) to change those settings in the program header. Not sure it'd be worth the trouble. Regards Bob Scott | President and CEO, AVSIM Inc ATP Gulfstream II-III-IV-V Sys1 (MSFS20+24/XPlane12+11): AMD 9800X3D, water 2x240mm, MSI MPG X670E Carbon, 64GB GSkill 6000/30, nVidia RTX4090FE Alienware AW3821DW 38" 21:9 GSync, 2x4TB Crucial T705 PCIe5 + 2x2TB Samsung 990 SSD, EVGA 1000P2 PSU, 12.9" iPad Pro Thrustmaster TCA Boeing Yoke, TCA Airbus Sidestick, Twin TCA Airbus Throttle quads, PFC Cirrus Pedals, Coolermaster HAF932 case Sys2 (P3Dv5/v4): i9-13900KS, water 2x360mm, ASUS Z790 Hero, 32GB GSkill 7800MHz CAS36, ASUS RTX4090 Samsung 55" JS8500 4K TV@60Hz, 3x 2TB WD SN850X 1x 4TB Crucial P3 M.2 NVME SSD, EVGA 1600T2 PSU Fiber link to Yamaha RX-V467 Home Theater Receiver, Polk/Klipsch 6" bookshelf speakers, Polk 12" subwoofer, 12.9" iPad Pro PFC yoke/throttle quad/pedals with custom Hall sensor retrofit, Thermaltake View 71 case, Stream Deck XL button box Sys3 (DCS/P3Dv4/ATS/ETS): AMD 7800X3D, MSI MPG X870E Carbon, Noctua NH-D15S, 64GB GSkill 6000/30, EVGA RTX3090 Alienware AW3420DW 34" 21:9 GSync, Corsair HX1000i PSU, 4TB Crucial T705 PCIe5 + 2TB Samsung 970Evo Plus, TM TCA Officer Pack, Saitek combat pedals, TM Warthog, TM RS300 FF wheel/pedals, Coolermaster HAF XB case
May 6, 20197 yr Author 1 hour ago, jabloomf1230 said: Well, for some reason, although running a BAT file from a shortcut that is set up to "run as administrator", used to work, that approach no longer works for me (Win 10). The below seems to work for me. I put a shortcut for the bat file on my desktop, clicked on Properties, then Advanced and then Run as Administrator (see below). Active Sky now ends up with the assigned Affinity Mask as verified by the Task Manager. I also set the Active Sky exe file itself to run as Administrator in its installed location. I had thought I'd previously set up the bat file to run in Admin mode, but I guess not. 🤔 I had originally pinned a bat file shortcut to the Task Bar, which is my preference, but I still find that to get that to run in Admin mode it seems I have to right click on it, then right click on the file name, and then select Run as Administrator (which admittedly is not the end of the world 🙂). Why out of 6 addons only Active Sky presented this problem is still not clear to me. Thanks all for the help! Al Edited May 6, 20197 yr by ark
May 6, 20197 yr It very curious, because I set up my shortcut the same way, albeit a good time ago, so maybe if I start over with a new shortcut, it might work. I'm happy with the script which assures that everything runs as administrator. Thanks again to you for pointing this out. ASP4 sits in the background and does very little until it injects weather. Then a whole lot of stuff happens all at once. I'm speculating that HiFi forced the "all cores used" mode to make sure that the injection didn't lag. I actually did some checking and with ASP4 setting to just one core, nothing bad happens. With it allowed to do its own thing on all cores, I get a very slight stutter when the weather is injected. This only is noticeable if the hardware is being pushed hard though.
May 6, 20197 yr Author 38 minutes ago, jabloomf1230 said: I'm happy with the script which assures that everything runs as administrator. Would you please just post that script, not sure I was able to pick out just what is needed from the linked info to make sure all runs in Admin mode. Thanks, Al Edited May 6, 20197 yr by ark
May 6, 20197 yr I run a bat file and confirmed it was indeed setting the proper affinities, I have EVERYTHING associated with flight sim set to run as admin and UAC to never notify. I guess that's why I didn't have any issues. Edited May 6, 20197 yr by bbuckley [CPL] : I9-9900K @5.0GHz HT ON, Maximus XI Hero, ASUS TUF RTX4080 OC, 32GB DDR4 3200 14, 1TB NVMe SSD, 500GB SSD, 1TB HDD, 40" Samsung 4K TV, Honeycomb Alpha & Bravo, Logitech Rudder Pedals, WIN11
May 6, 20197 yr 9 minutes ago, bbuckley said: I have EVERYTHING associated with flight sim set to run as admin and UAC to never notify. I guess that's why I didn't have any issues. This! I ran the .bat file with two changes... my ASP4 (and all other addons) are installed in their own folder outside the Program Files (x86) folder and I changed the affinity to 3C, which is how I run ASP4 on my Hexacore. It ran fine right out of the gate... started with the affinity I assigned, started ASCA (as it should), and delayed 2 seconds. This is the script I ran: @echo off REM Start Active Sky for P3Dv4 cd "C:\Prepar3d Addons\HiFi\AS_P3Dv4" start "" /AFFINITY 3C "AS_P3Dv4.exe" REM Insert 2 sec pause TIMEOUT /T 2 exit HTH, Greg
May 7, 20197 yr Add this to the top of the BAT file: REM --add the following to the top of your bat file-- @echo off :: BatchGotAdmin :------------------------------------- REM --> Check for permissions >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system" REM --> If error flag set, we do not have admin. if '%errorlevel%' NEQ '0' ( echo Requesting administrative privileges... goto UACPrompt ) else ( goto gotAdmin ) :UACPrompt echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs" set params = %*:"="" echo UAC.ShellExecute "cmd.exe", "/c %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs" "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs" exit /B :gotAdmin pushd "%CD%" CD /D "%~dp0" :--------------------------------------
May 7, 20197 yr Author 22 minutes ago, jabloomf1230 said: Add this to the top of the BAT file Ah, so all that is necessary -- thank you. Al
Archived
This topic is now archived and is closed to further replies.