December 4, 200520 yr How can I delete the Administrator folder on rebootI renamed Administrator account but it is using the old folder - I don't like this
December 4, 200520 yr 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.
December 4, 200520 yr 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, 200520 yr by Doc Symbiosis
December 4, 200520 yr 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, 200520 yr by Tomcat76
Create an account or sign in to comment