Jump to content

PEBakery


Joveler

Recommended Posts

2 hours ago, Atari800XL said:

The [HELP.7] section seems to have extra double quote inside the line (col. 467, "INJECT"). Removing these seems to fix the problem (the correct way is replacing them with #$q I guess...)

Just another case of PEBakery's stricter double quote rules...

I spotted this during my lunch break, but thanks anyway. :thumbup

There are also issues with quotation marks in a number of other scripts - some reported by PEBakery as Syntax error () and some reported as Doublequote's number should be even number ().

Effected scripts include new Ghost and Create ISO scripts. Old (2014-04-01 build) scripts effected include HWiNFO, WinFE, ADK and Cache Files.

Note to Joveler - all of these errors were difficult to find and involved visually scanning code. Any chance of a reference to the offending code's line number in a future release?

Currently working on Sysnative redirects issue in Cache Files script.

Update coming soon.

Misty

Link to comment
Share on other sites


A test build of MistyPE is available. The test version is hopefully fully PEBakery compatible - I've done a few initial tests using PEBakery version 0.9.1. alpha (Build 20171216).

Update the MistyPE project using the Tools > Update Project script whilst MistyPE is loaded (in either PEBakery or WinBuilder).

A number of scripts have been updated. I can't remember all of the changes/updates as the reboot.pro site is down - a number of the changes are listed on the reboot.pro site following the release of other test builds since the MistyPE April Fools release (build 2017-04-01).

Changes since the last test build (2017-12-17) that Alacran has been very actively testing include -
- wimlib updated to version 1.12 (as suggested by alacran)
- Spelling corrections to some scripts (as suggested by alacran)
- Main project script option 6] Set 'Install.wim' Image Number - index/number increased to 9 (as suggested by alacran)
- JustManager (file manager) included in the project
- WinHex script updated - Evaluation version can now be downloaded

Following programs updated -
- dmde
- Q-Dir
- HWiNFO

Regards,

Misty

Link to comment
Share on other sites

@misty

After update I made a successful Build on OS Win7x64, using WB, source: es_windows_10_multi-edition_version_1709_updated_nov_2017_x64_dvd_100289996.iso, selecting this time install.wim index 9, but there is one Error in log:

(OperaUSB1218int.script) RegDelete - Failed to delete registry key in: [HKLM\_WinPE_SOFTWARE\Classes\.html\OpenWithList]

Also checked previous log and it was there too, sorry my mistake didn't check log before, I was in a hurry to try the ISO.

 

@Joveler & misty

I'll make a new build using PEBakery and same source, this time from my Win10x64 Test partition and report back.

 

alacran

 

Link to comment
Share on other sites

@Joveler & misty

Running PEBakery (20171216) on Win10 last version is very nice, as this OS already has Net 4.7.1

Build aborted on OperaUSB1218int.script, then I saw PEBakery was reporting 2 syntax errors (System,Erroroff,1,nowarn only 1 argument is valid), I decided to try to fix this errors:

Changed: System,Erroroff,1,nowarn to System,Erroroff,1

Started a new build and this time it was successful

Both of my OS's have UAC permanently disabled but I got the anoying message about UAC in both builders, so I it was necesary to disable this check on Options 3 Tab to get rid of it.  So something is wrong with this checking.

BOTH OF YOU ARE DOING A VERY GOOD WORK GUYS !!!!!!!!!!!!!

alacran

Edited by alacran
Typo
Link to comment
Share on other sites

Thanks for your feedback Misty!

 

On 2017. 12. 19. at 10:11 AM, misty said:

Fantastic project. Can't wait to see how it develops.

I've posted some feedback on reboot.pro (see http://reboot.pro/topic/21647-new-pe-builder/?p=205219)

I read your post in reboot, I had not noticed PEBakery crashes if .Net Framework 4.7.1 is not installed.
Due to .Net Standard 2.0 reference issue (which is still not fixed by Microsoft!), there is a complexity concerning the version, I will fix PEBakery to inform about .Net Framework version to user if its version is lesser than 4.7.1.

 

