Topic: Use Sh.exe  (Read 18779 times)

Use Sh.exe
« on: November 01, 2011, 05:24:04 PM »

Doberman

  • Jr. Chef
  • **
  • Date Registered: Oct 2011
  • Posts: 84
Hi ChrisR  :thumbsup:
Thank you very much for supporting the project ! :thumbsup:

Is it possible to use the utility "Sh.exe" from NIKZZZZ.
Very easy to add external programs (with automatic registration in the registry and output on the desktop).

Re: Use Sh.exe
« Reply #1 on: November 02, 2011, 05:54:39 PM »

ChrisR

  • XPE Baker
  • Grand Chef
  • *****
  • Date Registered: Mar 2011
  • Posts: 3494
Hi Doberman,

:welcome:

I know some very good program from NIKZZZZ,

but, I do not know sh.exe, have you a link ? is there an existing script from NIKZZZZ for him ?

Regards,
Chris

Re: Use Sh.exe
« Reply #2 on: November 03, 2011, 10:39:38 AM »

Doberman

  • Jr. Chef
  • **
  • Date Registered: Oct 2011
  • Posts: 84
Hi ChrisR :thumbsup:

I enclose a page with scripts from NIKZZZZ.
http://nikzzzz.winbuilder.net/

There is still a proposal.
Used in the automatic creation of project :% ramdrive% "B".
And use the variables : B: \ TEMP, B: \ TMP.
Size "B", will be determined automatically ~ 70 % jn RAM.
The script is at NIKZZZ.

There is still a proposal.
Used in the automatic creation of project :% ramdrive% "B".
And use the variables : B: \ TEMP, B: \ TMP.
Size "B", will be determined automatically ~ 70 % jn RAM.
The script is at NIKZZZ.



Re: Use Sh.exe
« Reply #3 on: November 03, 2011, 10:41:57 AM »

Doberman

  • Jr. Chef
  • **
  • Date Registered: Oct 2011
  • Posts: 84
Hi ChrisR :thumbsup:

I enclose a page with scripts from NIKZZZZ.
http://nikzzzz.winbuilder.net/

There is still a proposal.
Used in the automatic creation of project :% ramdrive% "B".
And use the variables : B: \ TEMP, B: \ TMP.
Size "B", will be determined automatically ~ 70 % jn RAM.
The script is at NIKZZZ.

Re: Use Sh.exe
« Reply #4 on: November 03, 2011, 10:48:01 AM »

Doberman

  • Jr. Chef
  • **
  • Date Registered: Oct 2011
  • Posts: 84
Sorry ChrisR :embarrassed:

I have not found the edit button.
Thank you for your attention. :confused:

Re: Use Sh.exe
« Reply #5 on: November 03, 2011, 11:03:24 AM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Hi Doberman,

ramdrive creation sidebyside %temp% organisation is about imdisk, not sh.exe, same routine used on Gena...

PE2/3 projects mostly do not use imdisk, since they already have writable X:\ -> and naturally writable %temp% at hand, they feel no need to waste more memory for imdisk...

however, imdisk still useful (not urgent) to add on Win7PESE one day, and sidebyside also temp..

I guess you can install imdisk after booting Win7PESE easly and get a ramdrive ready....

ps: after 10 post you can edit your posts



@ChrisR
as far as I remember, inside RusLive-Gena sh.exe can be found, latest I know.. (can not remember link "edit: link found and send via pm" and do not have at hand here....)
I am not sure but I guess it mainly does boottime shortcut creation.. (Nikzzzz knows better)

at Gena\Utils there is Imdisk_Installer.script with [InstallPE23], currently empty since no interest so far ;)

In practice, manually installing imdisk and creating ramdrive (B:) should be easy and quick on W7PESE (that is the point of not much interest)

Still a batch can be prepared along with extracting installing imdisk installer, to easly "install+create B:"

1 more step to batch would make temp at B:\Temp
For that step, after adding registry entries you will need BroadcastEnvChange.exe
Available at Gena\Basic\2 EnvironmentPE.script

With another batch, you can create B: with a percentage calculation
you would need ramstatus.exe
Available at Gena\Basic\3 RAMDrivePE.script
(--> also check ramdisk.cmd which can be used as central batch for above tasks)

....
Well as I wrote initially, not much interest since installing & using imdisk manually is easy, If you get interest above would help.  :cheers:

