Autoexec.nt

  • Thread starter Thread starter Azrael Xaero
  • Start date Start date
A

Azrael Xaero

My question is simply how do you get Windows XP pro to
execute autoexec.nt.

I am try to automate creating users on my machine but when
I put the commands into autoexec.nt nothing happens upon
startup.

I am wondering if there is a certain command I am not using
that needs to maybe preceed or come after my commands. Or
any other solutions may help.

Anyone got an answer?
 
Azrael;
http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=autoexec.nt&btnG=Google+Search

==================
Parse/Don't Parse autoexec.bat.
Windows NT parses the AUTOEXEC.BAT file during startup by default, which
results in the appending of the path statement in the AUTOEXEC.BAT file to the
system path created by Windows NT. You can modify the system path and
evironment variable at Control Panel/System/EnvironmentTab. You can configure
parsing of the AUTOEXEC.BAT file at:

HKEY_CURRENT_USER\Software\Microsoft\Windows
NT\CurrentVersion\Winlogon\ParseAutoexec

1 = autoexec.bat is parsed
0 = autoexec.bat is not parsed

This has no effect on the parsing of AUTOEXEC.NT or CONFIG.NT by the MS-DOS or
16-bit Windows environments (VDMs).
===========
You can not use 32bit binary commands in AUTOEXEC.NT.
If you include a Win32 binary command in AUTOEXEC.NT, it will not run.
SUBST and the NET commands are examples of Win32 binaries.
AUTOEXEC.NT only runs 16bit binary commands.
If you must run a Win32 binary, use a batch file or logon script.
==============================
NT Syntax : Autoexec commands

To run a command as soon as the command prompt is opened -

HKLM\Software\Microsoft\Command Processor\AutoRun
HKCU\Software\Microsoft\Command Processor\AutoRun

To run a command as soon as a user logs in -

The STARTUP folder (Start Menu)
HKLM\Software\Microsoft\Windows\CurrentVersion\Run
HKCU\Software\Microsoft\Windows\CurrentVersion\Run
HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows\Run

To run a command as soon as the machine powers up, (like AUTOEXEC.BAT in
MS-DOS), things get a
little more complicated, NT does have an autoexec.bat file but it is only
provided for backwards
compatibility.

Any SET statement in autoexec.bat will be parsed at boot time, but the
variables set in this way are
not available to 32 bit gui programs - they will be visible from the CMD prompt
but won't appear in the
control panel. All other commands in autoexec.bat will be ignored.
This behaviour is to allow old DOS applications to install correctly. It's
worth noting that if autoexec.bat
CALLs a second batch file, the additional batch file will be completely ignored
by NT.

AutoExNT
To configure commands to run at boot up time use the resource kit utility
called AUTOEXNT (autoexec
for NT) - note that the first NT version of this was buggy - make sure you have
an up to date copy.
Unzip the file and extract the files autoexnt.exe, autoexnt.bat and
servmess.dll to

%systemroot%/system32

Also extract the file INSTSRV.EXE to any directory (a temp directory will do)
and then at the command
prompt enter:

instsrv install

This will create a new service called AutoExNT
Edit the file %systemroot%/system32/AUTOEXNT.BAT and put in the commands to be
run when the
machine boots. Don't confuse this with autoexec.NT and config.NT - these files
are used to configure
UMB/EMM for old 16 bit DOS applications and are very rarely if ever required.
* Note: INSTSRV can be used to install/remove device drivers as well.
Related commands:
SCLIST - Display NT Services
SET - Display, set, or remove Windows NT environment variables
Q243486 - Run a .bat file before login
==================
 
| My question is simply how do you get Windows XP pro to
| execute autoexec.nt.
|
| I am try to automate creating users on my machine but when
| I put the commands into autoexec.nt nothing happens upon
| startup.
|
| I am wondering if there is a certain command I am not using
| that needs to maybe preceed or come after my commands. Or
| any other solutions may help.
|
| Anyone got an answer?

Azrael,

I suggest you read this
Microsoft Knowledge Base Article:-
http://support.microsoft.com/?kbid=315245
(How to Assign a Logon Script to a Profile for a Local User - XP Pro, not on a domain)

1) LOGON/STARTUP SCRIPT
- create the file in Notepad
- Save it in a folder of your choice
- With a .BAT extension

2) Assign the script to a profile.
- [Start] | Run | gpedit.msc [OK]

To assign computer Startup/Shutdown Scripts...
- Navigate to...
+ Computer Configuration
+ Windows Settings
+ Scripts (Startup/Shutdown)

To assign user Logon/Logoff Scripts...
- Navigate to...
+ User Configuration
+ Windows Settings
+ Scripts (Logon/Logoff)

- In the details pane, double-click "Logon/Logoff/Startup/Shutdown".
- In the "Logon/Logoff/Startup/Shutdown Properties" dialog box, click [Add].
- In the "Add a Script" dialog box, click [Browse] to search for the script file, and then click [OK].
- Click [OK]
 
Back
Top