14 hours ago, misty said:

Note to Joveler - all of these errors were difficult to find and involved visually scanning code. Any chance of a reference to the offending code's line number in a future release?

Yes, I am working on adding line number when reporting syntax error.

 

38 minutes ago, alacran said:

Build aborted on OperaUSB1218int.script, then I saw PEBakery was reporting 2 syntax errors (System,Erroroff,1,nowarn only 1 argument is valid), I decided to try to fix this errors:

Changed: System,Erroroff,1,nowarn to System,Erroroff,1

alacran, please note that current PEBakery's System,ErrorOff implementation is buggy.
It does not works if you use macro (known as API in WB082).
I hope to fix this problem can be fixed in next release.

 

11 hours ago, misty said:

A test build of MistyPE is available. The test version is hopefully fully PEBakery compatible - I've done a few initial tests using PEBakery version 0.9.1. alpha (Build 20171216).

Update the MistyPE project using the Tools > Update Project script whilst MistyPE is loaded (in either PEBakery or WinBuilder).

A number of scripts have been updated. I can't remember all of the changes/updates as the reboot.pro site is down - a number of the changes are listed on the reboot.pro site following the release of other test builds since the MistyPE April Fools release (build 2017-04-01).

Great, I will test new release with PEBakery.

Link to comment
Share on other sites

10 hours ago, alacran said:

...(OperaUSB1218int.script) RegDelete - Failed to delete registry key in: [HKLM\_WinPE_SOFTWARE\Classes\.html\OpenWithList]

Also checked previous log and it was there too, sorry my mistake didn't check log before, I was in a hurry to try the ISO....

This is a controlled error and is required to delete the registry key if the other Opera script (included in the project download) is executed first. The error can be safely ignored.

 

8 hours ago, alacran said:

Build aborted on OperaUSB1218int.script, then I saw PEBakery was reporting 2 syntax errors (System,Erroroff,1,nowarn only 1 argument is valid), I decided to try to fix this errors:

Changed: System,Erroroff,1,nowarn to System,Erroroff,1

Fixed in update available here - http://mistyprojects.co.uk/mistype/packages/Opera1218_Package_v2.zip

Another error was also fixed - I'd failed to add code to copy the locale folder into the build. The new script also contains an option to set the required language. Download and add to the project using the Tools > Add Program script.

7 hours ago, Joveler said:

Yes, I am working on adding line number when reporting syntax error.

 

7 hours ago, Joveler said:

I read your post in reboot, I had not noticed PEBakery crashes if .Net Framework 4.7.1 is not installed.
Due to .Net Standard 2.0 reference issue (which is still not fixed by Microsoft!), there is a complexity concerning the version, I will fix PEBakery to inform about .Net Framework version to user if its version is lesser than 4.7.1.

Fantastic news on both counts. :thumbup 

Misty

Link to comment
Share on other sites

Possible third project compatible with PEBakery - Mini-WinFE.

Main page here - http://mistyprojects.co.uk/documents/Mini-WinFE/index.html

Project is available for download here - http://mistyprojects.co.uk/download.htm (use the alternative download link)

Description - "This project is based on MistyPE. It's been scaled down and developed specifically for digital forensics acquisitions. Mini-WinFE has been co-developed with Brett Shavers to facilitate a simplified method for building a Windows Forensic Environment (WinFE)...."

As it is essentially MistyPE with a few minor modifications, the latest test build should hopefully be fully compatible with PEBakery. The current download (see link above) will need updating from within the project.

  1. Extract the project from the download file Mini-WinFE.2017.04.27.zip
  2. Copy/extract the PEBakery files to the root Mini-WinFE folder extracted in step 1 (the folder containing WinBuilder.exe).
  3. Start Launcher.exe
  4. Goto Tools > Update Project script
  5. Hit the RUN button

Regards,

Misty

Link to comment
Share on other sites

@ misty

Downloaded Opera1218_Package_v2, language selection on script is a very good add, no more need to modify operaprefs_default.ini manually before buiding.

