The Oven

Tool World => Development and code snippets => Topic started by: Doberman on April 15, 2013, 05:16:34 PM

Title: New PECMD source
Post by: Doberman on April 15, 2013, 05:16:34 PM
I propose to discuss some of the commands, the translation into other languages, case PECMD.exe.
To start offering a new version of the source code Pecmd.exe (x32x64).
If it is of interest:
The following example will show messages using some commands.

http://www.mediafire.com/?a1qg28w34gzwzbh
Title: Re: New PECMD source
Post by: ohlalavina on April 26, 2013, 01:02:55 PM
Thank your post  :thumbsup:
Title: Re: New PECMD source
Post by: Doberman on April 24, 2015, 01:50:59 PM
New English Version (x86,x64).

Contain a built-in Help in English.

http://www.mediafire.com/download/5mlva5wo82gobc5/Pecmd%28Eng%29.7z
Title: Re: New PECMD source
Post by: SIW2 on April 29, 2015, 04:22:41 AM
Latest pecmd x64 english

[attach=1]
Title: Re: New PECMD source
Post by: SIW2 on May 06, 2015, 12:27:00 AM
88.05.60 new version 5/5/15 en x86 and x64

[attach=2]

88.00.02 stable en x86 and x64

[attach=1]
Title: Re: New PECMD source
Post by: SIW2 on May 09, 2015, 05:50:33 PM
1. Mount wim with PECMD (needs wimgapi)

MOUN [!] [Wim file name],<Mount directory>,[Image ID],[WimFltr temporary working directory]

e.g mount read only:

PECMD MOUN C:\boot.wim,C:\MOUNT,1

e.g. mount r/w must specify temp directory

PECMD MOUN C:\boot.wim,C:\MOUNT,1,%TEMP%

2. Unmount

Omit Wim file name to unmount, image ID non-zero to save changes , image ID zero to discard changes.

e.g unmount discard changes

PECMD MOUN ,C:\MOUNT,0

e.g. unmount save changes

PECMD MOUN ,C:\MOUNT,1
Title: Re: New PECMD source
Post by: Doberman on May 10, 2015, 08:44:38 AM
Hi SIW2! :thumbsup:

Is it possible to mount on Imdisk (Read only)?
Title: Re: New PECMD source
Post by: SIW2 on May 10, 2015, 06:16:15 PM
Yes, it should be possible.

Something like this perhaps:

PECMD RAMD ImDisk,L125,NTFS,B:,Ramdisk

Then you can mount read only to B:
Title: Re: New PECMD source
Post by: SIW2 on May 11, 2015, 02:52:57 AM
New version 09/05/15 english

[attach=1]
Title: Re: New PECMD source
Post by: SIW2 on May 18, 2015, 04:27:27 AM
[attach=1]
Title: Re: New PECMD source
Post by: SIW2 on May 20, 2015, 03:47:49 AM
[attach=1]


[attach=2]
Title: Re: New PECMD source
Post by: Atari800xl on May 20, 2015, 07:15:54 AM
Thanks for the updates, SIW2. I do appreciate it, even when there's not a lot of reaction.

To be honest, I still don't know exactly how to experiment with PECMD, but I would love to try and do some testing. Let's say I have a fully "clean", unchanged MS PE, from one of the latest kits, what is the best way to incorporate PECMD in something like that? Is there any documentation that describes such a simple (?) and basic step? Does it even work that way?
Also, is there any basic documentation/ promo on what PECMD actually does, and why it's so great? Some entry-level stuff maybe?
Title: Re: New PECMD source
Post by: SIW2 on May 20, 2015, 04:13:38 PM
It is a pre shell,essentially a command interpreter.

Load it first then it can call call winpeshl, create shortcuts,register components,install drivers,etc.
It also provides explorer support and hooks into the start controls to provide shudown/reboot functions.

Typically you replace winpe system hive cmdline entry E.G when building pe if you have loaded winpe system hive as PE_SYS

Code: [Select]
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\PE_SYS\Setup]
"CmdLine"="PECMD.EXE MAIN %Windir%\\system32\\PECMD.INI"


Then pecmd will start up first and carry out the instructions you have put in your winpe %windir%\system32\pecmd.ini.


