Link to home
Start Free TrialLog in
Avatar of Member_2_7974201
Member_2_7974201

asked on

Microsoft Windows Server 2012 R2 Essentials: %SystemRoot%\Sysnative folder is missing

Hello,

i need to start a 64bit Powershell from a 32bit process.
Normally i would use this statement to achieve this:

%SystemRoot%\sysnative\WindowsPowerShell\v1.0\powershell.exe -Command "& 'ThatScriptThatNeeds64Bit.ps1'"

At least that is what i would normally do.

On that "Microsoft Windows Server 2012 R2 Essentials" Server on which I am working right now the sysnative folder / redirection is missing.

I have tried two options:
C:\Windows\syswow64\WindowsPowerShell\v1.0\powershell.exe and
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe

In the context of my 32bit application both calls start a 32bit powershell process. (Tested using [Environment]::Is64BitProcess.) Thus i cannot access the 64bit Powershell Module that I need to access.

Can I like install that sysnative Folder somehow? Or does someone have an idea how to get that 64bit process started?

Thank you very much,
   Stefan
SOLUTION
Avatar of Qlemo
Qlemo
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Member_2_7974201
Member_2_7974201

ASKER

Thank you both very much for your answers. And for doubting me.

I opened a 32bit Powershell as requested and entered the requested command.
Which opened my eyes. Now, that I know that was my fault everything else fell into place and the problem is solved. Thank you very much, especially oBdA for being most helpful, and Qlemo too for doubting me. You were right.

The complete story behind this:

- there is a monitoring software that collects data, it can start batch files (32bit)
- there is a batch file (running as 32bit), that starts the powershell
- there is a powershell (needed as 64bit)

- the script is monitoring an important software and is called every 5 minutes

First problem:
Being downloaded to the computer from a web page it was flagged, so powershell didn't like the execution of the script much and asked "shall i really execute this?"...

Since the script is executed by a monitoring software, that question has been unanswered... thus powershells kept piling up, till the monitoring software sensed that something odd was happening and stopped the execution of the script

I found the problem with "shall I really execute this" relativly easy by trying to execute this. But of cause, i did this (by accident) in a 64bit cmd.

As I mentioned the script is called through a batch file. So i started the batch file. Which contains the line with the sysnative path. Which led to "path not found". Because, as has been said correctly, that directory cannot be seen from 64 bit processes.

From there on I went wrong.
As already said - I say it again - thank you very much! What a relief!
I see, somehow i did not close that question.
Bad me.
Thanks!