Windows 7 Forums


Windows 7: VBS error under Windows 7

04 Mar 2011   #1

window7
 
 
VBS error under Windows 7

G'day,
Trying to use a VBS to communicate via a USB port, but get a permission error on line 4.
Have admin prev's and script works ok under XP.
Code:
 
Const ForReading = 1
Const ForWriting = 2
Set fso = CreateObject("Scripting.FileSystemObject")
Set com = fso.OpenTextFile("COM6:9600,N,8,1", ForReading)
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("C:\arduino\vbs_stuff\results.txt", ForWriting, True)
MsgBox("Start to read data from COM")
Do While com.AtEndOfStream <> True
    s = com.ReadLine
    objFile.WriteLine(s)
    WScript.Sleep(200)
Loop
objFile.Close
com.Close()
Any ideas what I can do. Tks

My System SpecsSystem Spec

Reply

 VBS error under Windows 7 problems?



Thread Tools



Similar help and support threads for: VBS error under Windows 7
Thread Forum
Error: Windows cannot access \\ComputerName... Error 8x0070035 Network & Sharing
Windows 7 x64 Blue Screen error, memory corruption/dll error BSOD Help and Support
Windows Update Error (Error in ScreenShot) Windows Updates & Activation
windows 7 activation error 0x80072+messenger error Windows Updates & Activation
Fix Windows 7 Error “Windows is Not Genuine” Error code Windows Updates & Activation


All times are GMT -5. The time now is 03:14 PM.


Seven Forums Android App Seven Forums IOS App Follow us on Facebook

Windows 7 Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows 7" and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32