Topic: RunAfter.script Help  (Read 106 times)

RunAfter.script Help
« on: July 26, 2020, 01:45:10 AM »

strongbad75

  • Jr. Chef
  • **
  • Location: California
  • Date Registered: Feb 2020
  • Posts: 24
Hi All,
I am trying to figure out how to run a .bat file after WinPE completes booting & networking finishes loading.
The script is to run winvnc.exe from a folder on the desktop (to start a VNC Server) to allow remote inbound access after WinPE boots.
I believe I want to use the "Run this script After" section of the Additions plugin and I am not sure how to format the script file.

Any help is much appreciated.  :cool:

Re: RunAfter.script Help
« Reply #1 on: July 26, 2020, 06:06:20 AM »
  • Location: Israel
  • Date Registered: Dec 2017
  • Posts: 444
you have to use pecmd.ini.

look for

_END
////////////////////////////////////////////////////////////////////////////////////////////////
_SUB NetInit

enter someplace here.

// Launch PENetwork
EXEC %ProgramFiles%\PENetwork\PENetwork.exe

Re: RunAfter.script Help
« Reply #2 on: July 27, 2020, 06:25:20 AM »

PetePossum

  • Jr. Chef
  • **
  • Date Registered: Mar 2016
  • Posts: 51
You can also use the PENEtwork Configuration Tool, in case you prefer a GUI.

From the MAIN Builder GUI, Advanced Options, PENetwork Configuration Editor
Then select your default Network Profile (or the one you choose at startup manually), click "CMDs after startup", and enter the commands you need.

Note: By default, there is already one CMD that runs in case in exists after Network initialized.




Re: RunAfter.script Help
« Reply #3 on: July 27, 2020, 11:56:53 AM »

strongbad75

  • Jr. Chef
  • **
  • Location: California
  • Date Registered: Feb 2020
  • Posts: 24
Thanks Bigbadmoshe for clarifying the usage of how the scripts work. :thumbsup:
I added two lines that run the winvnc server and open up the firewall rule for that service.

Thanks PetePossum for pointing out an additional method.

 

Powered by EzPortal