- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
executing
"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018.0.124\windows\bin\compilervars.bat" intel64
under PSXE2018 now results in the current directory being changed from where the command was issued to in my case c:\users\dave\source
Why is this? Is it possible to get this changed back to not affecting the current directory? This didn't happen in any previous version.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm not seeing that behavior. Are you typing this command into a command prompt window, or are you using a shortcut?
Microsoft Windows [Version 10.0.15063] (c) 2017 Microsoft Corporation. All rights reserved. C:\Users\Steve>"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018.0.124\windows\bin\compilervars.bat" intel64 Intel(R) MPI Library 2018 for Windows* Target Build Environment for Intel(R) 64 applications Copyright (C) 2007-2017 Intel Corporation. All rights reserved. Copyright (C) 1985-2017 Intel Corporation. All rights reserved. Intel(R) Compiler 18.0 (package 124) ********************************************************************** ** Visual Studio 2017 Developer Command Prompt v15.0.26730.16 ** Copyright (c) 2017 Microsoft Corporation ********************************************************************** [vcvarsall.bat] Environment initialized for: 'x64' C:\Users\Steve>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well we did it in code, and also in a command prompt. Be we did start on the D: in both cases.
Microsoft Windows [Version 10.0.15063]
(c) 2017 Microsoft Corporation. All rights reserved.
C:\Users\dave>d:
D:\>"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018.0.124\windows\bin\compilervars.bat" intel64
Intel(R) MPI Library 2018 for Windows* Target Build Environment for Intel(R) 64 applications
Copyright (C) 2007-2017 Intel Corporation. All rights reserved.
Copyright (C) 1985-2017 Intel Corporation. All rights reserved.
Intel(R) Compiler 18.0 (package 124)
**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.0.26730.15
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
C:\Users\dave\source>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It doesn't do that for me.
D:\> D:\>"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018.0.124\windows\bin\compilervars.bat" intel64 Intel(R) MPI Library 2018 for Windows* Target Build Environment for Intel(R) 64 applications Copyright (C) 2007-2017 Intel Corporation. All rights reserved. Copyright (C) 1985-2017 Intel Corporation. All rights reserved. Intel(R) Compiler 18.0 (package 124) ********************************************************************** ** Visual Studio 2017 Developer Command Prompt v15.0.26730.16 ** Copyright (c) 2017 Microsoft Corporation ********************************************************************** [vcvarsall.bat] Environment initialized for: 'x64' D:\>
I can't see any command in the Intel or Microsoft files that would do this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve, please see the Visual Studio 2017 batch file <VS17_dir>\Common7\Tools\vsdevcmd\core\vsdevcmd_end.bat.
if "%VSCMD_START_DIR%" NEQ "" ( cd /d "%VSCMD_START_DIR%" ) else ( if EXIST "%USERPROFILE%\Source" ( cd /d "%USERPROFILE%\Source" ) )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there an easy way to get all the bat files to echo what they are doing?
I haven't modified any of the PSXE files or the VS files. And I have no clue how it gets to the source folder.
BTW I got a case submitted for the compiler crash this morning. Took them 3 days to figure out how to let me login. But no word on the crash yet.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
mecej4 wrote:
Steve, please see the Visual Studio 2017 batch file <VS17_dir>\Common7\Tools\vsdevcmd\core\vsdevcmd_end.bat.
if "%VSCMD_START_DIR%" NEQ "" ( cd /d "%VSCMD_START_DIR%" ) else ( if EXIST "%USERPROFILE%\Source" ( cd /d "%USERPROFILE%\Source" ) )
Huh - I missed that. Fascinating. Sure enough, if there is a Source subfolder of your profile's default directory, the VS2017 setup moves you there. That's not nice.....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve,
We sort of fixed it by putting the calls to compilervars in a wrapper that saves the current directory and then restores it. It will work, but as you say it's not nice.
Not sure why I have a Source directory either. I'm guessing MS added it sometime, because I know I didn't. But seems you don't so that is also a puzzle.
Thanks for the help mecej4!
Dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You could fool the vsdevcmd_end.bat script by setting the environment variable VSCMD_START_DIR to ".", i.e., a period, without the quotes, in the Environment Variables control panel of Windows, if you do not fear that doing so will derail something else.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page