************ WinBatch+Compiler 2025B Release ************

Started by td, June 13, 2025, 10:10:45 AM

Previous topic - Next topic

td


WinBatch, WebBatch, and WinBatch+Compiler 2025B are now available for download.

Users with a current license may download the latest version of the software from the download page.

https://www.winbatch.com/download.html - use the "Click here to download WinBatch+Compiler" link.

If you do not have a current license and are interested in this and future releases, please visit our software purchase page. You can easily order online.

https://commerce.winbatch.com

Release notes:
WB 2025B 2025 Jun 11, 2025 

DLL 6.25byb First appearing in WB 2025B

Modified the ClipGet function to generate an error when invalid data is present on the Windows
per-user clipboard. This change prevents a memory access violation that can cause abrupt script
termination.

New function:
    NumConvert( value, from-base, to-base)
    Returns value in the to-base representation.
    value:  number to convert.
    in-base: current base of value (valid bases: 2-36).
    to-base: new base of value (valid bases: 2-36).

    CredMan( command [, target [, user_type [, secret_def]]])
    Reads and writes credentials to the Windows Credential Manager. Returns @True, @False, or an
    array depending on the command.
    command: "Domain", "Generic", "Read", "Enum", or "Delete".
    target: Name identifier of entry in the Credential Manager.
    user_type: The user name of the credential or credential type. Types are "Domain" or "Generic".
    Secret-def: Secret (password) associated with the credential or default text in the return
                array elements.

  WinBatch Studio:
    Added goto/gosub labels to the user defined procedure(UDP) toolbar. Labels begin with a
    colon(:) and appear before any user defined procedure names.

  Dialogs and Dialog Editor:
    Updated the dialog function to clear timers and remove pending timer events prior to dialog
    termination.

    Added a PROGRESS control. Use the PROGRESS control to display the progress of a lengthy
    operation performed inside a WIL Dialog user-defined callback procedure. The PROGESS contol
    does not use the variable, value, or font dialog template attributes.
     
      text  - The text attribute is used to indicate the range and step of the PROGESS controls
              bar. Specifying 'DEFAULT' or using an empty string causes the control to use the
              range 0 to 100 with a step increment of 10. Three numbers make up the min-max
              range and step must be vertical bar (|) delimited. For example, "0|100|10"
              represents the control's defaults.
                       
      style - The control supports the @csInvisible(1) and @csDisabled(2) styles. In addition
              the control accepts the following new style:
               
                @csVertical(16384) - Causes the Progress control's bar to move from the bottom
                                      to the top instead of from left to right. This style can
                                      only be set in the dialog template. DialogControlState
                                      cannot be used to change this style.

      textcolor - Sets the color of the control's bar.
 
      backgroundcolor - Sets the text color of the position of the control not covered by the
                        bar.
     
      Modified the 'DialogControlGet' function to support new PROGRESS request codes:
            @dcBarPos(32) - Returns how far PROGRESS control bar has advanced. The return value
            is always within the control's range.
           
            @dcBarLimits(33) - Returns the bar min/max range and step as 3 bar delimited
                              numbers.
     
      Modified the 'DialogControlSet' function to support new PROGRESS request codes:
            @dcBarPos(32) - Set the position of the control's bar relative to the range. Use
                            the value -1 to move the control's bar by 1 step.
           
            @dcBarLimits(33) - Changes the control's bar limits and step.  Use three vertical
                              bar separated numbers for the min|max|step to convey the new
                              range and step.



"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

kdmoyers

The mind is everything; What you think, you become.

spl

Will try to script out a demo for the number conversion.

but this is cool
value = 987654222
base26 = NumConvert(value,10,26)
Message("Value: ":value,"Base26: ":base26)
Exit
Stan - formerly stanl [ex-Pundit]

chrislegarth

The PROGRESS control is awesome...much appreciated!

kdmoyers

CredMan looks significant, but I've never used Windows Credential Manager before.

So, I use this to store a certain resource password, from a central location.
And then user wbt scripts all over the lan could get that password to access some resource?  I'd like to avoid hard coding passwords into scripts.

Is that was this is for?
The mind is everything; What you think, you become.

td

The Windows Credential Store is for one user on one computer. It is my understanding that the credentials are encrypted using both user and machine specific hashing. It is a way to save passwords or other secrets without having to prompt for them every time they are needed. You can access them via a script once the password is set.

Another use is to set user passwords for network shared resources without having to type each one in. For example, you could use the function to set up your shared resource passwords on a second or new machine. Of course, you would need to remember the password used for the share because the function does not retrieve "Domain" passwords.

The function does a good job of erasing memory stored passwords when setting a credential. However, there are obvious reasons why it can't do that when retrieving stored "Generic" passwords.

A new variable clearing function is planned for a future release. It will erase all presence of a text variable in computer memory. It is a bit trickier than it sounds, given memory caching and execution optimization.

Hard coded passwords are a problem.  I suppose an encrypted connection to a domain local web server could be used to retrieve a password and store it in each local credential manager.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

td

There is a section of the Tech Database site dedicated to encryption with WIL scripts.

https://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/Samples~from~Users/Encryption

Not sure how useful the examples are in your environment but they may spark an idea or something.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

kdmoyers

The mind is everything; What you think, you become.

spl

Another interesting topic. As per a response I made in the recent thread form an OP with Word files he admitted could be encrypted, I had created a script to encode and decode Word docs with AES as well as extract links and shapes. This, of course, done under corporate rules - i.e. PGP, EFS, or AES encryption.

So based on the exchange in that thread, I questioned (for Word documents as example) -
  • could it be determined if file was encrypted
  • if so, could you determine the method

The answer to the second point, without very special tools, or just scripting - "of course, not"

So I took a word doc with hyperlinks and pasted image shapes (which could be easily extracted) and encrypted it to files with several options, then tried a revised script to again open and extract the links, images - which would fail but would like to know why.

If encrypted with EFS, seems like exposing the file attributes with "Encrypted" will work so you can acknowledge the encryption and exit a script. As for anything else, an error is inevitable. So for the Word doc I looked at then first 50 chars of the raw file for "word/document.xml" and if it didn't exist then script concluded file was either corrupt or encrypted.

Guessing analyzing the header is the best method to detect encryption, just not which one.

Sorry, this is OT.


Stan - formerly stanl [ex-Pundit]

SMF spam blocked by CleanTalk