@ Joveler & misty

Builds using both builders were without any problem.

Iso's made with both builders booted very fine.

@ misty

LinuxReader do not run

By the way when making pictures MW Snap do not change language, when I opened it first time there was a language selection having es-ES preselected, I just acepted but no change, it remains in English, tryed do do it again from inside program but nothing change. (this is not new. AFAIR I saw this before but forgot to tell you).  EDIT: This only applies to French and Spanish.

EDIT: After testing this a few more I found you can change to any available language but not to French or Spanish, when running from the Iso.

If you run the program from Windows there is no problem, you can change to any language including French and Spanish just fine.

 

alacran

Edited by alacran
More info.
Link to comment
Share on other sites

@ misty

I found the way to fix MW Snap do not change language  to French or Spanish when running from Iso:

Go to:  MistyPE\Projects\Cache\Programs\MWSnap300\Lang

Rename:

Espaõol.bmp, Espaõol.ini, Français.bmp and Français.ini

To:

Spanish.bmp, Spanish.ini, French.bmp & French.ini respectively.

 

Now I'm going to start testing 10x86 builds and report back my findings.

 

alacran

Edited by alacran
Typo
Link to comment
Share on other sites

@ Joveler & misty

Build made on 10x64 OS.

Source: Win10_1709_Spanish(Mexico)_x32.iso

Builder: PEBakery (20171216).

Build was successful

 

When I find my old 8.1 x64 & x86, I'll make buids using them as sources and report back.

Sorry I can't run any x86 OS to test building from it.

alacran

 

Edited by alacran
Link to comment
Share on other sites

Minor issue in the MistyPE main project settings script. May also effect some of the other project scripts if they have a tabbed style interface.

When one of the options tabs are changed the project is scripted to do the following -

  1. Write the new interface name to the [Main] section, Interface= value
  2. write the settings in the current interface to the script
  3. send a System,REFRESHINTERFACE command

The new Interface is then displayed and any changes made in it should be parsed when the project is executed.

This works fine in WinBuilder and the values in the currently displayed interface are all parsed correctly, with other values obtained from the writes made to the script in step 2 (see above).

This appears to work fine in PEBakery, however the values in the currently displayed interface are not parsed when the build process is started.

As an example, in the screenshot below the Options 1 tab was displayed when the project was loaded by PEBakery, then the Options 2 tab was selected and the Build process started. The values from the Options 1 tab were obtained ok from the script, however the options from the Options 2 tab that was displayed when the build process started are not. In the screenshot below we can see that Language=%pScrollBox_B3% and Method=%pScrollBox_B1% are clearly not parsed and are incorrect. Build subsequently fails -
2017.12.21_1.jpg

 

Unless a fix is implemented in PEBakery there are two current workarounds possible.

  1. Press the Refresh Project button in the PEBakery UI.
  2. Add the System,RESCANSCRIPTS command to relevant sections to automate the refresh.

In regards to workaround 2 for example, change the following -

[Change.To.Tab.A]
IniRead,%ScriptFile%,Main,Interface,%Current.Tab%
Run,%ScriptFile%,Save.Settings
IniWrite,%ScriptFile%,Main,Interface,TAB_A_Menu
System,REFRESHINTERFACE

To

[Change.To.Tab.A]
IniRead,%ScriptFile%,Main,Interface,%Current.Tab%
Run,%ScriptFile%,Save.Settings
IniWrite,%ScriptFile%,Main,Interface,TAB_A_Menu
System,REFRESHINTERFACE
System,RESCANSCRIPTS

 

Joveler - I'm not sure if this affects other projects. Any scripts with multiple interfaces may be effected.

Misty

Edit

P.s. Basically when the System,REFRESHINTERFACE command is executed PEBakery would need to be coded rescan all settings contained in the new interface section to fully replicate WinBuilder.

Edited by misty
Link to comment
Share on other sites

@Joveler