Typical example pecmd.ini:  ( Have bolded commands so easier to see - can't use codebox for that )

////////////////////////////////////////////////////////////////////////////////////////////////
_SUB OSD
     // set resolution
    DISP W1024 H768 B32 F60
    //pull up a wallpaper during setup phase
     LOGO %Windir%\Web\Wallpaper\Windows\img0.jpg
    //display a message on desktop
     TEXT SIW2 PE3.1x64 WELCOME... L30 T330 R740 B400 $24*
      // call winpeshl.exe      note: winpeshl.ini should contain the line wpeinit
    EXEC winpeshl.exe
     // call ux64.exe (for win7 theme support,ux.exe not needed for win8/10 )
     EXEC Ux64.EXE
     // Tells pecmd to init on taskbar and load usb drives
     INIT I,U 4000
     // shows all drives including hidden and assigns letters automatically
     SHOW -1:-1
     // create shortcuts
     LINK %Desktop%\Backupper,x:\Program Files\Aomei\Backupper.exe
     LINK %StartMenu%\Install\WinNtSetup,x:\Program Files\WinNTSetup_x64.exe
     LINK %Startmenu%\Install\Setup,x:\setup.exe

     // PINT ,Startmenu or ,Taskband for pin to                 
     PINT %SystemRoot%\explorer.exe,Startmenu
     PINT %SystemRoot%\regedit.exe,Startmenu
     PINT %SystemRoot%\system32\notepad.exe,Taskband
     PINT x:\Program Files\QTWeb\QTWeb.exe,Taskband
     PINT x:\Program Files\PENetwork\PENetwork.exe,Taskband

  _END
////////////////////////////////////////////////////////////////////////////////////////////////
_SUB LoadShell
// start network NDISWAN. EXEC =command means wait till it has finished. EXEC !command means execute silenltly.
    EXEC @!=netcfg.exe -e -c p -i MS_NDISWAN
// Shell execute use CALLwith leading $  (similar to regsvr32)     
     CALL $%WinDir%\SysWOW64\Macromed\Flash\*.dll
_END
////////////////////////////////////////////////////////////////////////////////////////////////
_SUB FINSET
// new text on desktop
     TEXT SIW2 Loading Desktop... L430 T30 R740 B400 $24*
     WAIT 300

// TEAM COMMAND1|COMMAND2|COMMAND3     
     TEAM SHEL %SystemRoot%\explorer.exe|WAIT 500|LOGO
     WAIT 300

//Delete a reg entry     
     REGI $HKLM\SOFTWARE\PELOGON\hotkey1!
// Call regedit to merge a reg file     
     EXEC =REGEDIT /S %CurDir%\PECUSTOM.REG
//Delete the annoying ini files on desktop
     FILE %public%\desktop\desktop.ini
     FILE X:\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Internet Explorer.lnk
     FILE X:\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Accessories
     FILE X:\Users\Default\Desktop\desktop.ini

//start a service     
     SERV MpsSvc
     WAIT 300

//install driver     
     DEVI %WinDir%\inf\hdaudio.inf
     DEVI %WinDir%\inf\net*.inf 
     WAIT 2000

     //Bubble Tip
     TIPS FOR WIRELESS,RUN PENETWORK,,1,,#1
     //wait so tips keep showing for 5 secs
     WAIT 5000
     //Remove message from desktop
     TEXT
_END
////////////////////////////////////////////////////////////////////////////////////////////////
CALL OSD
CALL LoadShell
CALL FINSET
Title: Re: New PECMD source
Post by: Atari800xl on May 20, 2015, 06:49:30 PM
SIW2, thank you so much for taking the time to describe PECMD in easy to understand terms like you did!
Thinking of PECMD as a "command interpreter" as you said, makes it so much easier for me to understand how this tool actually works.
Thanks for your step-by-step guide as well, I'm looking forward to testing this as soon as possible, looks like a nice summer project as well.

Title: Re: New PECMD source
Post by: Atari800xl on May 21, 2015, 07:16:14 AM
SIW2, if I where to do some testing with "bare metal" PE versions (like the ones from the MS kits), is there anything special I should take into account? Or can I use your example for any PE version? Thanks!
Title: Re: New PECMD source
Post by: SIW2 on May 21, 2015, 10:55:09 AM
You would need to look at pecmd.ini.

E.G If explorer.exe is not in the pe, (and it isn't in standard pe supplied by MS ), then you won't get far trying to launch explorer.exe as the shell.

In the above example we launched explorer.exe

TEAM SHEL %SystemRoot%\explorer.exe|WAIT 500|LOGO

If you want to experiment with standard pe, there isn't a great deal that is useful as a shell, cmd.exe, possibly notepad.exe.

You could just drop explorer++.exe in system32 of winre.wim or boot.wim from the dvd.

https://explorerplusplus.com/

TEAM SHEL %Windir%\System32\explorer++.exe|WAIT 500|LOGO





Title: Re: New PECMD source
Post by: Atari800xl on May 21, 2015, 12:43:39 PM
Aah, so PECMD only supports explorer when it's in the PE. I thought maybe PECMD would take care of explorer integration by itself. So that assumption was wrong (at least I've learned that now).

So then my question would be: Of all the PECMD users, which solution do they use to get the "normal" explorer/ desktop into their PE's?
Is there a "standard" way of doing it, or does PECMD not care at all if you've implemented explorer into your PE or not?
Title: Re: New PECMD source
Post by: SIW2 on May 21, 2015, 04:58:31 PM
They will either build their own winpe by hand, like I do, or they use something like winbuilder.

PECMD does not build winpe for you. It is used to load and control the winpe you have built.

An earlier pecmd is included in the winbuilder projects, though it is only there to provide explorer support ( allows to kill explorer.exe - which refreshes everything) and start menu hooking. I think Chris leaves it up to the end user to configure their own pecmd.ini which you can add instead of the very very very basic one he put in.

PECMD can replace all of these and any other bits and bobs winbuilder has for loading/controlling.

Win7PE.cfg
AU3381.exe
autorun.cmd
Autorun.exe
MountPEmedia.exe
MountPEmedia.ini
MountStorPE.exe
PEnet.exe
PinTool.exe
shortcuts.exe
ShutdownPE.exe
ShutdownPE.ini
StartImDisk.exe
Title: Re: New PECMD source
Post by: Atari800xl on May 21, 2015, 05:50:45 PM
I appreciate your explanations very much, SIW2!
Title: Re: New PECMD source
Post by: SIW2 on May 28, 2015, 12:20:21 AM
New verison. Included Original and English.

[attach=1]

[attach=2]

EDIT: Hold up, Davies has just released another version dated 28/5/15.

As far as I can tell, it is not a "bug" . I think he is fiddling with new functions you are not likely to use - something to do with undeleting gpt partitions,I think. Difficult for me to understand for certain what he is doing.
Title: Re: New PECMD source
Post by: SIW2 on June 01, 2015, 04:08:28 AM
30th May 2015 version. Also improved small help file. Big one still included if you need it.

[attach=1]

[attach=2]

Title: Re: New PECMD source
Post by: Doberman on June 02, 2015, 03:34:17 PM
SIW2! :thumbsup:

Thank you!
Title: Re: New PECMD source
Post by: SIW2 on June 02, 2015, 11:55:23 PM
EDIT: Have attached what seems to be the Final 88.05.62. Different hash from those posted earlier.

[attach=1]

[attach=2]

Davies is now working on 88.05.63, may be a while till that is ready.



Title: Re: New PECMD source
Post by: SIW2 on June 24, 2015, 03:55:30 PM
Moving fast, it is up to 88.05.66 already. Imdisk built in.

No,me neither.

It can be removed by deleting Indata\28 AND 29.Or can be replaced with new/english imdisk. I think you can just put the imdisk install exe in with reshacker.

[attach=1]

[attach=2]
Title: Re: New PECMD source
Post by: ChrisR on June 25, 2015, 10:25:45 PM
Thanks SIW2 :thumbsup:
It is really hard to follow Pecmd development, download on wuyou.
Title: Re: New PECMD source
Post by: SIW2 on July 18, 2015, 07:09:03 PM
Up to v68 now.

It includes optional imdisk as before ( you can delete the indata 28 and 29). New indata 30 seems to be onscreen keyboard. Also optional and can be deleted as far as I can tell.

Various other bug fixes and improvements, I think some connected with grub.

1) x86 en version . Pecmd.exe is small en without indata 28,29,30. PecmdOriginal.exe is full original Chinese version.

