SamC42387 Posted August 5, 2003 Posted August 5, 2003 alright this my last question. i want a fully unattended install, so i thought of a way to stop the mini setup, but still be able to retain a user name that i prefer instead of administrator.once setup is done up i have this bat file:CLS@echo offECHO.ECHO Over the next few minutes you will see automated installations ECHO of various sofware applications, windows updates, and registryECHO hacks being implemented. The computer will restart automaticallyECHO once the whole process has finished!ECHO.Net user Sam Cahill /addNet localgroup Administrators Sam Cahill /addthis adds my user name the way i want. now the problem is with RUNAS.I know i can get runas to execute my main bat file on this newly created name, which means no corrupt registry entries since they will be put onto my name. how can i get runas to execute setup.bat (my main main bat file) on the newly created user name Sam Cahill. normally it prompts for a pw, but what if i dont want a pw?help me out guys..lolthanks a lot!-Sam
cyberdiamond Posted August 6, 2003 Posted August 6, 2003 then remove the pword after setup is complete.. I think he means the admin password is needed for run as.My quick suggestion (as I would also like to get this working when I have time)Dont use a password for administrator in the winnt.sifEg:AdminPassword=*If it still doesnt work try add /y after the commandI know i can get runas to execute my main bat file on this newly created nameHow?Let me know if it works
SamC42387 Posted August 6, 2003 Author Posted August 6, 2003 for some reason it isnt letting my add a space in my user name, which is messing everything else up..any ideas?
C0rpse Phxer420 Posted August 6, 2003 Posted August 6, 2003 Now this was the thread that I am REALLY REALLY REALLY interested in!When doing this, I am guessing that you have created another batch file, one just for setting up the user account, Sam Cahill??? Ok, let's say I make a new batch file called user.cmd and place it first in my winnt.sif file, under runonce section. It should run the batch file with the following information from it:CLS@echo offECHO.ECHO Over the next few minutes you will see automated installations ECHO of various sofware applications, windows updates, and registryECHO hacks being implemented. The computer will restart automaticallyECHO once the whole process has finished!ECHO.Net user Anthr@x /addNet localgroup Administrators Anthr@x /addThat will create a user called "Anthr@x" in the Administrators group, correct?Now, you said something about the "runas" command. I know that if you right click an .exe file it will give you the "run as ..." option. Because we are gonna do all of this through a batch file, how would I do the runas stuff? As I am writing this I am mentally slapping myself on the forehead, duh...check out run>cmd>runas /?Well, lemme know what you guys have come up with for this command.
C0rpse Phxer420 Posted August 6, 2003 Posted August 6, 2003 Ok, I have my first batch file run:user.cmdCLS@echo offECHO.ECHO Over the next few minutes you will see automated installations ECHO of various sofware applications, windows updates, and registryECHO hacks being implemented. The computer will restart automaticallyECHO once the whole process has finished!ECHO.Net user Anthr@x /addNet localgroup Administrators Anthr@x /addEXITThen my second batch file will kick in:Reg.cmdCLS@echo offECHO.ECHO Applying registry tweaksECHO Please wait...runas /profile /env /anthr@x:mydomain\admin %systemdrive%\install\registry\regtweaks.regDoes that sound correct? What would "mydomain" be? Also, should admin be left as admin or do I have to replace that like I do with mydomain? I hope this helps
Aaron Posted August 6, 2003 Posted August 6, 2003 I think mydomain would be the workgroup name if you're not on a domain
SamC42387 Posted August 7, 2003 Author Posted August 7, 2003 how would i add a user name with a space, like "Sam Cahill" without it setting cahill as the pw, or whateverthis is how i have it: the one batch file in winnt.sif is the batch file where it: adds a usermakes them adminthen somehow, runs a seperate bat file that i point it to as that user. so my registry tweaks will work fine.
C0rpse Phxer420 Posted August 7, 2003 Posted August 7, 2003 Well, here is the CORRECT usage for the runas command:runas /user:<domain>\<user name> h:\progs\delold.exehere is what you would change it to in order for it to work:runas /user:home\joe C:\regtweaks.regAfter running this line under cmd, it popped up asking me for joe's password...I don't have a password and of course you cannot have a blank password, so make sure you setup a password for your newly created account.
C0rpse Phxer420 Posted August 7, 2003 Posted August 7, 2003 with further playing around....it will not run my .reg file...error 193 not a valid win32 file...god damnit. Well...will look into other options....**** IT ALL TO HELL! :wishes-there-was-a-thumbsdown-smiley:I normally wouldn't post all this useless crap for you guys, but I figured it would help out and it's my shameless way of getting my post count up Anyways, I now played with some more and here is the code to make sure it works:Runas /profile /user:home\joe "regedit /s C:\regtweaks.reg"This will do a silent merge of your registry file into the "joe" account. I hope that this helps as it made my night...so about 10 more minutes and then nighty night. So, I am guessing that you can run the user.cmd file that will create a joe account with a password and place him in the administrators account, then your next .cmd line would apply your registry file to that account, no corrupt registry as mentioned earlier, and yea....you guys know what happens...so yea, I'm going to sleep now. Have a great night everyone, hope it helps!
C0rpse Phxer420 Posted August 7, 2003 Posted August 7, 2003 Ok, because this is SUPPOSED to be unattended, this would definitely be nice if it worked, and I am extremely tired of looking over the net.I got the net user, net localgroup, runas commands down like the back of my hand, and I know that everything works, I've tried it on the local machine pointing to my files. Anyways, when you go to runas...it asks for that user's password. I haven't found any sources that show you how to autologin using the cmd prompt. I have tried all different types of things and to no avail. Does anyone know how to do a runas command and have it put the password in automatically for you? This would make things better, as I am a sysop for a local computer shop, and this would help out alot for doing our machines. Having 10 machines install XP, apply reg tweaks, and install misc applications....man oh man, could get 10 machines built up and running in about an 2 hours, while working on other machines, WOOHOO!
Aaron Posted August 7, 2003 Posted August 7, 2003 Would the registry tweak that adds autologon info for a username and password help?
C0rpse Phxer420 Posted August 8, 2003 Posted August 8, 2003 I'll definitely look into that. I just acquired vmware workstation 4, so I can actually test out my CD. I don't wanna burn it, just to find out something doesn't work. Besides, once I get it down, I am gonna be networking with a friend to burn a bootable dvd. I got together with 3 other co-workers and we are actually working on a number of different ideas, so hopefully within the next day or two I will have a step by step process on creating an account, logging onto that account, and installing everything. Well, best of luck and lemme know of any updates!
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now