Jump to content

my last question lol


Recommended Posts

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 off

ECHO.

ECHO Over the next few minutes you will see automated installations

ECHO of various sofware applications, windows updates, and registry

ECHO hacks being implemented. The computer will restart automatically

ECHO once the whole process has finished!

ECHO.

Net user Sam Cahill /add

Net localgroup Administrators Sam Cahill /add

this 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..lol

thanks a lot!

-Sam

Link to comment
Share on other sites


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.sif

Eg:

AdminPassword=*

If it still doesnt work try add /y after the command

I know i can get runas to execute my main bat file on this newly created name

How?

Let me know if it works :rolleyes:

Link to comment
Share on other sites

Now this was the thread that I am :) REALLY :rolleyes: REALLY :D REALLY :D 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 off
ECHO.
ECHO Over the next few minutes you will see automated installations
ECHO of various sofware applications, windows updates, and registry
ECHO hacks being implemented. The computer will restart automatically
ECHO once the whole process has finished!
ECHO.
Net user Anthr@x /add
Net localgroup Administrators Anthr@x /add

That 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.

Link to comment
Share on other sites

Ok, I have my first batch file run:

user.cmd

CLS
@echo off
ECHO.
ECHO Over the next few minutes you will see automated installations
ECHO of various sofware applications, windows updates, and registry
ECHO hacks being implemented. The computer will restart automatically
ECHO once the whole process has finished!
ECHO.
Net user Anthr@x /add
Net localgroup Administrators Anthr@x /add
EXIT

Then my second batch file will kick in:

Reg.cmd

CLS
@echo off
ECHO.
ECHO Applying registry tweaks
ECHO Please wait...
runas /profile /env /anthr@x:mydomain\admin %systemdrive%\install\registry\regtweaks.reg

Does 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

Link to comment
Share on other sites

how would i add a user name with a space, like "Sam Cahill" without it setting cahill as the pw, or whatever

this is how i have it: the one batch file in winnt.sif is the batch file where it:

adds a user

makes them admin

then somehow, runs a seperate bat file that i point it to as that user. so my registry tweaks will work fine.

Link to comment
Share on other sites

Well, here is the CORRECT usage for the runas command:

runas /user:<domain>\<user name> h:\progs\delold.exe

here is what you would change it to in order for it to work:

runas /user:home\joe C:\regtweaks.reg

After 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. :):D:rolleyes:

Link to comment
Share on other sites

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! :rolleyes: :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 :D

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! :)

Link to comment
Share on other sites

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! :D:):rolleyes::D

Link to comment
Share on other sites

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!

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...