+ Post New Thread
Results 1 to 7 of 7
Scripts Thread, All dancing single or separate scripts? in Coding and Web Development; Been battling all day with my new printer\drive maping script. One minute it works, the next it only maps half ...
  1. #1
    TechSupp's Avatar
    Join Date
    Mar 2007
    Location
    South Yorkshire
    Posts
    1,824
    Thank Post
    288
    Thanked 112 Times in 93 Posts
    Rep Power
    39

    All dancing single or separate scripts?

    Been battling all day with my new printer\drive maping script. One minute it works, the next it only maps half the drives! If I then browse to the script directory and run the script it works perfectly!

    Now...I have all this going on in one script but is that the problem and should I do them as separate scripts i.e. set_printers and set_drives etc. At one of the other schools I had to do this and it works fine, yet at another (they don't have folder redirection going on) it works as a single file.

    So my questions are:
    1. Should I use separate scripts
    2. Is it the folder redirection that is messing with the processing of the scripts at the same time

    3.As a final problem one of the printers reports in light grey writing under the printer icon (where it gives its status) Access denied, etc, yet if I select it in a program it prints fine :?

    4. Why oh why did I go into work today!

    PS The original setup was a couple of batch files. I have deleted them from the Pupils and Teachers GPO logon/off properties, but would they also be located anywhere else i.e. on a global GPO? Where should I check?

  2. #2

    Ric_'s Avatar
    Join Date
    Jun 2005
    Location
    London
    Posts
    7,582
    Thank Post
    107
    Thanked 761 Times in 592 Posts
    Rep Power
    179

    Re: All dancing single or separate scripts?

    The original batch files may have been called from teh users' properties pages... may be worth a check.

    Personally, I would have two scripts to do what you are trying anyway. By keeping these two distinct scripts separate there is less to go wrong and makes editting and troubleshooting easier. There shouldn't be a performance hit and GPOs are perfectly happy having several scripts defined for logon.

  3. #3
    Joedetic's Avatar
    Join Date
    Jan 2006
    Location
    Walsall
    Posts
    1,316
    Thank Post
    6
    Thanked 13 Times in 13 Posts
    Rep Power
    21

    Re: All dancing single or separate scripts?

    Ric_ is right. Separate scripts make it easier to see what's going wrong.

    However, if you /do/ decide to lump them into one super-script make sure it's commented well, that way it's going to help when it comes to editting etc.

    With regards to the printer problem. Could it be a permissions thing? IE: being able to print to but not edit properties of the printer?? (*makes stab in the dark*

  4. #4


    tom_newton's Avatar
    Join Date
    Sep 2006
    Location
    Leeds
    Posts
    4,447
    Thank Post
    865
    Thanked 839 Times in 662 Posts
    Rep Power
    194

    Re: All dancing single or separate scripts?

    Unix philosophy: Do one job and do it well

    If you have loads of little tools rather than one super-swiss-army-knife, you can "chain" them in different ways, and put them together differently to do different things later. You'll thank yourself later for keeping things separate.

  5. #5

    maniac's Avatar
    Join Date
    Feb 2007
    Location
    Kent
    Posts
    3,037
    Thank Post
    209
    Thanked 425 Times in 306 Posts
    Rep Power
    143

    Re: All dancing single or separate scripts?

    I have mine as seperate scripts, 3 in total, 1 for drive mapping, 1 for printer mapping, and 1 that does other misc tasks.

    If they've VB scripts, one of the common problems (particlarly with drive mapping) is the script executing before the user is properly logged on, therefore being unable to map the drives as the user isn't properly authenticated to the server yet.

    To solve this problem, it is possible to put a small loop in the script that only exits once the user is logged on. Simple but effective! (worked for me)

    Mike.

  6. #6
    TechSupp's Avatar
    Join Date
    Mar 2007
    Location
    South Yorkshire
    Posts
    1,824
    Thank Post
    288
    Thanked 112 Times in 93 Posts
    Rep Power
    39

    Re: All dancing single or separate scripts?

    Thanks All,
    Went in this morning with the script broken down into separate ones i.e. Map_drives, Map_printers etc, loaded them up and hey presto worked first time and every time

    So just had time by the end of the day to leave a little message for the staff to arrive to on Monday,

    "All school PC's out of use till lunchtime"

    Give me time to finish off all the other little bits that did'nt get done today.

    P.S. The printer message was an rights issue (now sorted).

  7. #7

    Join Date
    Aug 2005
    Location
    London
    Posts
    3,144
    Thank Post
    113
    Thanked 518 Times in 447 Posts
    Blog Entries
    2
    Rep Power
    121

    Re: All dancing single or separate scripts?

    Quote Originally Posted by TechSupp
    PS The original setup was a couple of batch files. I have deleted them from the Pupils and Teachers GPO logon/off properties, but would they also be located anywhere else i.e. on a global GPO? Where should I check?
    You don't say which version of Windows server you're running but if it's 2003 then you can use the Group Policy Management Console to find out what's where.

    One thing that's really useful is modelling - it lets you see what policies will apply to any user on any computer (details at http://technet2.microsoft.com/Window....mspx?mfr=true)

    If you don't have many GPOs but you don't know where they're applied (eg if you have one GPO which contains the logon script but it's applied at lots of different levels) then you can also use the tree view to see what's connected where - click at the top of the domain and press the * key to expand all the way down. You can then quickly see what's going on.

SHARE:
+ Post New Thread

Similar Threads

  1. Single Status
    By faza in forum General Chat
    Replies: 36
    Last Post: 2nd February 2007, 09:37 AM
  2. UltraVNC Single Click
    By plexer in forum Windows
    Replies: 0
    Last Post: 10th January 2007, 04:09 PM
  3. Admin and Curriculum separate or merged?
    By rusty155 in forum Wireless Networks
    Replies: 26
    Last Post: 18th July 2006, 03:11 PM
  4. keeping office and curric separate
    By adamyoung in forum Wireless Networks
    Replies: 22
    Last Post: 22nd March 2006, 12:37 PM
  5. Separate Forum topicy thingy Required!
    By indiegirl in forum Comments and Suggestions
    Replies: 0
    Last Post: 15th March 2006, 09:51 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
  •