Jump to content











Photo
- - - - -

Load_RamDisk

imdisk ramdisk

  • Please log in to reply
19 replies to this topic

#1 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 28 August 2022 - 02:04 AM

Posted Image

File Name: Load_RamDisk
File Submitter: alacran
File Submitted: 27 Aug 2022
File Updated: 03 Sep 2022
File Category: Tools

Inspired by PS_X64.exe by wimb, I made Load_RamDisk_x64.exe program in AutoIt3, useful to find, in any drive, and to run \RamDisk\ImDisk.cmd, that in turn will Load to Ram (or will attach as filedisk) the selected VHD or IMG file, as long as the VHD or IMG file are located into same drive where RamDisk folder is.

ImDisk.cmd can be edited to change the VHD or IMG file name of your favorite file, and also the drive letter where it will be loaded to Ram.

Now with "Load_RamDisk Installer.exe", it will create \Program Files\ImDisk folder, links on desktop and creates a service that automatically runs every boot Load_RamDisk_x64.exe, then when we reach the desktop our prefered VHD or IMG file is already loaded to Ram or attached as filedisk to our selected drive letter, and ready to use. The installer runs on %Temp% and autodeletes once finish its task.

NOTE: Old version 1.0 is still available, after pressing Download button.

It can also be run manually just by putting Load_RamDisk_x64.exe in the desktop, and only run it on demand.

Load_RamDisk is very usefull when booting a VHD or WinPE from USB devices to easily load on Ram a second VHD or IMG file, as every time we plugg the USB in a different PC, the drives get a different letter, and the path to the VHD or IMG file very possible will have changed.


During my first tests I used a very reduced set of files from ImDisk: only imdisk.sys, imdisk.cpl, imdisk.exe, and the ImDisk.cmd, (with required parameters), and providing a REG file to create a service for imdisk.sys, in fact all was working fine this way.

But changed my mind, and decided to better have as a pre-requisite to install ImDisk v2.1.1 by Olof Lagerkvist, as the used space for the full version is very small, and includes awealloc and devio drivers too, (that may be useful later to improve ImDisk.cmd capabilities), also this way the installer does all the work related to ImDisk.

ImDisk v2.1.1
Page: http://www.ltr-data.se/opencode.html/
Download link: http://www.ltr-data..../imdiskinst.exe

