[gptalk] Re: Bat File Not Executing.

  • From: "Harry Singh" <hboogz@xxxxxxxxx>
  • To: gptalk@xxxxxxxxxxxxx
  • Date: Tue, 5 Aug 2008 17:12:52 -0400


Yes, the script is deleting the documents and setting folder. I agree this
isn't very clean, but  I am having trouble in negotiating the delprof
command line to delete the profile i want under my specific parameters.
Specifically, i want the profile to be deleted upon every reboot, either
during the shutdown or, preferably, during the startup of the machine. ?

Secondly, i believe my problem was i  was applying the GPO to an OU that
just had the computer accounts. I realized this can't be done, i'd have to
apply it to the OU containing the LAB user account ; since only the Computer
Config is enabled, the script will execute on whatever machine that user
logs into, correct ? That being said, what should the loopback processing
setting be on this GPO, if there are no user configured settings on this GPO
but others ?

Just to clear up any confusion, if i want machine specific settings only to
apply to computer accounts, i need to:

   - Configure the Computer Configuration portion of the GPO.
   - Create a Security Group and add the respective computer accounts to
   this group and add it to the permissions of the GPO with the "Apply" GPO
   permission ?
   - Never apply GPO's to OU's that just have computer accounts
   - Enable loopback processing on a computer oriented GPO if you have any
   USER Confiuration settings in that GPO, otherwise just leave it disabled or
   not configured ?

On Tue, Aug 5, 2008 at 4:57 PM, Nelson, Jamie <Jamie.Nelson@xxxxxxx> wrote:

>  When you say "delete the profile" are you just trying to delete the
> profile folder under C:\Documents and Settings? That doesn't truly dump the
> profile, as there are still some registry keys that have to be cleaned up.
> On that note, I don't think deleting the profiles on startup is a good
> practice, even if they are for what I assume are temporary lab user
> accounts. You're better off creating a scheduled task on the machine to run
> the delprof.exe utility (from the Server Resource Kit) which can delete all
> profiles that have not been used in a specified number of days. Just my
> opinion though. You may have valid reason for doing it that way so please
> don't take offense. J
> As far as the script not executing is concerned, did you place it in the
> GPO's "machine\scripts\startup" folder in SYSVOL or somewhere else on your
> network?
> *From:* gptalk-bounce@xxxxxxxxxxxxx [mailto:gptalk-bounce@xxxxxxxxxxxxx] *On
> Behalf Of *Harry Singh
> *Sent:* Tuesday, August 05, 2008 3:21 PM
> *To:* gptalk@xxxxxxxxxxxxx
> *Subject:* [gptalk] Bat File Not Executing.
> All -
> I've added a bat file to the startup script inside of a GPO, the computer
> configuration part of the GPO. The script deletes any profile starting with
> lab* and is suppose to run when the computer is restarted so as to not run
> into any file locks by explorer. However, the folders are not being deleted
> and when i run a gpresult, the script indicates: " This script has not been
> executed"
> any ideas ?
>   *
> ------------------------------
> *
> *Confidentiality Warning:* This message and any attachments are intended
> only for the use of the intended recipient(s), are confidential, and may be
> privileged. If you are not the intended recipient, you are hereby notified
> that any review, retransmission, conversion to hard copy, copying,
> circulation or other use of all or any portion of this message and any
> attachments is strictly prohibited. If you are not the intended recipient,
> please notify the sender immediately by return e-mail, and delete this
> message and any attachments from your system.

Other related posts: