Jump to content

Recommended Posts

Posted
I've been using a couple of logon scripts for ages without problem. Now one client is throwing up a Windows Script Host error code 8007007B, for all users including admin. The script connects shares and printers to the clients, and I haven't changed anything in the scripts recently. Moreover, the script works fine on other machines in the Suite. Only one printer is affected, and is not connected as a result. The only fairly recent change is that the clients have been updated to SP3 (XP Prof) and the server updated to SP2, but other updated clients are unaffected. I did google the error code, but the only mentions of similar problems were in experts exchange, which I need to pay for to access the actual solution! Server is Windows 2003. I've attached a screenshot of the error message, but it's lying!!! :confused:

Script Error ColourLaser.pdf

Posted

As far as experts exchange is concerned when you google it make sure you open the cached version and scroll to the bottom the solution is visible to all :-)

 

If you scroll to the bottom on the bulk of non-cached pages, you can see the answers now...

 

You could register as an expert I think and you can just view the answers normally.

Posted
Thanks for the help with getting at the solution on experts exchange (useful tip!). The suggestion that looked likeliest suggests possible connection issues, and adds to the printer script by getting the connection to try 10 times witha 2 second pause. However, my problem is only on the one machine and is not intermittent. And the printer seems to connect despite the error when logged on as administrator... :confused:
Posted
OK, here are the scripts. I didn't think I needed to post these as they have been working fine for months, and they still are working fine on the rest of the (identical) clients in the IT Suite. Both of these scripts are throwing up the same error message on just this one machine (so far anyway!). These are not new scripts, and the offending line (in the IT Printing section, and ending in ColLaser) is repeated elsewhere for other machines in other locations and doesn't throw any errors either. Also I have now noticed that although the error comes up when logged in as domain admin, the printer is still available - not so for other users. The only recent change to the machines is an update to XP SP3.

logon.vbs

stafflogon.vbs

Posted
maybe on this one machine un install and re install SP3 ?

 

That or re image it and then put SP3 on the machine - seeing as its only one machine and not all of them

 

I think I'll give it a go tomorrow, thanks :). Will let you know if it fixes it.

Posted (edited)

I uninstalled SP3 and just did a bit of testing, logging in as admin and other users - no scripting error now and printer available. Then I reinstalled SP3. Again, logged in as admin and other users - no scripting error and printer now available. This will be one of those little IT mysteries as to why the first install caused this problem, but it's fixed so I'm happy. Thanks! :)

 

P.S. Uh, oh. Just found another client with same problem!! Why don't users report these things???!!! Now I'm going to have to check them all.

Edited by Andie
Postscript added.
Posted
I uninstalled SP3 and just did a bit of testing, logging in as admin and other users - no scripting error now and printer available. Then I reinstalled SP3. Again, logged in as admin and other users - no scripting error and printer now available. This will be one of those little IT mysteries as to why the first install caused this problem, but it's fixed so I'm happy. Thanks! :)

 

Good to hear it and not sure why its done that - maybe did not copy a few of the files over correctly or they may of gotten corrupted some how (shrugs)

 

 

 

 

P.S. Uh, oh. Just found another client with same problem!! Why don't users report these things???!!! Now I'm going to have to check them all.

 

Because ................. that would be too easy

  • 1 year later...
Posted

Sorry for resurrecting my old post, but this has reared it's ugly head again in a different situation.

 

We have a set of laptops in each class now, new laptops but running XP Professional SP3. The SP3 is part of the original Windows install on these, and not an update. Been fine for a good few months.

 

A teacher has given me three laptops which are now unable to print to the colour laser printer (HP Colour LaserJet 2605dn). Same printer as the original posting. Booted the laptops and they are all showing the scripting error. If I log in as a pupil, the colour laser printer is not found in the printers list. If I log in as domain admin, I still get the scripting error but the printer is shown and I can print a test page fine.

 

The script is the same as attached higher up. It is just used to allocate the correct set of printers to the workstation at login. We have 31 desktops and 98 laptops, and, as far as I know, only these three have this issue - so the script can't be the problem.

 

Server is Windows Server 2003.

 

Other printers are fine.

 

I can't uninstall SP3 update, as it isn't an update. I would have to reimage the laptops. If this problem occurs on other machines, this could become a real headache.

 

Any ideas???

Posted

can you manually map that printer by hand?

can you ping it.. from the pc you have the problem mapping from

 

have you tried a basic script to test

------------------------------------

Option Explicit

Dim netPrinter, UNCpath

UNCpath = "\\ms-lnm-server\ColLaser"

Set netPrinter = CreateObject("WScript.Network")

netPrinter.AddWindowsPrinterConnection UNCpath

WScript.Echo "Your printer is mapped from : " & UNCpath

WScript.Quit

' End of example VBScript

--------------------------------------------------------

 

or change script to use con2prt.exe

  • Thanks 1
Posted
can you manually map that printer by hand?

can you ping it.. from the pc you have the problem mapping from

 

have you tried a basic script to test

------------------------------------

Option Explicit

Dim netPrinter, UNCpath

UNCpath = "\\ms-lnm-server\ColLaser"

Set netPrinter = CreateObject("WScript.Network")