[attach=1]


2) x64 en version . Pecmd.exe is small en without indata 28,29,30. PecmdOriginal.exe is full original Chinese version.

[attach=2]

Title: Re: New PECMD source
Post by: SIW2 on July 19, 2015, 01:30:28 AM
Quote
Davies
 PECMD package 4GUD in grldr / grub.exe support more than 4G UD file.

If that means anything to you:

[attach=1]

Softkeyboard uncompressed can read the code:

[attach=2]

demo for pecmd-cli :

[attach=3]
Title: Re: New PECMD source
Post by: SIW2 on September 24, 2015, 12:52:36 AM
New version. Stable. Contains both x86 and x64.Original and English
Title: Re: New PECMD source
Post by: ChrisR on September 25, 2015, 11:47:55 PM
Always hard time to follow. Thanks for sharing :thumbsup:
Title: Re: New PECMD source
Post by: SIW2 on October 11, 2015, 02:22:13 AM
This PECMDX64 built WoW64 patch. We testing.
Automatically executed when the INIT instruction.
Internal interpretation, <win10 is not executed.

[attach=1]

Title: Re: New PECMD source
Post by: SIW2 on December 17, 2015, 08:16:14 PM
There is a newer version. Not sure how it differs from 71 stable version. Help file seems to have been updated on 3rd Dec also.

[attach=1]

[attach=2]
Title: Re: New PECMD source
Post by: ChrisR on December 19, 2015, 12:01:04 AM
Thanks SIW2 for the package with the original PECMD v1201.88.05.73 - 1203 and for the English translation package  :thumbsup:
PECMD-EN with the small help resource is on SE servers now.
Title: Re: New PECMD source
Post by: SIW2 on December 19, 2015, 12:09:02 AM
Typical of Davies, :wink: he just posted new version dated 18th dec.

Will attach it later.

[ If anyone has included  the new big help file in pecmd, you will need C_936.NLS in your PE system32. ]
Title: Re: New PECMD source
Post by: ChrisR on December 19, 2015, 12:55:07 AM
Yep, he goes fast :wink:
The translation package is from Davis also or it is your work :thumbsup:
Title: Re: New PECMD source
Post by: SIW2 on December 19, 2015, 04:17:50 AM
The big help file is by DDsony, the smaller one and the EN-MODS.res is something I attempted to cobble together myself.

The zip files below include a new EN-MODS.res. I have included a load driver function, which you can access from the pecmd tray menu.

If you put INIT I in pecmd.ini, you will get the tray menu ( can toggle on and off with ctrl+alt+m).

INIT I should also mean SETWOW64.exe is not needed. Works fine for me. :thumbsup:


[attach=2]

Title: Re: New PECMD source
Post by: ChrisR on December 22, 2015, 12:42:54 PM
 :thumbsup:

About Set WoW64, I do not know what is best.
There are 3 solutions, workarounds now
SETWOW64.exe v2 by yamingw. Currently used in standard building
loadWoW64.exe by yamingw also, with the native smss.exe. Currently used if switch to Admin plugin is selected.
[attach=1]   to use with System\CurrentControlSet\Control\Session Manager,BootExecute,loadWoW64.exe
and the great Pecmd.
Any advice on the choice is welcome  :smile:
Title: Re: New PECMD source
Post by: SIW2 on December 22, 2015, 06:11:58 PM
I think pecmd (v2911stable and newer ) does the same as Loadwow64.exe.

Just tried using only pecmd loged in as system, then switched to admin and back to system. Works OK.

One minor drawback with loadwow and pecmd:

ctrl+alt+delete in admin session gives memory can't be read message. Click ok and it is fine. Problem with Logonui not loading in response to the key strokes, I think.
Title: Re: New PECMD source
Post by: SIW2 on December 23, 2015, 10:00:39 PM
They keep getting a bit bigger, but I don't know what he is adding :smile:

[attach=1]

[attach=2]
Title: Re: New PECMD source
Post by: SIW2 on January 12, 2016, 09:29:20 PM
New stable version . Big help file also seems to have been updated.

[attach=1]

[attach=2]

Just noticed a change - maybe it is a bug, not sure.

pecmd c:\

No longer works, now needs to be

pecmd explorer.exe c:\
Title: Re: New PECMD source
Post by: SIW2 on January 18, 2016, 01:50:20 PM
Don't know what Davies has improved/added with this one - he posted it up as stable , so it is the current release. 16th Jan 2016.

