Hello Andrew,
The autoexec.bat is not run, however it will be parsed during startup so
that environment variables will be picked up.
Commands in there are not run so the subst would be processed.
However entries like path statements should be parsed as would items like
set statements where you would be setting variables.
These entries should be appended to list of environment variables set by
the system.
Thanks,
Darrell Gorter[MSFT]
This posting is provided "AS IS" with no warranties, and confers no rights
--------------------
|> From: "Andrew McLaren" <>
|> References: <F3B5FBBF-920E-42E4-AF25->
|> In-Reply-To: <F3B5FBBF-920E-42E4-AF25->
|> Subject: Re: Autoexec.bat not working at restart
|> Date: Thu, 12 Jul 2007 17:10:08 +1000
|> Lines: 43
|> Organization: Not much ...
|> Message-ID: <85BC117E-EB4D-4A40-8760->
|> X-Priority: 3
|> X-MSMail-Priority: Normal
|> X-Newsreader: Microsoft Windows Mail 6.0.6000.16480
|> X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6000.16480
|> X-RFC2646: Format=Flowed; Original
|> X-MS-CommunityGroup-PostID: {85BC117E-EB4D-4A40-8760-CAA1BB6A4B66}
|> X-MS-CommunityGroup-ThreadID: F3B5FBBF-920E-42E4-AF25-5D88C62A9071
|> X-MS-CommunityGroup-ParentID: F3B5FBBF-920E-42E4-AF25-5D88C62A9071
|> Newsgroups: microsoft.public.windows.vista.general
|> Path: TK2MSFTNGHUB02.phx.gbl
|> Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.windows.vista.general:133584
|> NNTP-Posting-Host: TK2MSFTNGHUB02.phx.gbl 127.0.0.1
|> X-Tomcat-NG: microsoft.public.windows.vista.general
|>
|> "DJ" <> wrote ...
|> > In Vista, I have a SUBST command in the C:\autoexec.bat file to assign
a
|> > local drive letter. It works OK from the DOS window. But the drive
letter
|> > assignment is not created after a restart. (I am logged in as the
|> > administrator.)
|>
|>
|> Hi DJ
|>
|> Vista is like Windows NT, 2000, XP and Server 2003 - it does not process
the
|> C:\Autoexec.bat file on start-up. If such a file exits, Vista ignores
it.
|> The autoexec.nt file in the System32 subdirectory is used to configure
the
|> environment for MS-DOS applications, running in an NTVDM - but it
doesn't
|> have any effect at all, for Win32 applications.
|>
|> To run a command or set of commands every time you log in, you have a
few
|> choices:
|>
|> - configure a logon script; see
|>
http://www.microsoft.com/resources/d...l/proddocs/en-
us/lsm_profile_logonscript.mspx?mfr=true.
|> The script can be kept on the local C: drive, doesn't have to be on a
|> server. This is probably your most secure and reliable option. The
"script"
|> can be a plain BAT file, or something more elaborate in VBScript or
|> PowerShell.
|>
|> - add a command or batch file to these Registry keys:
|> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Run
|> HKEY_CURRENT_USER\Software \Microsoft\Windows\CurrentVersion\Run
|> The first Key is per machine, ie, system-wide; the second is per user.
|> Since SUBST mappings are specific to each user's profile, you'd probably
|> want to do this in the User's profile. (If you map a drive with SUBST
then
|> log on as a different user, you won't see the SUBST mapping any more).
See
|>
http://support.microsoft.com/kb/314866 for more details.
|>
|> Autoexec.bat is a relic of DOS days. It isn't an idiom that really
applies
|> to "grown-up" versions of Windows (NT, 2K, XP, Vista).
|>
|> Hope it helps,
|> --
|> Andrew McLaren
|> amclar (at) optusnet dot com dot au
|>
|>
|>