jmair Posted October 23, 2007 Posted October 23, 2007 I have a login script that fails sometimes. It is a batch file that calls a VBS script and it unmounts and mounts drives. below is the script. \\como\SYSVOL\parkcounty.int\scripts\PrinterScript.vbs net use w: /delete net use s: /delete net use l: /delete net use l: \\alma\Lab net use w: \\webserverdelta\ftproot\%username% net use s: \\alma\students It is fairly direct. I'm unsure why it fails completely randomly. Any ideas?
PEO Posted October 23, 2007 Posted October 23, 2007 why would you want to unmount the same drive leters to mount again? I'm no script expert, but if thats what you want i would split the script. make an umount script for logoff, and a mount script for logging on.
localzuk Posted October 23, 2007 Posted October 23, 2007 I have a script that unmounts and then remounts drives - this ensures that the drives are always pointing to the right place - as sometimes people map drives and use the 'mount drive at next log on' or whatever it is box. Which part of your script is it failing on?
jmair Posted October 23, 2007 Author Posted October 23, 2007 I was noticing a delay in running the script when it tries to mount a drive already mounted. Unmounting them and Mounting again increased the speed quite a bit. It seams that the script doesn't even get triggered at all. Either it's all or nothing. Would the Printer portian of the script have to finish running before the rest of the Batch follows threw ? (I shoudl test this with two batch files recording time.)
jmair Posted October 23, 2007 Author Posted October 23, 2007 I created two batch files. ........................................................... time1.bat time /t > timetest1.txt time2.bat time /t > timetest3.txt ........................................................... time2.bat time /t > timetest2.txt pause ........................................................... When the time1.bat runs, it stops all together once it calls time2.bat. I don't know if VBS in a batch file would act the same way or not, but in case, I moved my printer vbs script to the bottom of the batch file and so far it looks good. hope this might help somebody in the future.
maniac Posted October 23, 2007 Posted October 23, 2007 I was going to suggest moving the vbs script call to the end of the batch file as I've had problems in the past when calling one script from another. Then reading down I noticed that's exactly what you've done anyway! I think you'll find by making that change, you have solved your problem. Mike.
Halfmad Posted October 25, 2007 Posted October 25, 2007 I was about to suggest splitting it into two scripts, running the unmount early in the script and the mount script at the end.
pedster666 Posted October 29, 2007 Posted October 29, 2007 hi not sure if this is the right place to post this as i am noob to the site im havin some problems with my printer scripts, my school has 8 labs and 4 of them seem to print to 1 lab, now this this only happens if you press the printer icon in microsoftv word or IE7, i have changed all the scripts twice now using the CSE script manager! can anyone help me please, and also is there away of removing the printer icon from the users in group policys??? thanks in advance pete computer technicain
mattx Posted October 29, 2007 Posted October 29, 2007 i have changed all the scripts twice now using the CSE script manager! There is a bug in workspace explorer 5.0.11 [ if you are using this ] to launch the scripts - you have to tick the Auto start box under the 'Edit Application' if you change anything there....... You have to do this everytime you make a change and you need something to Auto Start.
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