n00b Posted December 4, 2005 Posted December 4, 2005 How can I delete the Administrator folder on rebootI renamed Administrator account but it is using the old folder - I don't like this
Tomcat76 Posted December 4, 2005 Posted December 4, 2005 As far as I know, you can only change the name of the Administrator account and its folder through an unattended installation of Windows. You can change the name as many times as you like when in Windows, but the folder will always be named what was defined during installation.
Doc Symbiosis Posted December 4, 2005 Posted December 4, 2005 (edited) Just run the following batch as the administrator, then the administrator's folder is deleted after the next login. But it would be a piitty, if the next user, who logs in, is the administrator. If you want to make sure, that this isn't happening, you could write a little batch, which only deletes the folder, if the logged in user, isn't the administrator.@echo offSET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Installing Applications" /fREG ADD %KEY%\070 /VE /D "Delete Administrators folder" /fREG ADD %KEY%\070 /V 1 /D "rmdir /s /Q \"%USERPROFILE%\" " /fYou also could do the job, without having to run the script as the administrator and having the script run before login, but first thing would be a little more complicated ( would have to get the folder's path out of the registry) and the second thing I'M not quite sure, how to do, would be necessary a little reading.To change the name of administrator's directory, you've got to change the path inHKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\SID\ProfileImagePath, where for SID you have to enter the administrator's SID.Hope this helps a little. Edited December 4, 2005 by Doc Symbiosis
Tomcat76 Posted December 4, 2005 Posted December 4, 2005 (edited) To change the name of administrator's directory, you've got to change the path inHKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\SID\ProfileImagePath, where for SID you have to enter the administrator's SID.Well... It works. I'd like to know how to get the SID (domain) through a batch file too. The full string always starts with "S-1-5-21-" and always ends in "-500". Edited December 4, 2005 by Tomcat76
Doc Symbiosis Posted December 4, 2005 Posted December 4, 2005 There exists a tool called getsid in the Windows 2000 Ressource Kit Tools...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now