[attach=1]

[attach=2]

Title: Re: New PECMD source
Post by: SIW2 on February 23, 2016, 04:19:33 PM
[attach=1]

[attach=2]

Title: Re: New PECMD source
Post by: SIW2 on March 19, 2016, 08:31:01 PM
[attach=1]

[attach=2]
Title: Re: New PECMD source
Post by: SIW2 on March 28, 2016, 12:29:14 AM
[attach=1]

[attach=2]
Title: Re: New PECMD source
Post by: SIW2 on April 22, 2016, 01:13:04 AM
[attach=1]

[attach=2]
Title: Re: New PECMD source
Post by: SIW2 on June 20, 2016, 02:31:00 PM
[attach=1]

[attach=2]
Title: Re: New PECMD source
Post by: shazza on November 23, 2016, 06:36:55 PM
Hello.Anybody know how can i change hotkey/alt+a/ to another in pecmd.exe?
Title: Re: New PECMD source
Post by: SIW2 on July 25, 2017, 05:05:15 AM
New version 76 x64 english

[attach=1]
Title: Re: New PECMD source
Post by: SIW2 on July 25, 2017, 05:07:03 AM
New version 76 x86 english

[attach=1]
Title: Re: New PECMD source
Post by: SIW2 on July 25, 2017, 06:07:13 PM
New version 76 17/7/17.

Smaller than the last post because these do not include Imdisk cab (Indata29 in previous posted version)

[attach=1]

[attach=2]
Title: Re: New PECMD source
Post by: SIW2 on August 09, 2017, 01:43:19 AM
Version 78 stable

[attach=1]

[attach=2]
Title: Re: New PECMD source
Post by: SIW2 on September 14, 2017, 02:18:58 AM
  changelog:

Code: [Select]
   09.10: Win10PE: PINT processing
   08.26: Win10PE: Win-D Display Desktop SENDMSG? Timeout
   08.10: Captures a TABL scroll bar message
   Pre30: Supports SATA hard disk number
   Pre29: TIPS supports variable comma
   Pre26: REGI supports all types
   Pre22: SIZE/CMPS, etc. Supports quotation marks HELP supports automatic line feed switching
   Pre21: PUTF supports %2
   Pre20: READ/PUTF support variable incoming file name (without quotation marks)
   Pre19: REGI supports REG_LINK
   Pre18: READ support quotation marks
   Pre17: GETF/PUTF/MDIR support quotation marks FNAM/FIND -pid/-wid illegal id also initializes variables
   Pre16: REGI support byte stream, support only create key
   Pre15: REGI Smart Processing!
   Pre14: RICHEDIT supports super capture
   Pre13: RICHEDIT automatically supports ENCHANGE, supports NUM
   Pre12: WRIT write variable
   Pre11: LPOS RPOS SED supports line number and reverse
   Pre10: MOUN-UDM mapsub supports hard disk files
   Pre6: MESS Negative timeout does not show the progress of time
   Pre5: SEND @@ can be sent by window type name SHEL restart interface SCRN-cap file file memory reduction SERV support service settings


[attach=1]

[attach=2]
Title: Re: New PECMD source
Post by: ChrisR on September 14, 2017, 10:45:24 AM
Thanks SIW2 for sharing the pecmd en here  :thumbsup:
Win+D, also done in fixscreen, we have the belt and suspenders.
It's good to have pecmd PINT also available.
Title: Re: New PECMD source
Post by: SIW2 on September 14, 2017, 05:49:57 PM
PECMD mount VHD right-click menu

pecmd.ini

Code: [Select]
_SUB RegVHDPecmd
  ENVI ?&&WinVer=WinVer
  IFEX #%&WinVer%>=0x600000000,
  {
    ENVI^ EnviMode=1
    REGI HKCR\Virtual.Machine.HD.PECMD\Shell\\=
    REGI $HKCR\Virtual.Machine.HD.PECMD\Shell\1Mount\\=MOUNT VHD(&M)
    REGI $HKCR\Virtual.Machine.HD.PECMD\Shell\1Mount\command\\=PECMD MOUN-vhd "%%L"
    REGI $HKCR\Virtual.Machine.HD.PECMD\Shell\2RMount\\=Read Only Mount VHD(&R)
    REGI $HKCR\Virtual.Machine.HD.PECMD\Shell\2RMount\command\\=PECMD MOUN-vhd -r "%%L"
    REGI $HKCR\Virtual.Machine.HD.PECMD\Shell\3Dismount\\=Unmount VHD(&D)
    REGI $HKCR\Virtual.Machine.HD.PECMD\Shell\3Dismount\command\\=PECMD MOUN-vhd -u "%%L"
    REGI $HKCR\.vhd\\=Virtual.Machine.HD.PECMD
  }
