Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Autoexec.nt under Windows XP Pro 1

Status
Not open for further replies.

AndrewMozley

Programmer
Oct 15, 2005
621
1
18
GB
I am rather living in the past, but need to set a path for whenever I fire up command.com. [Reason is that my old DOS application needs to invoke Microsoft Word, hence needs the path to C:\Program files\Microsoft\Office11]

I have tried modifying c:\Windows\system32\autoexec.nt but this does not have the desired effect, and I am not sure that this command file is being executed - have tried putting in some trace with an ECHO command and this is not being displayed.

Am I looking in the wrong place?

I see that there was discussion back in 2005 on this matter - not quite sure what the best approach is.

Thanks. Andrew

 
Hi Andrew

I don't think autoexec.nt is used by Win XP.

What I do is:

- right click My Computer
- click on properties
- in System Properties, Advanced tab, click on Environment Variables
- in the system variables section, scroll down to path, highlight it and click on edit

Then put additional path(s) at the end, separated with a semicolon.

When done, OK your way out.

Jock

 
That is a great help, Jock. Works as you say. The Autoexec.NT file must have been from my defective memory!

Thanks very much. Andrew


Now I just need to work out how to open a text file and apply a macro to it from a template.

I find that the command
winword.exe myfile.txt
. . . will open the file

and :
winword.exe /tmytemplate /mmymacro
. . . will start an empty file using mytemplate.dot, and will run mymacro (in this case to set the page margins)

but :
winword.exe myfile.txt /tmytemplate /mmymacro
.. only opens myfile.txt, using the normal template. I had hoped to use mytemplate and invoke mymacro.

I shall investigate some more.

Thanks again
 
AUTOEXEC.NT, is used for 16bit programs, meaning it is only executed when the DOS program is a 16bit executable...

16bit support can be disabled in XP...

but you already have a fix... so consider the above just as informational gibberish... ;)

PS: on the template issue, have you tried the following:

winword.exe /tmytemplate /mmymacro myfile.txt

Ben
"If it works don't fix it! If it doesn't use a sledgehammer..."
How to ask a question, when posting them to a professional forum.
Only ask questions with yes/no answers if you want "yes" or "no"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top