[Resolved]TBWinPE Autostart script limited user action to script

User discussion and information resource forum for scripting of TeraByte products using script lanugages such as TBScript, VBScript, Batch Files, and more.
Post Reply
nemesis
Posts: 76
Joined: Mon Jun 21, 2021 12:25 pm

[Resolved]TBWinPE Autostart script limited user action to script

Post by nemesis »

Hi,

Is there a way to disable all user interaction in the TBWinPE image except for a command window running a tbs script?

I need to create something that is meant for a normal user with limited exprecience. I do not want them let's say experimenting!
Last edited by nemesis on Fri Aug 27, 2021 8:27 am, edited 1 time in total.
Regards,

Davy Vaessen
ICT+ Netherlands
TeraByte Support(PP)
Posts: 1528
Joined: Fri Aug 12, 2011 12:51 am

Re: TBWinPE Autostart script limited user action to script

Post by TeraByte Support(PP) »

Generally, I would recommend putting a warning message in your script to avoid doing other things unless instructed to by support (for example) instead of blocking all user interaction. This would let normal access to the tools be available if required.

Normally, TBLauncher should run because it handles initialization and configuration on startup, some of which would be skipped otherwise. If this isn't an issue then you could configure the startnet.cmd script to run whatever you need (TBLauncher is the last item by default). Note that when the Command Prompt window is exited/closed the system will restart.

Otherwise, the options are to use the InitScript.cmd file to run what you need prior to TBLauncher showing and/or the RunScript.cmd file to run after TBLauncher shows. For example, you could configure the InitScript to run your TBOSDT script and the RunScript to restart the system. Or your TBOSDT script could handle restarting, shut down, etc. Note that if the InitScript runs and finishes, TBLaucher will run IFW by default. If you don't want this, then use RunScript to do something else. Using the the autorun.cmd script might also be an option to consider.

Information on these options is in this article:
https://www.terabyteunlimited.com/howto/builder_settings.htm

You may also find this KB article helpful since you are creating a custom build:
https://www.terabyteunlimited.com/kb/article.php?id=615
Paul Purviance
TeraByte Support
nemesis
Posts: 76
Joined: Mon Jun 21, 2021 12:25 pm

Re: TBWinPE Autostart script limited user action to script

Post by nemesis »

Hi Pual,

I love this forum! Thank you for the elaborate, thoughtfull and detailed responce! As always you go beyond the call of duty.

although i would agree with you in the warning, this is regretably a requirement by the customer. They do not want their end customer tinkering with the product (understandable since you can buy a small island for the price of their products).

I'll look into all of this and followup, this make a few days though.
Regards,

Davy Vaessen
ICT+ Netherlands
nemesis
Posts: 76
Joined: Mon Jun 21, 2021 12:25 pm

Re: TBWinPE Autostart script limited user action to script

Post by nemesis »

Hi,

creating the custom WinPE was really simple in the end thnx Paul. One feedback point though is that the documentation on it is quite confusing.

I have a number of followup questions if I may:
1. What does Initialize network do? It takes a long time to complete for some reason.
2. startnet.cmd runs as a cmd window, which is great and exactly what I need. However it does not start in fullscreen:
2.1. I can get to go "fullscreen size" with "mode 800". However since it isn't located at the top of the screen it doesn't work well. Is there a way to get it to go proper full screen without the user having to pull it up manually?
2.2. The user can minimize the window after de-minimizing it the menu is all screwed up can I dissable this?
2.3. The user can press the X or escape to close the window, can I dissable this?
2.4. The user can maximize or de-maximize the window, can I dissable this?

For a large part the end users of this system are factory workers, we want to limit what they can "break" as much as possible. The machines themselves are costly (Silicon wafer lytho analyses) and their mtbf should be low.

Regards, Davy
Regards,

Davy Vaessen
ICT+ Netherlands
TeraByte Support(PP)
Posts: 1528
Joined: Fri Aug 12, 2011 12:51 am

Re: TBWinPE Autostart script limited user action to script

Post by TeraByte Support(PP) »

1. Initialize Network runs the WinPE network initialization. If you're not using the network then you could disable it. Normally, it doesn't take a long time to complete. Are you using TBLauncher or skipping it? From what you describe, I assume skipped so bare-bones CMD shell.

2.1 If the window position is set to start at 0,0 then your "mode 800" should work. Otherwise, you would probably need to adjust the position and size. Add this to the BuildScript (BuildScript.cmd) and it should position the CMD window to top-left. Then recreate the build. (I assume you're using Builder):

Code: Select all

reg add "HKLM\%TBWINPE_Reg_DEFAULT%\Console" /v WindowPosition /t REG_DWORD /d 0 /f
2.2 Not sure what you mean here. What are you using for the menu? Is it a TBOSDT script running in the CMD window?

2.3, 2.4 As far as I know, there aren't any settings to disable the normal controls. If they exit it the computer will restart.
Paul Purviance
TeraByte Support
nemesis
Posts: 76
Joined: Mon Jun 21, 2021 12:25 pm

Re: TBWinPE Autostart script limited user action to script

Post by nemesis »

Hi Paul,

thnx, for the reply as always.

@1: ah ok I defenitly need that, correcy I use the barebones CMD shell.

@2.1: Great this is what I was looking for, thank you!

@2.2: What I meant were the cmd window controls in the top right. If you minimize the CMD window and then maximize it again the menu's created with Utility.inc get all screwed up.

@2.3&2.4: yeah i figured as much. We'll have to live with it then.

PS I've been going through the Utility.inc and migrating/rewriting the functions in there I use. I know it's just meant to be an example, however as an example it's a bit of a mixed bag tbh. The readability is very poor, many of the code is illogically structured and it doesn't seem to conform to a single standard. I think it would help customer if Terabyte does a quality pass over it using modern software conventions. Just to be clear this is meant as feedback, not as a complaint. Since it serves it's purpose.

Regards, Davy
Regards,

Davy Vaessen
ICT+ Netherlands
Post Reply