+ Post New Thread
Page 2 of 4 FirstFirst 1234 LastLast
Results 16 to 30 of 56
Windows Thread, Login script problem in Technical; What if you call the BAT file from the VBS file? - Messy but may work around the problem in ...
  1. #16

    Ric_'s Avatar
    Join Date
    Jun 2005
    Location
    London
    Posts
    7,590
    Thank Post
    109
    Thanked 762 Times in 593 Posts
    Rep Power
    180

    Re: Login script problem

    What if you call the BAT file from the VBS file? - Messy but may work around the problem in the meantime.

  2. #17

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,678
    Thank Post
    3,209
    Thanked 1,030 Times in 955 Posts
    Rep Power
    361

    Re: Login script problem

    just a thought but what happens if he has bat files restricted from running in his GPO ( cant remember what section or the name of it ) but basically where you can list what file types are allowed to run and what user(s) can execute etc.

    hopefully Im not sounding too crazy lol, he might have the bat file in that list which is stopping it from executing ?

  3. #18

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,678
    Thank Post
    3,209
    Thanked 1,030 Times in 955 Posts
    Rep Power
    361

    Re: Login script problem

    I forgot to mention, if thats the case then obviously shelling it from a vbscript or any other method will obviously fail because the bat file will not be allowed to execute

  4. #19
    ajbritton's Avatar
    Join Date
    Jul 2005
    Location
    Wandsworth
    Posts
    1,632
    Thank Post
    23
    Thanked 75 Times in 45 Posts
    Rep Power
    34

    Re: Login script problem

    @SpuffMonkey: Any reason why you are using .BAT? Try renaming it as a .CMD

    I've never tried running .BAT files from GPO assigned logon scripts, but .CMD should be no problem. .BAT files are executed by COMMAND.COM whereas .CMD are executed by CMD.EXE. If the change works, then it may be something to do with this difference.

  5. #20

    SpuffMonkey's Avatar
    Join Date
    Jul 2005
    Posts
    2,224
    Thank Post
    54
    Thanked 276 Times in 184 Posts
    Rep Power
    133

    Re: Login script problem

    OK - we seem to have hit on a solution - one of my techies tried setting the scripts to run synchronously - and *shazam* it all started working again - no idea why because the teachers GPO is still "Not Configured" in that respect and runs just fine - as this one did for 15 months - until last week???

    Anyway - its a kick to get on and rejig a more elegant sctript in vbs.

    Thanks for all your suggestions - much appreciated.

  6. #21

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,678
    Thank Post
    3,209
    Thanked 1,030 Times in 955 Posts
    Rep Power
    361

    Re: Login script problem

    what do you mean by this

    "Anyway - its a kick to get on and rejig a more elegant sctript in vbs."

    ??

  7. #22

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,678
    Thank Post
    3,209
    Thanked 1,030 Times in 955 Posts
    Rep Power
    361

    Re: Login script problem

    Also where do you go to set it so that the scripts run synchronosly ?

  8. #23

    SpuffMonkey's Avatar
    Join Date
    Jul 2005
    Posts
    2,224
    Thank Post
    54
    Thanked 276 Times in 184 Posts
    Rep Power
    133

    Re: Login script problem

    Quote Originally Posted by gecko
    what do you mean by this

    "Anyway - its a kick to get on and rejig a more elegant sctript in vbs."

    ??
    I mean its time for me to write a vbs script to handle printer assignation at logon, rather than keep on using .bat files.

    In answer to your other question - from memory GPO - User Config/Administrative Templates/System/Scripts

  9. #24
    ajbritton's Avatar
    Join Date
    Jul 2005
    Location
    Wandsworth
    Posts
    1,632
    Thank Post
    23
    Thanked 75 Times in 45 Posts
    Rep Power
    34

    Re: Login script problem

    Quote Originally Posted by SpuffMonkey
    Anyway - its a kick to get on and rejig a more elegant sctript in vbs.
    Be careful! When I got the urge to convert my logon script to .VBS (or .WSF in my case), I ended up with a several hundred line behemoth which in some ways is less manageable than the old .BAT file !!

  10. #25

    Join Date
    Jul 2005
    Location
    Corby
    Posts
    1,056
    Thank Post
    12
    Thanked 20 Times in 18 Posts
    Rep Power
    24

    Re: Login script problem

    Yeah- I think we knock the old .BAT files too quickly. There's nothing quite like knocking up a BAT file to map some drives. Oh- and to assign printers- to name two. Those old DOS commands seem really familiar. Whereas with vbs I get put off learning it because of all the bad press bad VB programming gets. Everyone and their dog can do it (they say). Yuck.

    Paul

  11. #26
    ajbritton's Avatar
    Join Date
    Jul 2005
    Location
    Wandsworth
    Posts
    1,632
    Thank Post
    23
    Thanked 75 Times in 45 Posts
    Rep Power
    34

    Re: Login script problem

    Personally I'm looking forward to rewriting all my scripts in the new MS shell (MONAD) which is slated to replace WSH. There's a beta out now.

  12. #27

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,678
    Thank Post
    3,209
    Thanked 1,030 Times in 955 Posts
    Rep Power
    361

    Re: Login script problem

    What about javascript ? lol

  13. #28

    Join Date
    Jul 2005
    Location
    Corby
    Posts
    1,056
    Thank Post
    12
    Thanked 20 Times in 18 Posts
    Rep Power
    24

    Re: Login script problem

    MONAD does look good. I have been using the beta for some time and it's quite easy to pick up and seems a lot more functional than anything else MS have offered in the past.

  14. #29

    SpuffMonkey's Avatar
    Join Date
    Jul 2005
    Posts
    2,224
    Thank Post
    54
    Thanked 276 Times in 184 Posts
    Rep Power
    133

    Re: Login script problem

    I'd like to rewrite the logon script sop that printer allocation is based on the OU the computers sit in - I guess thats possible - can anyone point to a site that has a few examples of similar - my Google came back with a zillion hits.

    Cheers

  15. #30

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,802
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: Login script problem

    Personally I'm looking forward to rewriting all my scripts in the new MS shell (MONAD) which is slated to replace WSH. There's a beta out now.
    I'm considering using Python for my scripting needs.

SHARE:
+ Post New Thread
Page 2 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Installing/Copying Fonts from Login Script
    By mattpant in forum Windows
    Replies: 10
    Last Post: 11th August 2011, 09:24 PM
  2. Set firefox proxy via login script
    By Jackd in forum Windows
    Replies: 2
    Last Post: 24th December 2009, 01:59 PM
  3. Printers disappearing after login script
    By gshaw in forum Windows
    Replies: 11
    Last Post: 10th June 2009, 06:47 PM
  4. Problem with Home Drive and login scripts
    By ArchersIT in forum Windows
    Replies: 4
    Last Post: 11th July 2007, 12:17 PM
  5. Replies: 4
    Last Post: 23rd November 2006, 09:33 PM

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
  •