Jump to content

[Help] XP Logon Script


lisss001
 Share

Recommended Posts

So, this is my problem:

My computer has been set up with two 20 gig drves, the c drive is used for the programs and the d drive is use for documents and 'My Documents' folders. The D drive also contains some startup scripts and the 'All Users' folder which acts like 'Shared Documents'. As you can see I am running a neat little standalone system. The problem is that every time I reinstall XP I have to log on as each user to manually change the location of the 'My Documents' folder from the C drive to the D drive. The script below runs when any user logs onto the computer apart from Admins and I would like to know if there is any command I could add which would change the location ofthe 'My Documents' folder. This would really save time and help me lots.

Current Batch Script:

del "c:\documents and settings\%username%\Start Menu" /s /q

cls

xcopy /c "d:\deploy\Start Menu" "c:\documents and settings\%username%\Start Menu" /s /y

cls

del "c:\documents and settings\%username%\Desktop" /s /q

cls

xcopy /c "d:\deploy\Desktop" "c:\documents and settings\%username%\Desktop" /s /y

cls

xcopy /c "d:\File System\%username%\My Documents" "D:\File System\Backups\Auto-Backup\%Username%\My Documents"

cls

"D:\Deploy\Startup\Delete Games.brs"

cls

"D:\Deploy\Startup\User Policy.vbs"

cls

Link to comment
Share on other sites


What about changing the location for My Documents for the defualt user's profile? You can do this by editing the following regvalue:

HKU\.Default\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Personal.

So you can make sure, that every new user has automatically his My documents folder on D:

Link to comment
Share on other sites

Another thing you could try doing is add that script to the local group policy. That way if you have it run on logon then it will try to run that script. You can get to the local group policy by typing gpedit.msc in the run box then just add the script to the the logon/logoff area under the user config then windows settings area. I'm not sure but it would probably try to run it everytime but I don't think that should cause much problem.

Link to comment
Share on other sites

What about changing the location for My Documents for the defualt user's profile? You can do this by editing the following regvalue:

HKU\.Default\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Personal.

So you can make sure, that every new user has automatically his My documents folder on D:

.Default is for the logon screen settings...not the Default User Profile. :)

To change this for the default user profile you have to load the Default User's NTUSER.DAT in regedit, make the changes and then unload it. Reboot the PC and now it will be applied to all users who logon to the PC.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.


×
×
  • Create New...