I've been thinking about a straightforward workaround to the System,REFRESHINTERFACE issue I reported in the preceding post. How about implementing an option (set as default, but with the ability to turn it off as required)  to run the System,RESCANSCRIPTS command automatically when the Build button is pressed - but before the build process actually starts?

This feature request would ensure better compatibility with my own projects without the need for me to edit a number of individual scripts - a much uglier workaround in MistyPE as the project will continually be rescanning for scripts whenever a tab menu button is pressed.

Misty

Link to comment
Share on other sites

On ‎22‎/‎12‎/‎2017 at 4:19 AM, Joveler said:

Misty, I investigated the issue and there was a bug in System,RefreshInterface when used in main plugin (script.project).

I fixed this issue, so in next build it will work properly.

More great news. Any idea when the next build is likely to be ready for release?

I have been working on updating the MistyPE documentation to include the latest project updates and using PEBakery in addition to WinBuilder. Latest (and hopefully final) draft is available - http://mistyprojects.co.uk/mistype/beta/doc_update_pebakery/readme.html. Comments welcome - particularly if they are positive ;).

I'm like to include the next release of PEBakery (with the above fix) in the MistyPE download package once it's been tested - any thoughts?

Misty

 

Link to comment
Share on other sites

Build 20171225

Download : Link

Changelog
Fixed:
- Fix FileBox to handle root directory path correctly.
- Encode command no longer duplicate entry under [EncodedFolders]
- Launcher.exe will alert user to update .Net Framework if 4.7.1 is not installed.
- Prevent crash in PluginEditButton.

Added
- ShellExecuteSlow, a variant of ShellExecute to run process in BelowNormal Priority.
- ShellExecute's Standard Output Redirect TextBox will be autoscrolled.
- ShellExecute's Standard Output Redirect can be hidden in Setting.
- Implemented EchoFile command.
- .db files are moved info database directory.
- Implemented System,SetLocal|EndLocal, and #r.
- Implemented System,Load.
- System,LoadAll as a new alias of System,RescanScripts.
- New setting to let user choose custom code editor.
- Display line number in error or warning log.
- Implemented INIReadSection.

1. Alert user to install .Net Framework 4.7.1
Launcher.exe now depends on .Net Framework 4.6.2, and alert user to install .Net Framework 4.7.1 if not installed.
4.6.2 was chosen because it is the minimal version supports HiDPI natively.

- Speculations
Launcher.exe's target framework can be lowered more, minimum 4.0 (Windows 8 has this by default).
.Net Framework 4.0 is not installed in Windows 7 by default, but it cannot be trageted.
It is because starting from Windows 8, Microsoft ommited .Net Framework 3.5 in default install.

2. Display Line Number in Error Logs
PEBakery will display line number along with code in error logs.
It will help troubleshooting bugs in .script files.

3. [New] System,SetLocal|EndLocal, #r
System,SetLocal and System,EndLocal is introduced from cmd syntax.

System,SetLocal call isolates modification to local variable, and System,EndLocal reverts local variables to the state before call of System,SetLocal.
Its logic is similar with how Windows isolate envrionment variable in batch file.
New token #r is introduced to be used as return value.
#r is not affected by SetLocal and EndLocal, and designed to be used in macro/section call.
Its value cannot be guaranteed to survive another macro/section call, so copy value into local variable to preserve.
(Think how EAX hold return value in x86 assembly language).

[Process]
Set,%B%,F
Run,%ScriptFile%,A
Echo,B = %B%
Echo,C = %C%
Echo,R = #r

[A]
System,SETLOCAL
Set,%B%,T
Set,%C%,T
Set,#r,T
System,ENDLOCAL
Result:
B = F
C = %C%
R = T

 

4. [New] System,Load

In WinBuilder, one have to call System,RescanScripts to refresh project tree.
To support refresh of subset of .script files, new syntax introduced.

System,Load,<FilePath>,[NOREC]

In FilePath, wildcard can be used. Unless NOREC flag is used, PEBakery will search for file recursively.

System,RescanScripts now have an alias LoadAll, to match terminoloy with System,Load.

System,LoadAll

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...