NOTE: ImDisk Toolkit by v77, can be used too, as it also installs ImDisk v2.1.1 files and some other usefull utilities and libreries, additionally it is translated to several languajes, (by the way I'm the Spanish translator).

To include Load_RamDisk_x64.exe in your new WinPE build, please see this post

Load_Ramdisk loads an IMG or VHD (both can be LZX Compacted) file to Ram (to selectable drive letter), useful when having enought Ram available.

The CMD file ca be also edited to attach/mount as FileDisk (NOT as RamDisk) an IMG or VHD file, just follow the instructions into the CMD file.

For PCs with limited amount of Ram (4 GB or less), I recomment to better use this other program option, no pre-requisite to install ImDisk v2.1.1 required:

VHD to fixed drive mounts as filedisk a VHD file to fixed Y drive, useful when Ram is limited.

Password = alacran

To take a look to the included README file, just open following spoiler:

Spoiler


And this is the content of the very simple CMD file, edited on 2022-08-30.
Spoiler


Hope you enjoy it as I do.

alacran

Click here to download this file

#2 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 28 August 2022 - 03:10 AM

Include Load_RamDisk_x64.exe in your new WinPE build.

 

If you want to include Load_RamDisk_x64.exe in your new build using Win10XPE  or  Make_WinPE (Large version), when you are planning to mainly run it from a USB device, on Build Core >>> Main Interface Tab select Load ALL PROGRAMS in Ram and select Add your Custom folder.  Also in Apps >>> System Tools don't select XPE Startup.

 

Select only very few Apps in your build, only select programs that you don't have the respective Portable Program, (that you can run from your automatically RamLoaded VHD), to keep the WIM small and make it boot faster,

 

NOTE: The Imdisk version into Win10XPE is too old (v2.0.9), and doesn't work fine for the pourposes of this topic, we need to use at least ImDisk v2.0.10, to make things easier for users I attached here Projects.7z file just copy it to Win10XPE folder and extract the content, and acept to replace  Imdisk_x64.7z and Imdisk_x86.7z files located into \Win10XPE\Projects\Win10XPE\Features folder, when making your next build your PE will use ImDisk to v2.0.10 files.

 

There is no need to waste time making an Script, just copy Load_RamDisk_x64.exe to the folder \Win10XPE\Custom\x64\AdditionalFiles\Windows\System32, and edit \Win10XPE\Custom\Pecmdini\pecmd.ini file:

 

Disabled LetterSwap.exe, commenting its commands this way:

// LetterSwap
//EXEC =!%WinDir%\System32\LetterSwap.exe /auto /bootdrive Y:\CDUsb.y /Log %Temp%\LetterSwap.log
//EXEC =!%WinDir%\System32\LetterSwap.exe /auto /SetLetter Y:\CDUsb.y /Log %Temp%\LetterSwap.log

 

And add the following lines (in same order):

// Launch Load_RamDisk_x64.exe
EXEC %WinDir%\System32\Load_RamDisk_x64.exe

 

Almost at the very end of pecmd.ini file, just after:

// Launch PENetwork
EXEC X:\Program Files\PENetwork_x64\PENetwork.exe

 

It can be very useful in following scenarios:

 

Booting the PE from USB:

 

The PE will be run usually from a USB device, then Load_RamDisk_x64.exe will find and run \RamDisk\ImDisk.cmd in any internal or external drive.

 

Booting the PE from internal HD:

 

Then when Load_RamDisk_x64.exe runs, it will find and run \RamDisk\ImDisk.cmd in any drive of your internal HD.

 

To create a link in desktop, you can add in pecmd.ini,  at the end of _SUB Shortcuts section the following line:

 

LINK %Desktop%\Load_RamDisk_x64,%WinDir%\system32\Load_RamDisk_x64.exe

For readers convenience I attached here a custom pecmd.ini

 

pecmd.ini_for_Load_RamDisk.7z  Password = alacran

 

Projects.7z  Password = alacran

 

alacran

Attached Files



#3 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 28 August 2022 - 10:23 AM

I am probably missing something, but is the Auto-It program needed to just find the drive letter where a file is (knowing the relative path from root fo the drive)? :unsure:

 

Wouldn't a batch do nicely? :dubbio:

 

i.e. something like:

@ECHO OFF
set founddrive=

set tagfile=\batches\find_drive\find_drive.cmd

for /f "tokens=1 delims=:	" %%? in ('mountvol.exe ^|find ":\"') do dir %%?:%tagfile% >nul 2>&1 && set founddrive=%%?:

if not defined founddrive goto :EOF

ECHO Found drive is %founddrive%

:duff:

Wonko

 



#4 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 28 August 2022 - 09:36 PM

Maybe, I'm sure there could be several ways to get same result.

 

I was inspired by PS.exe and PS_x64.exe AutoIt programs made by wimb, that find and load \Pstart\PStart.exe

 

The AutoIt program is coded to automatically get elevated rights (runs as Admin), and when finds and runs the CMD file, it is also automatically launched as Admin, if the CMD file is not launched as Admin it doesn't work, even if the user is an Admin.

 

Anyway, I already made the AutoIt program and it is working very fine, and also looks very nice with ImDisk icon integrated since was made.

 

So thanks for your suggestion my friend, but I like it the way it is.

 

alacran



#5 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 29 August 2022 - 01:49 PM

Sure, whatever floats your boat. :)

 

It only sounded *funny* (to me) to have an executable run a batch, I mean, if using a program the functions would normally be inside it and the external (editable) file would be a configuration file.

 

:duff:

Wonko


  • antonino61 likes this

#6 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 29 August 2022 - 04:24 PM

There is no telling what criterion primarily drives alacran, never mind ultimately.

#7 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 29 August 2022 - 09:34 PM

I am probably missing something, but is the Auto-It program needed to just find the drive letter where a file is (knowing the relative path from root fo the drive)? :unsure:

 

Wouldn't a batch do nicely? :dubbio:

 

i.e. something like:

@ECHO OFF
set founddrive=

set tagfile=\batches\find_drive\find_drive.cmd

for /f "tokens=1 delims=:	" %%? in ('mountvol.exe ^|find ":\"') do dir %%?:%tagfile% >nul 2>&1 && set founddrive=%%?:

