Windows scripting

nelnel Member Posts: 2,859 ■□□□□□□□□□
howdy...a quick q about scripting.

Right, ive created a vb script to install software from a network share. i want to specifically use this when a user logsoff/shutdowns. so i created a batch file to call the script upon logoff. ive tested this and it works fine if you modify it in the local gp settings but as soon as i apply it to an OU its a no go. i cant find anything in the logs etc.

can any1 help / have ideas?

cheers.
Xbox Live: Bring It On

Bsc (hons) Network Computing - 1st Class
WIP: Msc advanced networking

Comments

  • royalroyal Member Posts: 3,352 ■■■■□□□□□□
    Try doing a gpresult on one of the machine's that is in that OU. Is it seeing the new GPO? Is there another GPO higher in the list for that OU that might be overriding it? I would say try doing a gpupdate /force but group policies automatically update by themselves every 16 hours, and 16 hours have passed since you posted, so that probably wouldn't help. Try checking the 1st 2 things and let us know what happens.
    “For success, attitude is equally as important as ability.” - Harry F. Banks
  • sprkymrksprkymrk Member Posts: 4,884 ■■■□□□□□□□
    Did it actually install the program from a network share when you tested it, or did you have the program available locally? I would think the logoff/shutdown process would kill the network connectivity before it could install the program from the network share.
    All things are possible, only believe.
  • nelnel Member Posts: 2,859 ■□□□□□□□□□
    sorry i should of mentioned i ran a gpresult and it is list in the applied gpo's. yes when i tested it the software was installed via the same network share, the only diff was it was successful if you applied the script at local level but not sucessful if applied at an OU level. when applying it as a gpo on an ou ive tried it as a logoff and a shutdown script. when you apply it as a logoff it does not even show that it has read the script, but when you apply it at shutdown you can see it reading the script but it goes off pretty fast as if the service had been ended or there was an error with the script! but i dont think the script could be an issue if it works at a local level and i assume windows is capable of running a script before shutting itself down otherwise what is the point of the option?

    cheers.
    Xbox Live: Bring It On

    Bsc (hons) Network Computing - 1st Class
    WIP: Msc advanced networking
  • sprkymrksprkymrk Member Posts: 4,884 ■■■□□□□□□□
    When you apply it as a logoff script, it only affects user objects, so if (just checking) you applied the logoff script to an OU containing only computer objects, it won't work.

    Another possibility, when specifying the location of the logoff script, try to manually enter in the path to the script rather than browse to it. Seems like there was a bug where you had to do it that way.
    All things are possible, only believe.
  • nelnel Member Posts: 2,859 ■□□□□□□□□□
    hey sprkymrk,

    yeah i def didnt apply it to the computer object when applying it to the user profile lol. i tried the script on both the computer and user sides to see if either worked.

    i checked what you said about not browsing to the path and it did not work either so i reverted back to the script that i put in the sysvol folder and its worked ok :s. dont know how or why but its working now and its nothing i havent tried before - weird i guess :s !

    but thanks for the help lads!
    Xbox Live: Bring It On

    Bsc (hons) Network Computing - 1st Class
    WIP: Msc advanced networking
Sign In or Register to comment.