What are the minimal files I need to redistribute to allow for creating and mounting an empty virtual USB drive by CLI script please? Obviously imdisk.exe but what else - DLLs etc? I'd like to create and mount the drive without actually installing anything on the machine. The script will run as SYSTEM so no problem with UAC/local admin etc.
Many thanks
Last edit: Anon 2019-12-24
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You need at least imdisk.exe, imdisk.cpl and imdisk.sys.
Imdisk.sys is the driver. You must register it and load it with the sc create and sc start commands.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for coming back so quickly.
What do i need imdisk.cpl for?
How do i register and load it? sc create can be either own, kernel, filesys or rec - any of these could work..? do you have an example please?
Many thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You don't need to register or load imdisk.cpl manually. Just put it in the same directory as imdisk.exe. It is used internally by imdisk.exe. The imdisk.sys driver file can be registered using this command:
sc create imdisk type= kernel start= auto binPath= system32\drivers\imdisk.sys
You also need to put imdisk.sys in C:\Windows\system32\drivers directory.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What is was said in this thread assumes that you didn't install the driver using an installer (like the Toolkit or the Olof's installer).
If you have this service running, it's clearly not the case.
As a consequence, the driver fails to start (because it is already running).
And about the helper service, it is only required for some types of proxies (that is, an extension of the driver that you can write to intercept the I/O requests to the volume). So for now, you can ignore it.
Last edit: v77 2019-12-27
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry, mistake. I missed the part that you were actually trying to create another service entry for ImDisk driver. Like v77 says, that would not work because of name collisions for kernel global objects.
Last edit: Olof Lagerkvist 2019-12-27
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi there
What are the minimal files I need to redistribute to allow for creating and mounting an empty virtual USB drive by CLI script please? Obviously imdisk.exe but what else - DLLs etc? I'd like to create and mount the drive without actually installing anything on the machine. The script will run as SYSTEM so no problem with UAC/local admin etc.
Many thanks
Last edit: Anon 2019-12-24
You need at least imdisk.exe, imdisk.cpl and imdisk.sys.
Imdisk.sys is the driver. You must register it and load it with the sc create and sc start commands.
Thanks for coming back so quickly.
What do i need imdisk.cpl for?
How do i register and load it? sc create can be either own, kernel, filesys or rec - any of these could work..? do you have an example please?
Many thanks
You don't need to register or load imdisk.cpl manually. Just put it in the same directory as imdisk.exe. It is used internally by imdisk.exe. The imdisk.sys driver file can be registered using this command:
sc create imdisk type= kernel start= auto binPath= system32\drivers\imdisk.sys
You also need to put imdisk.sys in C:\Windows\system32\drivers directory.
In fact, this point is not required. The file can be at any location, as long as the full path is specified with "binPath=".
That is correct. I just wanted to keep things as simple as possible here and not specify to many ways to do the same thing.
fantastic many thanks you guys, much appreciated
having trouble starting the service (imdisk.sys is in %windir%\system32\drivers)
any thoughts please?
thanks again :)
additonal: looking in services.msc i see the IMDisk helper service running as C:\windows\system32\imdsksvc.exe - do i not need this?
What is was said in this thread assumes that you didn't install the driver using an installer (like the Toolkit or the Olof's installer).
If you have this service running, it's clearly not the case.
As a consequence, the driver fails to start (because it is already running).
And about the helper service, it is only required for some types of proxies (that is, an extension of the driver that you can write to intercept the I/O requests to the volume). So for now, you can ignore it.
Last edit: v77 2019-12-27
Sorry, mistake. I missed the part that you were actually trying to create another service entry for ImDisk driver. Like v77 says, that would not work because of name collisions for kernel global objects.
Last edit: Olof Lagerkvist 2019-12-27