don't know excactly why this is happening, however I've made a little setup of my acard ANS-9010 drive hooked up with 8x2GB kingston ECC memory. anyways I used the command line tool called swapadd(x64) from ImDisk author's webpage to create two pagefiles one for each ans-9010 disk (this dram-ssd {don't confuse with ram disk}) supports raid mode, however my mobo doesn't so i tend to stick to two sata ports and two drives instead of a one single drive of double capacity simply for the nearly double data transfer rate, and let windows manage the pagefile by itself. However after 11june2021 my neat .bat files stopped working. it worked for like 10 years or so, but now it simply does nothing. tried to launch the commands directly via cmd, but it just throws some errors in cmd, just as if M$ decided to screw up something in new build.
anybody care to help?
um yeah forgot to add the command line:
swapadd \??\Y:\pagefile.sys 8352228K 8352228K
swapadd \??\Z:\pagefile.sys 8352228K 8352228K
after inputing those lines output says:
Page file creation failed: Haven't found object's name
or something similar. The reason is given in my local language not English anyways i just translated it
EDIT:
OK I've found the problem.
It appears that windows 10 since probably the build I mentioned earlier mooved from command line processing to power shell processing in explorer, and i had to revert the change in windows 10 settings (it wasn't obvious btw.) plus some minor change to pagefile creation. Aperrantly one can't make a pagefile of the exact size as the maximum size of the drive post formatting, there has to be at least 5MB of empty space now. beats me why but it worked. I've changed the size to 8300000K up to 8300000K just in case and it works fine now.
However this M$ aproch towards CMD end of lifecycle, seemes troublesome. Somebody would have to port swapadd64 to this new powershell command scheme or it may not work after M$ decides to cease CMD support totally. I'd be forced to buy a new rig with m.2 NVMe support in order to match random read/write speed of my ans-9010 as a replacement plus hell of a lot more ram.
Anyone maintaining ImDisk code may set tmy message as a reminder. ImDisk code would have to be sooner or latr mooved from command line support to powershell support, or it will become obsolete same way as command line probably sooner than later.
ticket can be closed
Last edit: Gus Tarballs 2021-06-12
Sorry, I am not sure I follow. I regularly use swapadd from "classic" Command Prompt (cmd.exe) and I have not seen any problems with it. For example:
swapadd R:\pagefile.sys 8G 8G
Or did you mean that you changed to run .bat files in PowerShell instead of cmd.exe? Yes that might work but since they are not identical and PowerShell is not entirely compatible and never were meant to be exactly syntax compatible to cmd.exe things could break if you do so. Best option is in my opinion to run .bat and .cmd files in cmd.exe and .ps1 files in PowerShell so that you can keep scripts compatible with one specific command line processor.
Having said that, I would not have expected this particular thing to break though. But best option would probably have been to remove the \??\ prefix from the command line path parameter. It is automatically added by swapadd.exe anyway and not needed on command line.
No.. I actually ment, that I've read on microsoft websites somwhere, that they are transitioning explorer.exe to work off of powershell instead of cmd.exe. I don't know how this came to be, but i had to switch the windows settings to backward compatibility to run explorer.exe off of cmd.exe instead of powershell, as it was set to use powershell natively. The other oddity was that now I can't just input maximum disk size in swapadd. there has to be 5MB of free space left on the drive, after pagefile.sys creation or else swapadd willl throw an error and will not create the pagefile.sys. this is M$ malevolent doings.
What I had proposed in the end, was to take into consideration, to enable swappadd to work in powershell (translate the commands/programing/whatever is nessecary to make it work in powershell), since sooner or later M$ plans to turn away from explorer.exe natively processing through cmd.exe's shell to natively processing via powershell's shell and so programs running cmd commands will become obsolete.
So I reverted everything to backwards compatibility, and everything works as it used to (but I don't know for how long M$ will allow the backward compatibility).
As for what You've proposed (to run swapadd via powershell)
simply changing the .BAT to .sp1 doesn't cut it the commands to run would have to be powershell-compatible.
also the \??\ is nessecary, if i don't input this before Z:\pagefile.sys swapadd simply won't make the pagefile, so I have no idea whad did you mean by saying that swapadd will do it itself. I've tested both directly via elevated cmd.exe and via a .bat file and I do have to input the:
swapadd \??\Z:\pagefile.sys <minimumsize>K|M|G <maximumsize>K|M|G
if i input only:
swapadd Z:\pagefile sys <minimumsize>K|M|G <maximumsize>K|M|G
then the specified command throws an error in cmd.exe, so i don't think it adds the \??\ automatically. perhaps I'm using some obsolete version.
Your website claims swapadd is from 25.042020 but while i unpack it it throws 2014 date in "last edited" column in a detailed window</maximumsize></minimumsize></maximumsize></minimumsize>
oh.. forgot to add ticket can be closed. sorry for the hassle I'm new here and "dunno" how to close it myself or if it's even possible.
as for the transition to powershell.. well I'll leave it up to you what to do about it. Perhaps when the time comes, You'll see it yourself, and take action then.
I still not entirely understand really. Explorer.exe is not running "on" either cmd.exe or powershell.exe, it does not depend on either of them, it is not running "on top" of them. There are file type associations that decide whether cmd.exe, powershell.exe or another command line shell should run .bat, .cmd or .ps1 files, but that has nothing to do with rxplorer.exe. Most exe files are possible to run in PowerShell in the same way as in cmd.exe, but in some cases characters with special meanings can cause different behavior. Best practice is to put path parameters in quotes when running in PowerShell, even where it would not have been needed in cmd.exe.
Also, just tried to use the version of swapadd currently on the website without the \??\ native prefix:
So, that works. Not sure why you get error messages in your case.
How did You manage to add swapadd as an internal windows command?
I usually have to navigate in cmd to the folder where I unpacked swapadd64.zip and then process the command.. perhaps that's the difference.
Would you mind explaining to a noob how to add swapadd as native windows command (i.e. without the need to navigate to specified folder)?
Last edit: Gus Tarballs 2021-06-15
I unpacked it in the same directory as where I was, so I did not need to change directory. Additionally, since I unpacked it in C:\Windows\system32 it is reachable from any other directory anyway. But regardless of this I do not think it should make any difference for how paths are interpreted by swapadd.exe.
Sorry to piggyback on your discussion, but I can't put my hands on a fresh copy of swapadd. The site that was hosting ImDisk utilities is down, it seems, or maybe it has moved somewhere else and I can't find it. Can you help?
sorry for the late reply..
What's the problem getting swapadd?
I found the site without a problem, although it's not at the top on google search, it's still up.
Your browser might issue a warning since the site is not https ( not not securely ciphered) but only http, however it's not a banking site You don't need to login anywhere to get swapadd..
just do a google search for ImDisk, and look up ltr-data(dot)se website, it's somewhere down there, amongst shitload of other apps.
If https is preferred, the site is also available through https, but the www prefix needs to be dropped from the url:
https://ltr-data.se/opencode.html