netPrinter.AddWindowsPrinterConnection UNCpath

WScript.Echo "Your printer is mapped from : " & UNCpath

WScript.Quit

' End of example VBScript

--------------------------------------------------------

 

or change script to use con2prt.exe

 

The printer is there when logged in as administrator and I can print to it, even though I get the script error. The script has been running fine for all users for months and still runs fine for all the other identical laptops. It is just these three that, all of a sudden, are throwing up script errors and preventing ordinary users from connecting to the printer. I can run the test script, but I don't understand what this helps with. Sorry if I am being thick.

Posted

its just to check the connection to the printer..

as student.. some thing has changed even if you dont know what it is..

login in as admin is pointless as it's like having a master key to the school..

 

the script is to just test the connection as a student on a student GPO.. its saying it cant find it... i could say theres a dns error but not knowing what its set up like..

 

just try it for entertainment.. i have the same argument with virgin when things dont work.. and they say "Well everyone eles is ok in the street" it does not help.

Posted (edited)

In your code you have repeated chunks of code regarding your DIMS ie Dim x As Integer or Dim strText and the same for the creation of objects

 

[b]-> Set objNetwork = CreateObject("WScript.Network") [/b]
Set WSHShell = CreateObject("WScript.Shell") 
[b]-> Set WshNetwork = WScript.CreateObject("WScript.Network")[/b]
[b]-> Set oNetwork = CreateObject("WScript.Network")[/b]
Set clPrinters = WshNetwork.EnumPrinterConnections

You only need one and whenever you need to use it again you just change the coding below to refer to one so you could delete the 2nd and 3rd one and only use the first one or however you wanted to do it as you dont need to create the same object with different variable names

 

ie

 

[b]Set WshNetwork = WScript.CreateObject("WScript.Network")

Wscript.Echo WshNetwork.Username

[/b]

Are you able to post the few lines of code where you think its erroring out on ?

 

Also you have a disconnect sub - which you shouldn't need as when you are mapping the printers there is a for loop that removes all printers before it re adds them.

 

http://www.computerperformance.co.uk/Logon/code/code_8007007B.htm

Edited by mac_shinobi
Posted
at the end of day its for testing...

not world order..

 

what's that comment all about ?

 

Just trying to tidy the code up so it makes more sense and not repeatdly re create the same objects with different variable names and the same for declaring of variables, its just not needed.

 

Also could create a sub to take the server name and share name as the rest of the code regarding adding of a printer is the same

Posted

You could try updating/reinstallling WSH on the affected machines, i've had a few times where it can become messed up. There should be a download on the MS site ... Type Windows Script Host in the search

 

Skr

Posted (edited)

OK, some progress. I spent about an hour looking at this with my secondary school technical support person. Turns out that the colour printer was a bit of a red herring - the current error points to line 138 or 148 depending on which of the scripts runs (logon or stafflogon). This line refers to the Y5Laser. The colour printer is being blocked because in one script it comes after the Y5Laser - in the other script it comes before.

 

its just to check the connection to the printer..

as student.. some thing has changed even if you dont know what it is..

login in as admin is pointless as it's like having a master key to the school..

 

the script is to just test the connection as a student on a student GPO.. its saying it cant find it... i could say theres a dns error but not knowing what its set up like..

 

just try it for entertainment.. i have the same argument with virgin when things dont work.. and they say "Well everyone else is ok in the street" it does not help.

 

Yes, thanks for the test script. The colour printer mapped and pings fine. The Y5Laser pings, but doesn't map, even as domain admin. We've checked the share name is correct and checked permissions, and checked the IP address of the port.

 

I went and tested a random sample of other laptops that connect to Y5Laser. All are showing the same issue (although no one had logged it). We REMd out the Y5Laser lines in the script, and the scripting error went away. So there appears to be an issue with this particular printer and the curriculum laptops. Staff laptops, which aren't on the domain, print to it fine. Can do a test print direct from the server too. Ran out of time, but next test will be to run a test from a networked desktop in the IT Suite. I'm also going to double check the Y4Laser, as it is same make and model as Y5Laser. Both are HP 2200dn with JetDirect cards.

Edited by Andie
Posted
Working on a YR4 laptop and it is fine, with no scripting error and the Y4Laser set as default. BUT just been to deal with a problem in year 3 on a laptop, and when they logged in they were getting a scripting error. This laptop had just been brought to me because it had failed to log on to the network, and had come up with a local profile (no scripting error then). When logged on next time, it had picked up the network, but had a scripting error.
Posted

Can anyone shed any light on this issue?

 

The laptop I am using shows a printer connection to a printer called Y4Laser, with the printer set to Ready. I am logged in as domain admin. If I double click the printer, I get the attached on screen.

 

I can't map to this printer from this laptop.

 

The laptops behind me, using the same wireless connection to the network, can map to the printer with no error messages. All of the laptops in this room with me are in the same AD group and they were all imaged from the same build. The laptops behind me are a random sample from year 4. None have the scripting error. So far, this year group seems to be the only one unaffected by the issues with these laser printers, unless I have been incredibly lucky with my random sample.

 

I can't work out what the link is.

Printer Connection Error 20110516.pdf

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...