not group policy, but login scripts

Archived from groups: microsoft.public.win2000.group_policy (More info?)

I'm trying to create a login script that will delete the default user folder
under documents and settings because we had a problem with that profile
saving some office settings. Now, whenever we create a new user, the user
profile is created from the default user profile and the incorrect path to
the office .msi is specified.

(Our server that originally held the office .msi died so we had to move it
to a different server. The only way for fixing current users that we have
found is by using the microsoft cleanup utility.)

I have deleted the default user profile folder on a computer and it did not
affect the system, and in fact corrected the problem for when a new user logs
on for the first time and it builds their profile.


The current .bat file that I have is as follows:


rem testing to see if a file exists
if exist C:\"Documents and Settings"\"Default User" goto filefound
echo file does not exist
goto end
:filefound
del C:\"Documents and Settings"\"Default User"
:end
pause

///////////////////////////////////////////

I get no errors and it even asks if I want to delete the file; it acts as if
it has been deleted but nothing has changed.


Any suggestions?
1 answer Last reply
More about group policy login scripts
  1. Archived from groups: microsoft.public.win2000.group_policy (More info?)

    Hi

    Try the following line for the deletion:

    rmdir /S /Q "C:\documents and settings\default user"

    The /S specifies that all subfiles/folder within default
    user are also deleted. /Q deletes them all without
    prompting to ask for confirmation. Putting the speach
    marks around the entire path may also help.

    Also, while testing it, try putting ECHO ON at the start
    of the script, so that you can clearly see at what stage
    the script failed (i.e. did the 'IF EXIST' section fail?
    or did it correctly go to the del/rmdir line, but fail at
    that stage?).

    Give it a go, I hope this helps.
    Thanks

    Dan


    >-----Original Message-----
    >I'm trying to create a login script that will delete the
    default user folder
    >under documents and settings because we had a problem
    with that profile
    >saving some office settings. Now, whenever we create a
    new user, the user
    >profile is created from the default user profile and the
    incorrect path to
    >the office .msi is specified.
    >
    >(Our server that originally held the office .msi died so
    we had to move it
    >to a different server. The only way for fixing current
    users that we have
    >found is by using the microsoft cleanup utility.)
    >
    >I have deleted the default user profile folder on a
    computer and it did not
    >affect the system, and in fact corrected the problem for
    when a new user logs
    >on for the first time and it builds their profile.
    >
    >
    >The current .bat file that I have is as follows:
    >
    >
    >rem testing to see if a file exists
    >if exist C:\"Documents and Settings"\"Default User"
    goto filefound
    >echo file does not exist
    >goto end
    >:filefound
    >del C:\"Documents and Settings"\"Default User"
    >:end
    >pause
    >
    >///////////////////////////////////////////
    >
    >I get no errors and it even asks if I want to delete the
    file; it acts as if
    >it has been deleted but nothing has changed.
    >
    >
    >Any suggestions?
    >
    >.
    >
Ask a new question

Read More

Default Policy Windows