ajbritton Posted August 4, 2006 Posted August 4, 2006 I have a script which uses PrintUI.dll to add a per-machine printer. This script runs as a 'startup script', assigned using Group Policy. I have another script which uses WMI to enumerate printer connections and set a default based on certain criteria. When I test the script by running it manually, it enumerates all local and network printers, including the per-machine printer added by the first script. When I assign the script as a logon script however, it does not 'see' the per-machine printer, even though it appears once the logon process is complete. Does anyone know of a good workaround (I can think of a few 'icky' ones)?
webman Posted August 4, 2006 Posted August 4, 2006 Are they running synchronously/asynchronously? Perhaps the first one doesn't have time to finish adding it before the other one has time to enumerate them?
ajbritton Posted August 4, 2006 Author Posted August 4, 2006 I use Group Policy to ensure all scripts complete before the next phase (can't remember if that is synch or asynch). It is a good point however and I will check to ensure the first script is completing prior to user logon. Both scripts write to logs and include the date/time so I should be able to see what is happening when.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now