if not defined founddrive goto :EOF

ECHO Found drive is %founddrive%

:duff:

Wonko

 

 

Maybe, I'm sure there could be several ways to get same result.

 

I was inspired by PS.exe and PS_x64.exe AutoIt programs made by wimb, that find and load \Pstart\PStart.exe

 

The AutoIt program is coded to automatically get elevated rights (runs as Admin), and when finds and runs the CMD file, it is also automatically launched as Admin, if the CMD file is not launched as Admin it doesn't work, even if the user is an Admin.

 

Anyway, I already made the AutoIt program and it is working very fine, and also looks very nice with ImDisk icon integrated since was made.

 

So thanks for your suggestion my friend, but I like it the way it is.

 

alacran

 

Until here all was fine, but following comments are not right, to start I'm free to do it the way I want/like/prefer.

 

Sure, whatever floats your boat. :)

 

It only sounded *funny* (to me) to have an executable run a batch, I mean, if using a program the functions would normally be inside it and the external (editable) file would be a configuration file.

 

:duff:

Wonko

 

The only "funny" I see here is you, my now not so appreciated friend, always trying to demonstrate an ENOURMOUS knowledge about anything, and making "smarty" and/or "funny" comments, and in this case a reference to nonexistent rules.

 

I decided the CMD file is the easiest way to send instructions to ImDisk.exe, that at the same time can also be very esily editable by the user.

 

Anyway it is the best option I found for now with my limited knowledge, maybe in a near future I can improve it.  But for now there is no dubt it works very fine.

 

I don't see a reason for following comment from antonino61

 

There is no telling what criterion primarily drives alacran, never mind ultimately.

 

To sumarize:

 

To start if you think you knew a better way to do it:

 

1 - Why you didn't propose a solution before mine?

 

2 - Or you never thought that when filedisk or ramdisk booting from a WinPE or a VHD, it was possible to find a way to automatically load on Ram, to our selected drive letter(s), a second or several VHD(s) from a moving target?

 

So far even the very good programs set ImDisk Toolkit by v77 or paid programs, are not yet capable to automatically load on Ram, to our selected drive letter(s), a second or several VHD(s) from a moving target.

 

It is not ethical to criticize other people work, especially when the proposed solution is working very fine.

 

I could have kept this for myself, but I decided to share it, as it may be useful for some readers.

 

If you are honest with yourselves you have to admit that, even if this was inspired by a wimb program, at least the idea has certain merit.

 

If you don't like the proposed solution, just don't use it and make your own, as you already got the general idea here, but stop trying to demerit the proposed solution.

 

alacran



#8 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 29 August 2022 - 11:31 PM

I do not like the idea of keeping anything for oneself, which is most unethical, but never mind

#9 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 30 August 2022 - 12:41 AM

Btw, everyone has merits here and no one has ever tried to underrate urs.

#10 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 30 August 2022 - 02:40 AM

Btw, everyone has merits here and no one has ever tried to underrate urs.

 

I don't care for any recognition from other people, I know who I am, my capabilities and my limitations.

I leave the need of recognition for kids and people that has some complex, I'm only demanding same respect I give to all people, and especially to their new good ideas that they share.
 

alacran



#11 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 30 August 2022 - 05:22 AM

Me too, so check what u said of svbus before me in the miniwin topic and concentrate on svbus and lz4 onstead of splitting hairs between recognition and respect

#12 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 30 August 2022 - 08:27 AM

Me too, so check what u said of svbus before me in the miniwin topic and concentrate on svbus and lz4 onstead of splitting hairs between recognition and respect

 

I can read and understand perfectly fine the single sentence in your last post, what I can't understand is what you are trying to express with it.

 

About using lz4 externally compressed VHDs, you asked and I aswered:

 

Your question: http://reboot.pro/in...e=8#entry221642

 

Tx 4 ur consideration. Btw, why should it be a img? can it not be a lz4 instead?

 

My answer: http://reboot.pro/in...e=8#entry221643

 

ImDisk can't handle lz4.

 

The very kind offer from erwan.l in the post next to mine: http://reboot.pro/in...e=8#entry221644

 

With a proxy it might.

Look in my signature, I have made a few proxies in the past.

