Printing Scipt not working in Windows XP

Discussion in 'ASP General' started by Ramesh Singh, May 8, 2008.

  1. Ramesh Singh

    Ramesh Singh Guest

    IN Windows 98 below script was running fine
    <SCRIPT ID=clientEventHandlersVB LANGUAGE=vbscript>
    function button1_onclick()
    Const ForReading = 1, ForWriting = 2, ForAppending = 8
    Dim fso, f,a
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set f = fso_OpenTextFile("c:\testfile.txt", ForWriting, True)
    f.Write txtout.value & vbcrlf
    Set a = fso.GetFile("c:\testfile.txt")
    a.Copy ("c:\lpt1:")
    end function

    but after installing XP giving error ACTIVEX OBJECT CANT CREATE OBJECT.

    Can any one provide me a script that can run in XP
    Ramesh Singh, May 8, 2008
    1. Advertisements

  2. First of all, ASP is server-side technology, making this group the wrong
    place to get quick help with client-side questions. Since you are using
    vbscript, you will get help quicker by posting to

    That said, you are going to find that browser security has been locked down
    these days. Code such as the bit you are using was easily abused by hackers
    to perform malicious actions. Client-side script no longer has easy access
    to a user's file system. It may work if you can persuade the user to put
    your site into his Trusted Zone. Switching to a .hta file instead of .htm
    will also enable this security to be bypassed. And lastly, you need to worry
    about users running anti-virus programs that interfere with the use of

    Any further questions about this should be directed to the more appropriate
    group. There are people with more knowledge of these matters that are
    regulars on the .scripting groups.
    Bob Barrows [MVP], May 8, 2008
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.