So he wants to use imdisk.exe to create a formatted ramdisk at windows startup. He already has the command, except a small mistake. So I explained where was the error, and how to revert it.
What is wrong with that?
The difference (as I read it, maybe incorrectly) is that he ran ONE SINGLE TIME the Imdisk Toolkit GUI to obtain that, and (possibly because you programmed in it an automatic mechanism of some sort) from that point on the ramdisk would be automatically created and formatted automatically at each reboot.
The OP IMHO asked how to do the same with imdisk.exe (run once and set it for good) so that automatically at each subsequent reboot the disk would be created and formatted.
What you suggested (which may well be - besides a good suggestion - also possibly the only way to obtain the expected result) is to simply run the (corrected) command at each reboot (presumably by some autoexecuting mechanism such as any of the Registry auto start related keys or - if it is a PE of some kind - making use of WinpeSHL.ini) without specifying a specific (and suitable) method.
I thought (again maybe incorrrectly) that in your toolkit you used a definite such automatic mechanism (as reported by the OP as working) and that you could describe such hypothetical mechanism so that it could be - possibly - replicated on command line and/or without using the toolkit.
To the OP that lamented:
But after every reboot I have to format disk manually
When I created disk from GUI it's persistance and formated automatically in ntfs every reboot.
You essentially replied (besides noting what I should be able to do easily):
"Your command is wrong, run it manually at each reboot but without the -P"
Hence my opinion that it is a "non-answer".
Wonko