General discussion

Locked

Windows NT Batch File

By bdhansen ·
I am trying to create a batch file for windows NT that will set the following parameters for me after i install windows NT.

Set the time zone to : central time zone
Set the display properties to : 1280 X 1024
Set the color to : 65536 colors
create 2 shortcuts on desktop to a program in: \winnt
Create a user account: user
Password : user
Set : password never expires
Set : user cannot change password
clear: user must change password at logon
Add user to power users group and make group log on as a service
Add environment variable to the Path variable: %home%\scripts;%home%\bin;%dir%\scripts;%dir%\bin
Add new variables: home=d:\dir\home
New variable : dir = d:\dir\cust

Could you let me know if this can be all done by usinga batch file ?

This conversation is currently closed to new comments.

26 total posts (Page 1 of 3)   01 | 02 | 03   Next
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Windows NT Batch File

by MtnSqs In reply to Windows NT Batch File

I am not sure if all this can be done from a batch file, but it obvious that you are commonly building machines with the same setup. If hardware is similar across them all, then why not look at getting GHOST from Nortons - it will let you take an image of one machine after your get the set up right, save it on your network or a CD and with an appropriate boot floppy you can then rebuild any system using the GHOST. I have used it extensively and found it saved so much time in the long run. Ihad to have about 3 or 4 basic images as we had a few different hardware setups.

Collapse -

Windows NT Batch File

by bdhansen In reply to Windows NT Batch File

Poster rated this answer

Collapse -

Windows NT Batch File

by emcs In reply to Windows NT Batch File

Look at Reg. It is a Freeware Command Line / Batch Registry & Environment editor. Key word is free.

REG is a handy Registry and Environment Variable batch and command line tool that supports operations on the following Registry Hives:

HKEY_LOCAL_MACHINE
HKEY_USERS
HKEY_CURRENT_USER

REG will:
? Add and Delete a Registry Key.
? Add, Delete and Change a Registry Value. It supports Value Types of:

REG_SZ
REG_DWORD
REG_MULTI_SZ
REG_EXPAND_SZ

? Add and Delete a directory in either the SYSTEM or USER PATH.
? Setting an Environment Variable in either the SYSTEM or USER environment.
? Setting Environment and PATH variables from a file.
? Setting multiple options from a file.
? Setting a RegistryValue from the keyboard.

You can download Reg from: http://www.mindspring.com/~dgthomas/index.htm.

If I understand what you want to do, between running Reg, and using some common batch file parameters, you should be able to do everthing you want.

Good luck.

dennie

Collapse -

Windows NT Batch File

by bdhansen In reply to Windows NT Batch File

Poster rated this answer

Collapse -

Windows NT Batch File

by DS9 In reply to Windows NT Batch File

Hi,

Why not just set up a USER profile with those parameters, and copy it as needed.

George

Collapse -

Windows NT Batch File

by bdhansen In reply to Windows NT Batch File

Poster rated this answer

Collapse -

Windows NT Batch File

by Shanghai Sam In reply to Windows NT Batch File

The first two answers would help in your situation. You could aslo use WINBATCH from Wilson Windowware (www.winbatch.com). It costs USD 100.
As for specific answers to your question
I do not believe the time zone and display properties can be set through a batch file.
For the shortcuts you can create them in a floppy/CD/network share and then copy them (in a batch file) to C:\winnt\profiles\AllUsers\Desktop or to a specificuser\Desktop.
Creating a user account (Next 3 lines are 1)
net user username password /add /expires:NEVER /passwordchg:no
Another option for user creation is to use the ADDUSERS Resource Kit utility
Add user to power users group use the command
net group "Power Users" username /add.
If this is a local user on a member server or a standalone server you should use
net localgroup "Power Users" username /add.
To make group log on as a service you will need to use WinBATCH or some other process.
Haven't exactly figured out a way of automating permanent changes to environment variables. Again Winbatch will definitely help with this.

Collapse -

Windows NT Batch File

by bdhansen In reply to Windows NT Batch File

Poster rated this answer

Collapse -

Windows NT Batch File

by cdcents In reply to Windows NT Batch File

The first two answers would help in your situation. You could aslo use WINBATCH from Wilson Windowware (www.winbatch.com). It costs USD 100.
As for specific answers to your question
I do not believe the time zone and display properties can be set through a batch file.
For the shortcuts you can create them in a floppy/CD/network share and then copy them (in a batch file) to C:\winnt\profiles\AllUsers\Desktop or to a specificuser\Desktop.
Creating a user account (Next 3 lines are 1)
net user username password /add /expires:NEVER /passwordchg:no
Another option for user creation is to use the ADDUSERS Resource Kit utility
Add user to power users group use the command
net group "Power Users" username /add.
If this is a local user on a member server or a standalone server you should use
net localgroup "Power Users" username /add.
To make group log on as a service you will need to use WinBATCH or some other process.
Haven't exactly figured out a way of automating permanent changes to environment variables. Again Winbatch will definitely help with this.

Collapse -

Windows NT Batch File

by cdcents In reply to Windows NT Batch File

Do not rate answer 4 as my session timed out while I came up with the answer.

Back to Windows Forum
26 total posts (Page 1 of 3)   01 | 02 | 03   Next

Related Discussions

Related Forums