edit:
ramdisk.cmd , ramstatus.exe , BroadcastEnvChange.exe used on Gena to act as fast as possible with slow pc,
for Win7PESE similar things can be done with au3, since there is no speed problem on pc's where w7PESE used, and it would be easier to customize with au3 + without cmd popus and without hiderun to hide from popups.... ;)
« Last Edit: November 03, 2011, 02:03:22 PM by Lancelot »

Re: Use Sh.exe
« Reply #6 on: November 03, 2011, 02:52:19 PM »

Doberman

  • Jr. Chef
  • **
  • Date Registered: Oct 2011
  • Posts: 84
Hi Lancelot :thumbsup:

The first time I hear that the creation of %ramdrive% memory consuming ? :confused: There's also a dynamic memory.
The first %ramdrive% needed to create %temp% and increase  %temp%. Therefore, it is necessary to create startup Win7PE.
1.X: \ temp- is bad. :confused: Limited FBWF. If I need to run the program with sfx unpack in % temp% with the ability to read / write, I lacked a system %temp%.
2.After installing third-party video drivers and sound from FBWF - 256Mb is only 150Mb. (Due to the fact that drivers are copies in the folder FileRepository).  :confused:
3.Skorost create %ramdrive% almost immediately that for XP for Win7.  :thumbsup:
4.To that having an in demand "Imdisk", there is no advertising. I looked at the assembly of distinguished NIKZZZZ, and was surprised by the speed and ease of operation ! :thumbsup: And he just create %ramdrive% will not.

Re: Use Sh.exe
« Reply #7 on: November 03, 2011, 03:03:00 PM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Hi Doberman,

I agree and aware with imdisk benefits you wrote  :thumbsup: :thumbsup:
Some more for you
5. you can create ntfs ramdisk-drive and mount images even without any ntfs partition around ;)
6. after you create ramdrive with imdisk, you can expand size of ramdrive with imdisk up to limits you require

only one thing missing with imdisk is, you can not create pagefile (at least I could not) ps: reason is sometimes utilities needs pagefile even with a lot of available ram ;)


can you prepare a batch that install imdiskinst.exe unattendly and create B: ramdrive with a value...  :wink:

Re: Use Sh.exe
« Reply #8 on: November 03, 2011, 03:41:09 PM »

Doberman

  • Jr. Chef
  • **
  • Date Registered: Oct 2011
  • Posts: 84
Hi Lancelot :thumbsup:

In a swap file on % ramdrive% no sense.
You can set the page file on any drive.
To do this, there is a small free utility : SETPAGEFILE.EXE (24kb).
http://www.megaupload.com/?d=9Q674S7R

But NIKZZZZ somewhere wrote that made ​​a script that can be installed even pagefile on Flash. :thumbsup:


Re: Use Sh.exe
« Reply #9 on: November 03, 2011, 09:38:54 PM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Hi Doberman,

In a swap file on % ramdrive% no sense.
up to tastes and priorities, to me boottime-imdisk on pe2/3 no sense  :lol:

You can set the page file on any drive.
not all, - ramdrive (imdisk) , -ufddrive (normally)

Gena already have swapadd.exe 4kb  :whistling:

But NIKZZZZ somewhere wrote that made ??a script that can be installed even pagefile on Flash. :thumbsup:

I remember that too, but never tested (where was it...)
On Gena we have "USB Mass Storage Dummy Filter Driver" that changes ufdisks to realdisks ;) which result with writable pagefile on ufd....




Back to Win7PESE
Put this Imdisk_Installer.script to Win7PE_SE\Utils\
http://www.mediafire.com/?f3hnpijemyygnys
Put this ImdiskRamdisk.script to Win7PE_SE\Tweaks\
http://www.mediafire.com/?gu553r852619qsp

Make sure ExplorerShell + MMC also selected... and x86 source used.

I hope it works  :thumbsup:

Re: Use Sh.exe
« Reply #10 on: November 03, 2011, 10:39:49 PM »

ChrisR

  • XPE Baker
  • Grand Chef
  • *****
  • Date Registered: Mar 2011
  • Posts: 3494
I am agree with imdisk benefits, is an interesting option to propose  :wink:
With the expand size of ramdrive or the calculation of Ramdrive in % to work according to the amount of RAM of the PC.
This is not possible with FBWF set when building. FBWF works well but It has, indeed, some limitation.
Mount images in ramdisk, sfx unpack that I used a lot in my first pebuilder project.

not much time for testing now.

Regards
:cheers:

Re: Use Sh.exe
« Reply #11 on: November 04, 2011, 05:52:28 AM »

Doberman

  • Jr. Chef
  • **
  • Date Registered: Oct 2011
  • Posts: 84
Hi ChrisR :thumbsup:
I am very pleased that we are all together have found understanding in this matter! :thumbsup:

imdiskinst_x86_x64 .7z (including Ramdisk.cmd; Ramstatus.exe)
http://www.megaupload.com/?d=KKOY4VFH


Re: Use Sh.exe
« Reply #12 on: November 04, 2011, 02:21:26 PM »

ChrisR

  • XPE Baker
  • Grand Chef
  • *****
  • Date Registered: Mar 2011
  • Posts: 3494
Put this Imdisk_Installer.script to Win7PE_SE\Utils\
http://www.mediafire.com/?f3hnpijemyygnys
Put this ImdiskRamdisk.script to Win7PE_SE\Tweaks\
http://www.mediafire.com/?gu553r852619qsp

Make sure ExplorerShell + MMC also selected... and x86 source used.

I hope it works  :thumbsup:
They work perfectly  :thumbsup: together, ImdiskRamdisk needs  Imdisk_Installer.script in Util folder

Doberman, the environment variables "tmp" and "temp" to "b:" are not updated in this script for your sfx unpack in %temp%
HKCU\Environment

I have not tested your "Ramdisk.cmd; Ramstatus.exe" because the script works fine with the possibility to create Ramdisk at startup and/or imdisk virtual drive management.

:cheers:
« Last Edit: November 04, 2011, 02:31:35 PM by ChrisR »

Re: Use Sh.exe
« Reply #13 on: November 04, 2011, 02:54:03 PM »

Doberman

  • Jr. Chef
  • **
  • Date Registered: Oct 2011
  • Posts: 84
Hi ChrisR :thumbsup:

The variables to be changed in two places:
1.[HKEY_CURRENT_USER\Environment]
"TEMP"="B:"
"TMP"="B:"

2.HKEY_LOCAL_MACHINE\ControlSet001\Control\Session Manager\Environment
"TEMP"="B:"
"TMP"="B:"

Ramdisk.cmd need to put in Winreshl.ini. To drive was created before the advent of the desktop. :ohmy:

Re: Use Sh.exe
« Reply #14 on: November 05, 2011, 12:53:46 AM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Hi Doberman,

md B:\Temp
reg.exe /add .....
reg.exe /add .....
r...
BroadcastEnvChange.exe

would do the trick to get temp & tmp operational on B:,
I strickly advice you to use B:\Temp , using root of a drive (B:) for temp is not good at all  :wink:



@ChrisR,

I am glad it works nicely, all credits to JonF, maybe you or JonF put a x64 version and add a new "optional" parameter to get B:\Temp adjusted at bootup ;) nothing urgent.


Btw, I notice imdiskinst do not have unattended switch anymore, -y now ends with popup  :wink:

See you  :cheers:

Re: Use Sh.exe
« Reply #15 on: November 05, 2011, 11:10:18 AM »

ChrisR

  • XPE Baker
  • Grand Chef
  • *****
  • Date Registered: Mar 2011
  • Posts: 3494
Hi,

Ramdisk.cmd need to put in Winreshl.ini. To drive was created before the advent of the desktop. :ohmy:
Dobermann, the JonF's script is very well with the program au3 StartImdisk (same fonction as your batch with parameters), so I have not tried your batch yet.


I am glad it works nicely, all credits to JonF, maybe you or JonF put a x64 version and add a new "optional" parameter to get B:\Temp adjusted at bootup ;) nothing urgent.
Done, Here is the script with the support x64 imdisk.
Imdisk x64 works fine  :thumbsup:

Otherwise, for the environment variable, I have a problem at the moment

1. If I write the registry keys when building, there is a problem with cdusb.exe and others programs, B:\temp (%temp%) does not exist yet  :sad:.

2. If I write the registry keys at startup (addautaurun) in program startImdisk, the program creates B:\Temp and write the 4 registry keys.
but this is not enough to reset the variables %Temp% and %Tmp%   :confused:
echo %temp -> X:\Windows\Temp    !!!

I do not find the solution

