Windows

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.

Thread display: Collapse - | Expand +

All Comments

Collapse -

Windows NT Batch File

by Zlatin Zlatev In reply to Windows NT Batch File

*wsh* create 2 shortcuts on desktop to a program in: \winnt
There are wsh sample scripts (.VBS and .JS) that came with Windows'98 and are appliable
to Windows NT
see Shortcut.vbs

*bat*
Create a user account: username
...
Add user to power users group

use coomands like the following:

NET USER username userpass /ADD /expires:never /passwordchg:no
NET LOCALGROUP "Power Users" username /add /domain

According to MS this should do what you need. HOWEVER it does not set the password expiration properly.
For more info see Windows NT Help - Net (command options)

*???* and make group log on as a service
I'm not sure I have understand this

*wsh* Add environment variable to the Path variable: %home%\scripts;%home%\bin;%dir%\scripts;%dir%\bin

see Registry.vbs
You will need api calls for reading the initial PATHstring and then append to it

If you are sure that the path will be the same for all machines you can use a reg file exported from key
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment]

*reg* Add new variables: home=d:\dir\home
*reg* New variable : dir = d:\dir\cust
Use RegFile like the following (text between asterics "***")
***
REGEDIT4

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment]
"home"="d:\dir\home"
"dir = d:\dir\cust"
***

Hope this helps,
Zlatin Zlatev, MCP

Collapse -

Windows NT Batch File

by Zlatin Zlatev In reply to Windows NT Batch File

due to some "features" of TechRepublic, there are some bugs (whitespaces and line-breaks) in my answer. If you wish notify me by email to send you the solution.
Best Regards,
Zlatin Zlatev,
Programmer Mentor & Software Engineer,
JEI-Bulgaria

Collapse -

Windows NT Batch File

by bdhansen In reply to Windows NT Batch File

Poster rated this answer

Collapse -

Windows NT Batch File

by wcraigmiles In reply to Windows NT Batch File

Kix32 will let you set registry keys and can run during a login. Kix32 is a batch file and scripting program. Very nice.

Also, look at the sysprep and sysdif utilities. You should be able to set different setting in a text file for the individual users.

Collapse -

Windows NT Batch File

by bdhansen In reply to Windows NT Batch File

Poster rated this answer

Collapse -

Windows NT Batch File

by bdhansen In reply to Windows NT Batch File

This question was closed by the author

Related Discussions

Related Forums