With some little time, since I had already integrated lz4 in CloneDisk, I might be able to make a lz4 proxy for ImDisk.

 

 

About using SVBus driver, you asked and I aswered:

 

Your question: http://reboot.pro/in...e=8#entry221645

 

Can svbus instead?

 

My answer: http://reboot.pro/in...e=8#entry221646

 

Also SVBus driver is to be used with grub4dos (MBR/CSM or UEFI versions), and we are not using it in any way to deal with the PortableApps VHD.

 

After you insisted in another post this is my additional coment about using grub4dos + SVBUs driver for this task: after explaining very detailly the dificulties to try to use it from a booted OS or WinPE this is my conclusion on this other post: 

 

So for the mentioned reasons, I definitively discarted the idea of use grub4dos to attach as filedisk or load to Ram a secondary VHD, because this doesn't work for general use, and only could apply on certain specific cases.

 

So I can't understand what the hell is what you want, if erwan.l already said he will make a proxy to let lz4 externally compressed VHDs be handled by ImDisk.

 

So to me there is no need to talk anymore about that subject.

 

But you have to learn to be patient, erwan.l will do it in his free time, nobody here is your employee.

 

And by the way next time you want something don't forget to include the word please in your request, it is a sign of good manners, and I'm also not your employee.

 

And about my hair: almost all has gone long time ago.

 

alacran



#13 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 30 August 2022 - 08:31 AM

I am not criticizing anything, I only asked if there were reasons (there are :), "elevated" running) why a program was *needed* (as opposed to a batch script).

 

And there never was any suggestion to change anything.

 

Please read the "funny" as "striking, unusual, original, out of common schemes", it is not in any way intended as a critic to your work.

 

:duff:

Wonko



#14 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 30 August 2022 - 08:44 AM

I also don't like to be rude, and I only do it when I feel attacked.

 

Well then all seems clear now, so I promote you to be my good friend again. :) :) :)

 

alacran



#15 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 30 August 2022 - 08:50 AM

I beg to differ, the word pls is superfluous, as everybody pleases and is pleased here. 'U discard? I do not discard, as i cannot afford to discard. I did by no means mention ur hair, split hairs is an idiom. No need to feel attacked unless one is touchy.

#16 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 30 August 2022 - 09:03 AM

I don't care about my hair, only issue is I need to use a hat to avoid sunburn, and sometimes my head sweats a lot.

 

That's something that came with the age and the Mendel law about heritable traits, so if I can't do anything about it, why to worry about it?

 

alacran



#17 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 30 August 2022 - 09:41 AM

I c u r a champion in de-focusing misconcentration. Just focus on svbus, lz4 and idioms and do not strive to tell respect from recognition or ur hair from anyone else's



#18 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 30 August 2022 - 02:45 PM

Just re-uploaded Load_RamDisk, (no version change), as I involuntarily forgot to mention in the CMD file the info to attach/mount an IMG or VHD as filedisk, (NOT as Ramdisk), I will quote here the content of the very simple CMD file, No need to download all again, it can be just copied and pasted.

 

Spoiler

 

3 lines of very simple code, and 5 lines of info, but for non-advanced users, it is better to have the info available.

 

alacran


  • devdevadev likes this

#19 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 31 August 2022 - 08:50 AM

JFYI

 

Post No. 2 was updated to add a NOTE about an issue caused because the Imdisk v2.0.9 used in Win10XPE is too old, and doesn't work fine for the pourposes of this Topic.  So I recommend to read the NOTE (in blue letters) and download the fix mentioned in it.

 

alacran



#20 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 03 September 2022 - 08:16 PM

JFYI

 

Load_RamDisk v1.1 (2022-09-03) was just released.

 

Password = alacran

 

Changes:

 

For users convenience, now with Load_RamDisk Installer.exe, it will create \Program Files\ImDisk folder, links on desktop and create a service that automatically runs every boot Load_RamDisk_x64.exe. The installer runs on %Temp% and autodeletes once finish its task, no unwanted remaining files in your OS.

 

NOTE: All is malware free, but for people that prefer to watch carefully before installing something, the old (manual installation) version is still available as Load_RamDisk.7z file, after pressing Download button.

 

alacran







Also tagged with one or more of these keywords: imdisk, ramdisk

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users