Solved

bat file

Posted on 2000-05-12
1
362 Views
Last Modified: 2010-04-16
Hello
How can I find the windows dir in a *.bat file(from dos) so I can run a file?
0
Comment
Question by:ILPowerSoft
1 Comment
 
LVL 15

Accepted Solution

by:
simonet earned 30 total points
ID: 2804192
Use the %windir% variable.

Here's an example:

dir %windir%

start %windir%\notepad.exe


if %windir% hsa not been set, then try %winbootdir%. These variables are usually automatically set by Windows at start up.

Yours,

Alex
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question