32 bit jvm executing batch file fails with 'pnputil.exe' is not recognized as an internal or external command - 32bit-64bit

I am executing batch file from 32bit Java application.
This batch/cmd tries to install some drivers using pnputil.exe on windows 7 64 bit and fails giving - 'pnputil.exe' is not recognized as an internal or external command.
Tried with changing dir to %WINDIR%/System32/ within batch file and calling pnputil.exe without any success.
However similar batch executes fine when run from 64-bit jvm.
What alternatives do I have to install INF files from 32-bit jvm executing batch file on 64-bit Windows 7 ?

I can execute pnpUtil via path %WINDIR%\sysnative\pnputil.exe for 32bit JVM.
Though sysnative is not visible via win explorer but it solved my problem.

Related

Can a self-contained .netcore app run on AIX?

I successfully ran self-contained .net-core 3 apps on Linux, but if I am trying to run on AIX it fails:
bash: ./CoreConsole: cannot execute binary file: Cannot run a file that does not have a valid format.
I know AIX is unix operating system, but does anyone managed to run self-contained .net-core apps on it?
To run executable on AIX you need few things:
Application which is writen for AIX (propper AIX executable format)
Application which is compiled for POWER processors
Application which use AIX libraries
If one of them is missing you have no chance. The only exceptions are shell files, but you should be aware utilities, used by shell script may have different options

R package moved from windows 64- bit to 32-bit no longer works

I am working on creating a portable shiny app by referring to this.
I have a 64bit system and the target systems can be both 64bit and 32bit. I installed all packages in the portable apps library. Since the target machines don't have any internet connection.
On the target machine all packages load perfectly, except for prophet which gives error
So I see that it runs the r.exe in bin folder for whatever reason
So I run it directly which gives me this error
I know the system is 32bit. As a test case I ran the shiny app by calling on the 32bit R.exe without prophet package - and it worked perfectly.
So my question is
How do I load Prophet?
My speculation is that it tries to run the 64bit R.exe and fails, if so why are all the other packages load perfectly?
If this is the issue then how do I point it to the 32 bit R.exe?

using MPI: What on earth is "execvp error on file" error?

I am using my own laptop locally with win 10 system and intel parallel studio .
After I compiled my mpi code with mpiifort and run it with mpiexec for the first time. It warns me to input account and password, like below
I am sure I put in the correct password. But it just didn't work. What does "execvp error" mean? I never encountered this problem before on my old win8 system. I just installed this new win10 system on my laptop, everything is new. Could somebody please help me instead of making close vote without any comment? At least, say something
execvp error on file is the error from doing execvp system call. It is variant of exec system call used to start programs. In your case the mpiexec program tries to start the mpi-learning-pack.exe file on the target hosts (according to settings, probably some environment settings). This error says that it can't start your program on target hosts, because either it is not executable file, or cannot be found (not copied to target hosts or have no full path).
mpiexec does not copy file to targets, you should copy it to every target hosts.
You can also check if it executable by manually starting it on target host: just login to target host and type mpi-learning-pack.exe without mpiexec;
program may not start if there are no any of required library on target.
Or your account has no enough privileges like https://software.intel.com/en-us/forums/intel-clusters-and-hpc-technology/topic/607844 https://software.intel.com/en-us/forums/intel-clusters-and-hpc-technology/topic/624054
Or you just should use relative (mpiexec [options] .\mpi-learning-pack.exe) or full path (mpiexec [options] e:\w\work\fortran\_test_and_learning\mpi-learning-pack.exe) of target executable like in https://software.intel.com/en-us/forums/intel-clusters-and-hpc-technology/topic/624054

Run R web scrape daily

I have a script written in R that pulls online and then exports it to a spreadsheet on my computer. I am attempting to create a batch file so that I can set up a scheduled task, but it only opens up the R file without actually running it. The batch file is as follows:
"C:\Program Files\R\R-3.0.2\bin\Rscript.exe" CMD BATCH
"C:\Users\xxx\OneDrive\xxx\Scraper.r"
I am very open to ideas other than creating a batch file, I just want this to work!
Try using this instead (note the x64 addition)
"C:\Program Files\R\R-3.0.2\bin\x64\Rscript.exe" C:\Users\xxx\OneDrive\xxx\Scraper.r
and without the CMD BATCH flags. That works for me.
I am not sure what is going on, but it may be you only have the 64 bit version installed, and you are trying to execute the 32 bit version. But I get a silent fail when I don't have specify the "x64" sub-directory.

netsh mbn show interfaces results in command not found on Win7 64Bit

I'm trying to run "netsh mbn show interfaces" from a .bat or .jar file on a Windows 7 64bit system but every time I run my file, it results in "The following command was not found mbn show interfaces".
When I run that same command in a cmd.exe prompt, the result is correct and as expected.
When we run /? we see "mbn" in available commands. When we output that same result from a .bat or .jar, we don't see that "mbn" command in the available commands for netsh.
Anybody know what's happening?
We know there are 2 netsh.exe files, one in sys32 and one in syswow64.
All help is appreciated.
we solved the problem:
When running the command "netsh mbn show interface" was running the cmd as a 64bit operation.
When running the command from an application - that is 32bit - the cmd is run as a 32bit operation. And the mbn-context is not available in 32bit.
In a windows 64bit os, a behind the scenes function exists: file system redirection.
Meaning: a 64bit process will call the equivalent 32bit process.
The workaround is that you use a csharp script or something else where you can override the file system redirection:
IntPtr ptr = IntPtr.Zero;
Wow64DisableWow64FsRedirection(ref ptr);
// -- your proces information here --
Wow64RevertWow64FsRedirection(ptr);
//always revert the operation.
and that solved it!

Resources