http://www.mediafire.com/?ez02u6vb5l6zg68

:cheers:

Re: Use Sh.exe
« Reply #16 on: November 05, 2011, 11:15:03 AM »

ChrisR

  • XPE Baker
  • Grand Chef
  • *****
  • Date Registered: Mar 2011
  • Posts: 3494
Hi,

Ramdisk.cmd need to put in Winreshl.ini. To drive was created before the advent of the desktop. :ohmy:
Dobermann, the JonF's script is very well with the program au3 StartImdisk (same fonction as your batch with parameters), so I have not tried your batch yet.


I am glad it works nicely, all credits to JonF, maybe you or JonF put a x64 version and add a new "optional" parameter to get B:\Temp adjusted at bootup ;) nothing urgent.
Done, Here is the script with the support x64 imdisk.
Imdisk x64 works fine  :thumbsup:

Otherwise, for the environment variable, I have a problem at the moment

1. If I write the registry keys when building, there is a problem with cdusb.exe and others programs, B:\temp (%temp%) does not exist yet  :sad:.

2. If I write the registry keys at startup (addautaurun) in program startImdisk, the program creates B:\Temp and write the 4 registry keys.
but this is not enough to reset the variables %Temp% and %Tmp%   :confused:
echo %temp -> X:\Windows\Temp    !!!

I do not find the solution

http://www.mediafire.com/?ez02u6vb5l6zg68

:cheers:

Re: Use Sh.exe
« Reply #17 on: November 05, 2011, 11:19:27 AM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Hi ChrisR,

that is the reason I asked temp change after boot, easier and safer  :thumbsup:

yes regwrite is not enough alone,
After regwrite You need to broadcast environmental change to windows, that is the reason using BroadcastEnvChange.exe

BroadcastEnvChange.exe /broadcast

also check other parameters of BroadcastEnvChange.exe if above not work
 :cheers:

Re: Use Sh.exe
« Reply #18 on: November 05, 2011, 05:25:34 PM »

Doberman

  • Jr. Chef
  • **
  • Date Registered: Oct 2011
  • Posts: 84
HI ChrisR :thumbsup: HI Lancelot :thumbsup:

If you use Sh.exe, then CDUSB.exe not need it!

Moreover do not need even a marker file! Moreover, it is much faster than CDUSB.exe. :w00t:

Re: Use Sh.exe
« Reply #19 on: November 05, 2011, 07:42:15 PM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Hi Doberman,

maybe you should check PECMD which so far known as fastest, check here http://theoven.org/index.php?topic=177

cdusb improved after a set of error reports mainly ufd delaying getting ready at bootup , to get do what is intentended to do, I do not know if pecmd or sh.exe have such improvments or not,
if adjusted too fast than it would cause errors on different computers  :wink: if your pc-win7pese get ufd ready quicker than cdusb will work quicker....

ps: sh.exe also check for tag file, another method: checking disk label can be used, but it requires more care by end users when transfering Win7PESE files to boot from ufd.... (and we know how careless end-users are, *mostly not much reading ;) even when they read mostly *NOT carelfully)

in the end, it is always nice to get control of bootloader at project admin, pecmd in addition to known features of loaders-tools (shortcut creation, boot time registration, pin creating...) used by any project, pecmd has some "special" features to get some patches inram etc....


Annnnnyway, lets not scatter subject much, my bootloader beats yours, linux is better than windows..... To me Optionality always Good   :happy_dance: It is not hard to get your desired sh.exe customly like maanu did with pecmd, just work on it like maanu  :great:




Back to subject:
After B: ready on Win7PESE (which is now available with above scripts), using following Change_Temp.cmd

Code: [Select]
MD B:\Temp
If Exist B:\Temp goto :reg
exit
:reg
reg.exe add "HKLM\SYSTEM\ControlSet001\Control\Session Manager\Environment" /v TEMP /d B:\Temp
reg.exe add "HKLM\SYSTEM\ControlSet001\Control\Session Manager\Environment" /v TMP /d B:\Temp
reg.exe add "HKCU\Environment" /v TEMP /d B:\Temp
reg.exe add "HKCU\Environment" /v TMP /d B:\Temp
BroadcastEnvChange.exe /broadcast

do the trick  :thumbsup:

Important Tip: To test, *After Change_Temp.cmd, START a *NEW cmd.exe window

 :cheers:

 

Powered by EzPortal