[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Default windows directory

Posted on 2007-10-02
Medium Priority
Last Modified: 2010-04-16
I need to copy a file to the defualt windows directory on log in. On most machines it's c:\windows, but some it maybe c:\winnt or who knows what else microsoft names it. How do I reference that in a batch file? i thoght it was something like c:\%windows% or something....
Question by:kevlause
1 Comment
LVL 30

Accepted Solution

LauraEHunterMVP earned 2000 total points
ID: 19998031
Use %windir% - i.e., if you type 'cd %windir%' from the command prompt, it will change you to c:\windows, c:\winnt, or c:\bob, as appropriate.

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Being a system administrator some time we require to do things remotely, one of them is installing software. Here I am going to tell you how to install software through wmic (Windows management instrument console). I am not at all saying that this i…
You may have already been in the need to update a whole folder stucture using a script. Robocopy does it well and even provides a list of non-updated files in a log (if asked to). Generally those files that were locked by a user or a process by the …
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?

873 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