_END

Title: Re: New PECMD source
Post by: SIW2 on December 14, 2017, 03:45:29 PM
[attach=3]

[attach=1]
Title: Re: New PECMD source
Post by: SIW2 on July 08, 2018, 06:20:46 PM
Some a/vs have a problem with the "Little Giant" pecmd x86. It might be the packing  - though It doesn't seem to be a problem with x64  :confused:

I just uploaded a larger x86 to virustotal and got 1 / 59 FP. Maybe that is the way to go?
Title: Re: New PECMD source
Post by: bob.omb on July 08, 2018, 06:35:34 PM
I think that is the right track.  Thank you for looking at this.  :thumbsup:  ChrisR is doing the same thing and referencing you for confirmation, for detection issues for other files as well --> http://theoven.org/index.php?topic=2421.msg27100#msg27100 (http://theoven.org/index.php?topic=2421.msg27100#msg27100)
Title: Re: New PECMD source
Post by: SIW2 on July 08, 2018, 07:09:05 PM
I have 2 versions of x86 now.

The larger x86 pecmd.exe ( 1/66 on vrustotal)

[attach=1]

Alternatively there is the dll version (0/54 on virustotal) which you can run via the small exe ( included in the zip)

[attach=2]
Title: Re: New PECMD source
Post by: SIW2 on November 05, 2019, 03:56:51 AM
Davies seems to have reappeared after a long absence, which is good news.  :thumbsup:
http://bbs.wuyou.net/forum.php?mod=viewthread&tid=330493&page=2140#pid3875015

Quote
Mdyblog posted on 2019-10-30 11:58
What needs to be changed in PECMD? Please report it.
Title: Re: New PECMD source
Post by: cdob on December 10, 2019, 09:09:48 PM
PECMD can replace all of these and any other bits and bobs winbuilder has for loading/controlling.

MountPEmedia.exe
I like the PESE ISO mount feature from MountPEmedia.exe
This uses imdisk historically, there is no native ISO mount at Win7.
10XPE can mount a ISO file natively, no addional driver required. Hit the ISO file at exporer.

As for testing: booting a Win10XPE I can mount a wim file.
Good, the wim file is searched at different devices.
set PF=C:\temp\mount
PECMD MOUN \_ISO\WinPE\Win10XPE_x64.wim,%PF%,1

I don't understand the pecmd online help. Is ISO file mounting supported?
Does pecmd uses imdisk.exe or virtdisk.dll to mount the ISO?
MOUN -udfs -udm- -mall -udimg: *.img -udimg: *.iso  -udmask: 0xA0001 \\.\PhysicalDrive1 R-

How to mount a ISO file? This failed:
pecmd  MOUN \_ISO\WinPE\Win10XPE_x64.iso,Y:
pecmd  MOUN-udfs \_ISO\WinPE\Win10XPE_x64.iso,Y:
pecmd  MOUN-udfs \_ISO\WinPE\Win10XPE_x64.iso,%PF%

I like ot repace the pecmd.ini line. How to do this within a pecmd command?
//EXEC =!%WinDir%\System32\cmd.exe /V:ON /C "set IsoName=\_ISO\WinPE\Win10XPE_%PROCESSOR_ARCHITECTURE:AMD=x%.ISO &for %a in (C D E F G H I J K L M N O P Q R S T U V W Y Z) do if exist %a:!IsoName! Explorer.exe %a:!IsoName! "
EXEC =!%WinDir%\System32\cmd.exe /V:ON /C "set IsoName=\_ISO\WinPE\Win10XPE_%PROCESSOR_ARCHITECTURE:AMD=x%.ISO &for %a in (C D E F G H I J K L M N O P Q R S T U V W Y Z) do if exist %a:!IsoName! imdisk.exe -a -f %a:!IsoName! -m Y: "
Title: Re: New PECMD source
Post by: SIW2 on December 10, 2019, 10:47:15 PM
There is a lot I don't understand.

