Greetings,
I'm using the following script which creates 2 files (HTML and TXT) in my desktop folder which works fine. My problem is with the File_Load. It returns gibberish (for me, it always returns ˙ūC).
=====================================================
' Create file containing list of Windows Hotfixes
' using the Windows Management Instrumentation Command (WMIC)
' command. This can produce and HTML file (cmdh) or a TXT file
' (cmdt).
Uses "OS", "File"
String buffer
String wm = "wmic qfe list full "
String Desktop = OS_GetSpecialFolder(%CSIDL_DESKTOP)
String h1 = "/format:htable > "
String h2 = Desktop & "hotfix.html"
String t1 = "/format:texttablewsys > "
String t2 = Desktop & "hotfix.txt"
String cmdh = wm & h1 & $DQ & h2 & $DQ
String cmdt = wm & t1 & $DQ & t2 & $DQ
String lap = OS_GetSpecialFolder(%CSIDL_LOCAL_APPDATA)
RunCommand(cmdh)
RunCommand(cmdt)
buffer = FILE_Load(t2)
ClipBoard_SetText(buffer)
MsgBox(0,buffer)
MsgBox(0,t2)
Function RunCommand( sCommand As String )
String tempBat = lap + "TEMP\temp.bat"
FILE_Save(tempBat, sCommand)
OS_Shell(tempBat, %OS_WNDSTYLE_HIDE, %OS_SHELL_SYNC)
End Function
=====================================================
What the heck am I doing wrong? The File_Load seems so straight-forward.
Regards
Bookmarks