Jump to content











Photo
- - - - -

Need help for create a RAM Disk b:\, & also mount PE media


  • Please log in to reply
14 replies to this topic

#1 alacran

alacran

    Silver Member

  • Advanced user
  • 616 posts
  •  
    Mexico

Posted 16 February 2018 - 08:23 PM

I need some help in order to make some batch files for:

 

Create a RAM Disk b:\  (about 250 MB, NTFS compress), just after boot a PE

 

Mount PE MEdia (Cd-Usb) to another fix Drive Letter, just after boot a PE from a (Cd-Usb).



#2 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 17 February 2018 - 01:37 PM

For the first you could use the IMDISK or IMDISK Toolkit, see:

http://reboot.pro/to...matted-at-boot/

 

 

For the second I am not sure to understand, can you try to expand on it?

 

:duff:

Wonko



#3 alacran

alacran

    Silver Member

  • Advanced user
  • 616 posts
  •  
    Mexico

Posted 19 February 2018 - 03:32 AM

For the second I am not sure to understand, can you try to expand on it?

 

:duff:

Wonko

 

@Wonko: Thanks for the info, I think (last post) Erwan l. post will be usefull for my needs with some little modifications.

 

Mount PE MEdia (Cd-Usb) to another fix Drive Letter, just after boot a PE from a (Cd-Usb drive).

 

I'm trying to mount on a diferent drive letter, let's say W or Y the content of  booted PE media (Cd-Usb), (maybe with a file marker to identify it), for the case some programs were selected to install and run from outside the boot.wim but on same ISO as boot.wim. Similar as PESE does, but in a simple/direct way not so over complicated as their script for this option.



#4 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 19 February 2018 - 02:13 PM

Given that *somehow* what you call PE Media already gets a drive letter (even if it is not always the same depending on the specific machine due to other devices present at boot time) you can use SUBST to assign an additional (fixed to W: ) drive letter:

https://ss64.com/nt/subst.html

 

Example:

subst W: K:\
subst
W:\: => K:\

You can use a loop through all drive letters looking for the "tag file".

 

There is a (possibly needlessly complex for your use, since you shouldn't have the privilege issues in a PE) batch here:

http://reboot.pro/to...mated-ramdisks/

the routine to list drive letters can be replaced with "pure batch", as per the given thread on MSFN, now it is down for maintenance, get it from:

https://web.archive....#comment-895119

 

Later, cannot remember - probably in 8 - the "wrong" behaviour of "IF EXIST" has been corrected, you can test it on your PE and avoid the DIR workaround.

 

 

:duff:

Wonko



#5 Blackcrack

Blackcrack

    Frequent Member

  • Advanced user
  • 352 posts
  •  
    Germany

Posted 20 February 2018 - 05:09 AM

Hi :)

http://www.superspee...op/faq.php#R001

http://www.superspee...ers/ramdisk.php

so must exist on the net anywhere a free or opensource
ramdiskdriver and a equivalent of this for install by boot and create&&mount
and create a pagefile on this drive .. and del /q the C:\pagefile.sys

i had make by self this experiment in the past, but it's 10-15 years ago

have fun by search :)))

best regards
Blacky

#6 alacran

alacran

    Silver Member

  • Advanced user
  • 616 posts
  •  
    Mexico

Posted 23 February 2018 - 10:12 PM

So far this is the way I got it working, using only *.bat or *.cmd on a PE (Imdisk has to be installed):

 

About create a RAM Disk b:\ and a Temp folder on it, this is the best way I found (tested and working very fine):

imdisk -a -o awe -s 512M -m B: -p "/fs:ntfs /q /y /v:RAMdisk"
md b:\Temp

If we want to make b:\Temp compressed:              EDIT: This one is working very fine on online OS but not on PE

compact /c "b:\Temp" /i /Q

If we want to redirect TEMP and TMP to b:\Temp running a .reg file:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment]
"TMP"=hex(2):42,00,3a,00,5c,00,54,00,65,00,6d,00,70,00,00,00
"TEMP"=hex(2):42,00,3a,00,5c,00,54,00,65,00,6d,00,70,00,00,00

[HKEY_CURRENT_USER\Environment]
"TMP"=hex(2):42,00,3a,00,5c,00,54,00,65,00,6d,00,70,00,00,00
"TEMP"=hex(2):42,00,3a,00,5c,00,54,00,65,00,6d,00,70,00,00,00

By the way also found a very good free utility to convert *.bat or *.cmd files to *.exe:

 

Bat to exe converter: http://download.cnet...4-10555897.html

 

It has x86 and x64 versions, you can create x86 and/or x64 executables, make your .exe run invisible, add an icon, make *.exe UPX compressed (but this may cause false AV alerts), add password, and a long etc.

 

alacran



#7 alacran

alacran

    Silver Member

  • Advanced user
  • 616 posts
  •  
    Mexico

Posted 23 February 2018 - 11:41 PM

@ Blackcrack

 

I have played with Gavote RamDisk on XP, several years ago.

 

See you my friend.



#8 Atari800XL

Atari800XL

    Frequent Member

  • Advanced user
  • 112 posts
  •  
    Netherlands

Posted 24 February 2018 - 04:45 AM

Alacran, I checked "PortableFreeware.com" and they had some warnings about the website you mentioned (BatToExe). I tried downloading the file with two browsers, on one the download link was greyed out, on the other I got a popup saying "this site wants to use your computung power to do some calculations"...

As an alternative, you could very easily create a wrapper exe with AutoIt or AutoHotkey, to run your batch file silently in PE. How big was the exe created by your converter? On a test I did, I got an .exe or around 1mb, and only got 2 (false) positives on VirusTotal.



#9 alacran

alacran

    Silver Member

  • Advanced user
  • 616 posts
  •  
    Mexico

Posted 24 February 2018 - 04:56 AM

Maybe the site of the program is hacked for some virtual coin miner, I put now cnet.com link on my previous post, totally clean page and no problem (in fact I downloaded it from cnet).

 

This is virustotal results for Bat to exe Converter: https://www.virustot...012cd/detection

Let me tell you I created an UPX compress exe with password to avoid AV false warnings, it includes icon and is only 76 KB.

 

Uncompresed is 142 KB, this is virustotal results for uncompressed: https://www.virustot...2d8ef/detection

This is virustotal results for UPX compressed RamDisk512.exe for x64: https://www.virustot...12532/detection

 

 

alacran



#10 Atari800XL

Atari800XL

    Frequent Member

  • Advanced user
  • 112 posts
  •  
    Netherlands

Posted 24 February 2018 - 06:36 AM

Excellent job, you convinced me, BatToExe seems to be OK after all.



#11 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 25 February 2018 - 11:31 AM

With all due respect to everyone involved, the f2ko ittle program is not really "news", it works just fine and you should get it from the Author's site, here:

http://www.f2ko.de/en/index.php

http://www.f2ko.de/en/b2e.php

 

I personally use much older version, start from here:

https://web.archive....2e/download.php

 

with much less features, but with a decent size.

 

If you want to experiment with something "new", here it is:

https://msfn.org/boa...ch-environment/

https://github.com/t...rtabat/releases

https://github.com/tumagonx/portabat

 

 

:duff:

Wonko



#12 alacran

alacran

    Silver Member

  • Advanced user
  • 616 posts
  •  
    Mexico

Posted 25 February 2018 - 11:44 AM

With all due respect to everyone involved, the f2ko ittle program is not really "news", it works just fine and you should get it from the Author's site, here:

http://www.f2ko.de/en/index.php

http://www.f2ko.de/en/b2e.php

 

 

:duff:

Wonko

 

Hey Wonko I checked on Firefox (just now again), and the Download Button appears greyed (maybe uBlock Origin Plugin is blocking something), so for me Atari800XL was right when he said there is something wrong in that page, for that reason I put cnet.com link, and removed program page (wich was I did first.)

But it is good you confirmed it is a good program, I will check your links latter, it is 5:59 am here, My bed misses me.



#13 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 25 February 2018 - 12:06 PM

Hey Wonko I checked on Firefox (just now again), and the Download Button appears greyed (maybe uBlock Origin Plugin is blocking something), so for me Atari800XL was right we he said there is something wrong in that page, for that reason I put cnet.com link, and removed program page (wich was I did first.)

Sure :), the guy is - IMHO not so nicely - asking the downloader to do a little mining of a stupid cryptocurrency in exchange for download, see here:
https://coinhive.com/info/captcha-help

The main dilemma is:
1) should we respect the desire of the Author and do the mining for him, even if he calls the thing Freeware and asks anyway (not nicely) for the senseless mining
2) should we be NOT accomplices in that, but also not trust any other source than the original site?

To me #1 is excluded, so I choose #2 which poses another dilemma:
1) Should I provide the direct link for the download on the Author's site?
2) Or should I only hint how it can be found rather easily?
I chose #2 again.

There is also a third way, leave alone the (IMHO terrible) CNET and get it from Softpedia which is usually at least decent in the ads.

The fourth way is to use another previous version of the tool (available via the Wayback Machine) and/or use an alternative.

:duff:
Wonko

#14 Atari800XL

Atari800XL

    Frequent Member

  • Advanced user
  • 112 posts
  •  
    Netherlands

Posted 25 February 2018 - 12:34 PM

The "new" thing here is Alacran needing a batch converter to run stuff in PE.

His alternative is to learn a programming (or scripting) language. With his perseverance, I'm sure he will get what he wants in the end.

 

Now please MTTL



#15 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 25 February 2018 - 01:58 PM

The "new" thing here is Alacran needing a batch converter to run stuff in PE.
His alternative is to learn a programming (or scripting) language. With his perseverance, I'm sure he will get what he wants in the end.
 
Now please MTTL

There is no *need* whatsoever for a batch converter, the batch file runs fine enough, a batch converter is only a normally unneeded overlay which is good - as an example - only if there is some "secret" inside the batch (such as a password or similar) or - in case of redistribution - if you are afraid that someone is going to steal your precious batch code...

What do you mean by MTTL?
https://www.acronymf...r.com/MTTL.html

:duff:
Wonko




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users