News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

NetShareEnum alias net share

Started by jj2007, February 09, 2024, 11:28:53 AM

Previous topic - Next topic

jj2007

This is inspired by Fraile's thread on NetShareEnum:
  Dim MyShares$(tab)
  Let MyShares$(0)=cfm$("Name\tRemark\tPath")
  invoke MbShares, MyShares$(), 0    ; create a tab-delimited string array
  QSort MyShares$(), 1:99            ; sort alphabetically
  Store "MyShares.tab", MyShares$()
  ShEx "MyShares.tab"                ; ShellExecute the tab-delimited file

Under the hood is a 158 bytes proc (see attachment). At first sight, the output looks almost identical to what the net share produces from a DOS prompt; however, MbShares creates a tab-delimited string array for use with Excel (or any other spreadsheet program). ShEx will launch your default spreadsheet viewer/editor.