Forum Discussion
ixxo09
Nov 21, 2024Copper Contributor
Strange chraracters in the powershell command PS_GetOutputFile("netsh wlan show interfaces")
I´m creating a sub that lay out in a textbox of a form with strange chrs. my sub is as follow: Private Sub Form_Load()
'Redondear las esquinas del formulario
Call UISetRoundRect(Me, 40, Fal...
Nov 21, 2024
What if you try a different approach?
Function RunCmd() As String
Dim sCmd As String
sCmd = "netsh wlan show interfaces | clip"
CreateObject("Wscript.Shell").Run "cmd /c " & sCmd, 0, True
DoEvents
With CreateObject("New:{1C3B4210-F441-11CE-B9EA-00AA006B1A69}")
.GetFromClipboard
RunCmd = .GetText
End With
End Function
Don't forget, you need to use an appropriate font to display the results and the VBE can't handle unicode.
You may also like to read the following discussion which talks about PowerShell encoding: Displaying Unicode in PowerShell. If you search you find many more discussions on the subject.
As a side note, if you take other people's work (my PowerShell procedures) you could at least have the decency to keep the header/copyright notice. I do all the work and you can't even show that minimum level of respect!
- George_HepworthNov 21, 2024Silver Contributor
Cross-posted at UtterAccess.