I think it does use imdisk.

Quote
EXEC =!%WinDir%\System32\cmd.exe /V:ON /C "set IsoName=\_ISO\WinPE\Win10XPE_%PROCESSOR_ARCHITECTURE:AMD=x%.ISO &for %a in (C D E F G H I J K L M N O P Q R S T U V W Y Z) do if exist %a:!IsoName! imdisk.exe -a -f %a:!IsoName! -m Y: "

You could probably use FORX for some of that


ENVI ISOARCH=x86

FIND $%PROCESSOR_ARCHITECTURE%=AMD64,ENVI ISOARCH=x64

then use
FORX \_ISO\WINPE\win10xpe_%ISOARCH%.iso

demo.ini

Code: [Select]
_SUB RecordFile
ENVI ListFile=%ListFile%|%somefile%
IFEX $%FileNum%=0,ENVI lf=%somefile%|CALC FileNum=%FileNum%+1!ENVI lf=%lf%|%somefile%
_END

_SUB Windows1,W400H200,Inventory
EDIT Edit1,L0T0W370H20,%ListFile%
LIST List1,L0T20W100H20,%ListFile%,ENVI @Edit1=%List1%,%lf%
_END

ENVI ListFile=
ENVI ISOARCH=x86
FIND $%PROCESSOR_ARCHITECTURE%=AMD64,ENVI ISOARCH=x64
FORX \_ISO\WINPE\win10xpe_%ISOARCH%.iso,somefile,0,CALL RecordFile

CALL @Windows1
Title: Re: New PECMD source
Post by: RoyM on December 10, 2019, 11:09:38 PM
MOUN is for .wim, Put it in .wim format and you won't need any 3rd party tools.

// Install Imdisk from .inf
// DEVI =%WinDir%\System32\imdisk.inf
// IFEX KEY C:\Win10XPE_x64.ISO,!MESS FOUND IT 0N C:\Win10XPE_x64.ISO  <-- MESSAGE BOX POPS UP..
// IFEX KEY C:\Win10XPE_x64.ISO,!MESS FOUND IT 0N C:\Win10XPE_x64.ISO *1000  <-- MESSAGE BOX POPS UP FOR 1000 ms..

// Imdisk must be installed first
IFEX C:\Win10XPE.ISO, EXEC %Windir%\System32\imdisk.exe -a -f "C:\Win10XPE.ISO" -m Y:
IFEX E:\Win10XPE_x86.ISO,EXEC imdisk.exe -a -f "E:\Win10XPE_x86.ISO" -m y
EXEC =@!%WinDir%\System32\imdisk.exe -a -f "E:\Win10XPE_x86.ISO" -m y:
// EXEC =command means wait till it has finished. EXEC !command means execute silently, WHAT is @
// Any 3rd party tool can be called to mount .ISO, DaemonTools, Any PortableApp, etc.

// Is it possible to mount on Imdisk (Read only)?
PECMD RAMD ImDisk,L125,NTFS,B:,Ramdisk
// Then you can mount read only to B:

Regards
RoyM
Title: Re: New PECMD source
Post by: conty999 on May 15, 2020, 11:16:41 AM
New Chinese stable build appeared PECMD2012.1.88.05.82Stable-180149_202004.
Title: Re: New PECMD source
Post by: SIW2 on May 15, 2020, 02:53:30 PM
I have been using it for a few weeks. There aren't changes listed - changelog has not been updated.
Title: Re: New PECMD source
Post by: WinPE10KTV on July 11, 2020, 12:15:12 AM
PECMD Win8PE SE and Win8.1SE finished booting does not work in SYSTRAY I want to use some commands in MENU right-click, please help it work in SYSTRAY again, thanks  :great:
Title: Re: New PECMD source
Post by: SIW2 on July 11, 2020, 02:52:43 AM

Quote
work in SYSTRAY

pecmd.ini

Code: [Select]
INIT I,U 3000
Title: Re: New PECMD source
Post by: WinPE10KTV on July 11, 2020, 10:23:31 AM
Thanks for the reply, I tried using that command but PECMD still doesn't work, I build at the latest Win8.1SE, please try BUILD to try it for me, or give me the link to the sample PECMD.INI file composer.  :sad: :thumbsup: