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).
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).
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?
Wonko
Posted 19 February 2018 - 03:32 AM
For the second I am not sure to understand, can you try to expand on it?
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.
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.
Wonko
Posted 20 February 2018 - 05:09 AM
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
Posted 23 February 2018 - 11:41 PM
@ Blackcrack
I have played with Gavote RamDisk on XP, several years ago.
See you my friend.
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.
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
Posted 24 February 2018 - 06:36 AM
Excellent job, you convinced me, BatToExe seems to be OK after all.
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
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
Wonko
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
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.
Posted 25 February 2018 - 12:06 PM
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: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.)
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
Posted 25 February 2018 - 01:58 PM
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...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
0 members, 0 guests, 0 anonymous users