Yzöwl Posted May 17, 2005 Share Posted May 17, 2005 @ MyDomainSince you are using a cmd file first, try adding the command to that instead:: Renaming Admin account%~dp0renuser.exe Administrator "First Second" Link to comment Share on other sites More sharing options...
rikgale Posted May 17, 2005 Share Posted May 17, 2005 You could also try placing the renuser before your cleanup.cmd, in cmdlines.txt. Althought Yzöwl's idea should do the same thing. Link to comment Share on other sites More sharing options...
MyDomain Posted May 17, 2005 Share Posted May 17, 2005 Oke thanks i'll just try that... can i copy Yzöwl's code and past it infront of the cleanup.cmd?And @rikgaleYou can prefent that in a much easyer way...set UserStart=%UserProfile%\Menu StartDEL /Q /F "%UserStart%\Windows Update.lnk"Thanks for the quick reply![edit]This only is usefull if you have the script running on that account ofcourse [edit2] @Yzöwl'sI think i understand what you mean, add the command to the cleanup.cmd file like you posted it. So that the it will be done at the moment the cmdlines.txt calls on the cleanup.cmd... right? Link to comment Share on other sites More sharing options...
rikgale Posted May 17, 2005 Share Posted May 17, 2005 Thanx Link to comment Share on other sites More sharing options...
Yzöwl Posted May 17, 2005 Share Posted May 17, 2005 Yes, you can just paste it in, as long as you are really renameing it to 'First Second', just to add also that the %~dp0 should not be necessary. Link to comment Share on other sites More sharing options...
rikgale Posted May 17, 2005 Share Posted May 17, 2005 Just out of interest what does the %~dp0 do? Link to comment Share on other sites More sharing options...
MyDomain Posted May 17, 2005 Share Posted May 17, 2005 oke i now have this...renuser.exe Administrator "First Second"inside my cleanup.cmdlike this:cmdow @ /HIDecho offFOR %%i IN (D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%i:\UXPCD_IDENT.txt SET CDROM=%%i:// Renaming Administrator Accountrenuser.exe Administrator "First Second" <-------First is your first name, Second you last... ofcrouseEXITWere "First Second" ofcourse is my first and last name. Link to comment Share on other sites More sharing options...
MyDomain Posted May 17, 2005 Share Posted May 17, 2005 I do know btw what ofcourse causes the problem with not being able to log in automaticly...Because the name and profile did change, but, the log-in that is filled in is still Administrator.So we have to change the name that he automaticly fills in...Is there a way to tell windows which username to use when logging in.tnx for the help so far [edit]Maybe found a way?[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]"DefaultUserName"="Username"Have not tryed it yet! Link to comment Share on other sites More sharing options...
rikgale Posted May 17, 2005 Share Posted May 17, 2005 Mite I suggest calling that in a .reg file at the T-12 mark. Stick in cmdlines.txt and pray. I'll try it next time I do a build. I now have alot to remember! Link to comment Share on other sites More sharing options...
MyDomain Posted May 18, 2005 Share Posted May 18, 2005 Well my regtweak worked...So to get the Documents and Settings folder plus you login name to change, but still be able to use autologin, you have to use this regtweak, along with the rename settings of Yzöwl...Thanks! Link to comment Share on other sites More sharing options...
Martin Zugec Posted May 18, 2005 Share Posted May 18, 2005 rikgale: It is extremely usefull - it is variable containing path to running script, the main difference between %cd% is, that it is also working if you run script from UNC path... Link to comment Share on other sites More sharing options...
Yzöwl Posted May 18, 2005 Share Posted May 18, 2005 Just out of interest what does the %~dp0 do?%0 is a variable automatically assigned to the running batch file, Cleanup.cmd. The additional parameters come from what is known as 'variable expansion and modification', where the tilde (~) expands the variable and the individual letters perform additional tasks. In this case d tells the variable to include the drive letter of the running batch, and p tells the variable to include the path of the running batch.Therefore if your running batch, Cleanup.cmd is located in F:\UWXPCD\$OEM$\Cleanup.cmd, and renuser.exe was also in that same location, %~dp0renuser.exe would mean F:\UWXPCD\$OEM$\renuser.exe. Link to comment Share on other sites More sharing options...
singk Posted July 1, 2005 Share Posted July 1, 2005 (edited) Is it possible that I change the "administrator" name/account (who has automatically created in a unattend file) renamed in "admin"?I must change this after every unattended installation (for exclusive applications) but I would like that automatically if it is possible.<{POST_SNAPBACK}>What you can do is use the BUILTIN.EXE from OptimumX.com. It works great. I have been using it a while.Put the builtin.exe in the $OEM$ directory.install.cmd@echo offECHO Modifying Boot TimeoutSTART "" /WAIT "%SystemRoot%\system32\bootcfg.exe" /timeout 4ECHO Changing the Local Admin accountSTART "" /WAIT "builtin.exe" /newname:WhatEverNamecmdlines.txt[COMMANDS]".\INSTALLS.CMD"This will be run at T-12Sing Edited July 1, 2005 by singk Link to comment Share on other sites More sharing options...
bmalt Posted July 18, 2005 Share Posted July 18, 2005 The link referenced above to netuser.exe is broken now. The correct version of the netuser.exe file utility can be found at http://www.jsifaq.com/ - search for tip # 570, then click on the "netuser" link to download the file.renuser is a little harder to find, but it should not be necessary if you have the correct netuser.exe. Netuser can rename the local administrator account to "admin" via the following line:netuser.exe administrator /name:adminmany thanks to those who posted here and to whomever wrote netuser.exe. Link to comment Share on other sites More sharing options...
Jotnar Posted July 19, 2005 Share Posted July 19, 2005 (edited) You can find both utilities in the following post on the MSFN forums http://www.msfn.org/board/index.php?showtopic=22645Cheers**I've fixed the links in my posts for netuser.exe. I'll fix the renuser.exe one as soon as I can up it to my site. Edited July 19, 2005 by Jotnar Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now