1

I've got a Server 2012 R2 server with the RDS roles installed.

When attempting to add a new app I'm getting told that the server 'isn't online', despite the fact I am on that same server and am able to launch other applications.

I've narrowed it down to the environment variables not resolving correctly - as per this example:

C:\>ECHO %path%
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files (x86)\Sybase\SQL;C:\Program Files (x86)\Sybase\Shared\win32;C:\Program Files (x86)\sybase Central 4.0\java;N:\Autoauto\programs\common;N:\Autoauto\


C:\>ECHO %SYSTEMROOT%
C:\Windows

C:\>cd %Systemroot%\system32

C:\Windows\System32>cmd
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\Windows\System32>exit

C:\Windows\System32>cd\

C:\>cmd
'cmd' is not recognized as an internal or external command,
operable program or batch file.

I can replace %systemroot% with C:\Windows\ in PATH but I'm not happy that I should have too, why this is happening and that it won't mysteriously come back in the future.

Given that this prevents me deploying new applications and tha tI have deployed a new application in the last 2 months this is a new issue. Google turns nothing up (except someone who had hte same issue with regards to RDS).

Anyone have any thoughts on how this is happening?

4
  • Do you have installed something that messed up with that? As I never seen that problem on my 2012R2
    – yagmoth555
    Sep 14, 2015 at 11:58
  • No, nothing new has been installed. We have one application that is already published, this has happened sunce that application was installed. To the best of my knowledge no other changes have occured on this server/domain that would affect environment variables.
    – Patrick
    Sep 14, 2015 at 12:03
  • I suspect it's your app that changed the value, can you test by installing it on a test 2012R2 vm ?
    – yagmoth555
    Sep 14, 2015 at 12:50
  • No, the app was installed ages ago, we've published it via RDS since then. The issue stops apps being published in RDS so it cannot have been the problem at the time. This is new.
    – Patrick
    Sep 14, 2015 at 13:35

1 Answer 1

4

I suspect it's broken syntax in your path environment variable.

C:\Program Files (x86)\Sybase\SQL:\Program Files (x86)\Sybase\Shared\win32;

Should be:

C:\Program Files (x86)\Sybase\SQL;C:\Program Files (x86)\Sybase\Shared\win32;

Note the missing ;C

3
  • This isn't the issue, I've not pasted the full content of the path here, it's cut off where its wrapped round, so you aren't looking at the full path statement. If you look at the posted example its %systemroot% that I'm having trouble with anyway, not sybase. I can run "CD %SYSTEMROOT%\System32" and it correctly open c:\windows\system32, but if I try to call a command thats in that directory I'm unable to do so, even though the path statement should allow it (see the end of my example, CMD.EXE not recognised as an executable).
    – Patrick
    Sep 15, 2015 at 9:31
  • Just to be clear, %SYSTEMROOT% and %PATH% are two completely different environment variables. Because cd %SYSTEMROOT%\system32 works, does not mean %PATH% will, which is what it tries to run through when you execute a command without providing the path. If %PATH% is severely broken with misplaced colons, I'm not sure how it would be affected. That said, with the updated post, I don't see any issues now, so not sure.
    – Gremio
    Sep 15, 2015 at 20:47
  • Yes thank you. I realise including an incomplete path string was misleading, hence the edit. The remainder of the elements in the path work fine, and if I replace %systemroot% with C:\Windows this also works.
    – Patrick
    Sep 16, 2015 at 8:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .