+ Post New Thread
Results 1 to 9 of 9
Windows Thread, Failing Script.. sometimes. in Technical; I have a login script that fails sometimes. It is a batch file that calls a VBS script and it ...
  1. #1
    jmair's Avatar
    Join Date
    Aug 2007
    Posts
    291
    Thank Post
    65
    Thanked 9 Times in 9 Posts
    Rep Power
    16

    Failing Script.. sometimes.

    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.

    Code:
    \\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?

  2. #2
    PEO
    PEO is offline
    PEO's Avatar
    Join Date
    Oct 2007
    Posts
    2,096
    Thank Post
    457
    Thanked 152 Times in 96 Posts
    Rep Power
    72

    Re: Failing Script.. sometimes.

    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.

  3. #3

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    18,332
    Thank Post
    525
    Thanked 2,596 Times in 2,014 Posts
    Blog Entries
    24
    Rep Power
    888

    Re: Failing Script.. sometimes.

    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?

  4. #4
    jmair's Avatar
    Join Date
    Aug 2007
    Posts
    291
    Thank Post
    65
    Thanked 9 Times in 9 Posts
    Rep Power
    16

    Re: Failing Script.. sometimes.

    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.)

  5. #5
    jmair's Avatar
    Join Date
    Aug 2007
    Posts
    291
    Thank Post
    65
    Thanked 9 Times in 9 Posts
    Rep Power
    16

    Re: Failing Script.. sometimes.

    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.

  6. #6

    maniac's Avatar
    Join Date
    Feb 2007
    Location
    Kent
    Posts
    3,081
    Thank Post
    210
    Thanked 431 Times in 311 Posts
    Rep Power
    145

    Re: Failing Script.. sometimes.

    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.

  7. #7

    Join Date
    Mar 2007
    Location
    Central Scotland
    Posts
    829
    Thank Post
    12
    Thanked 8 Times in 8 Posts
    Rep Power
    19

    Re: Failing Script.. sometimes.

    I was about to suggest splitting it into two scripts, running the unmount early in the script and the mount script at the end.

  8. #8
    pedster666's Avatar
    Join Date
    Oct 2007
    Location
    northumberland
    Posts
    19
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: Failing Script.. sometimes.

    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

  9. #9

    mattx's Avatar
    Join Date
    Jan 2007
    Posts
    9,247
    Thank Post
    1,059
    Thanked 1,069 Times in 625 Posts
    Rep Power
    740

    Re: Failing Script.. sometimes.

    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.



SHARE:
+ Post New Thread

Similar Threads

  1. SIMs backup script after SQL 2005 migration failing...
    By mullet_man in forum MIS Systems
    Replies: 13
    Last Post: 23rd November 2007, 07:03 PM
  2. Replication between DC's failing
    By j17sparky in forum Windows
    Replies: 2
    Last Post: 1st December 2006, 10:07 AM
  3. Multiple Switches failing
    By u8dmtm in forum Wireless Networks
    Replies: 3
    Last Post: 20th May 2006, 05:40 PM
  4. Sims failing to load
    By snakepottery in forum Windows
    Replies: 3
    Last Post: 9th January 2006, 12:27 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •