NSIS detection of a 32-bit process in Win 7 x64 - process

I have a rather common task for my NSIS installer - to find out if Firefox is running before the install, and ask the user to close it. But I haven't yet found a plugin that works for Windows 7 x64. I have tested Processes, FindProcDll, nsProcess - they all failed to detect the 32-bit firefox. I'd be grateful for any ideas where to look next.
Update: Actually, I couldn't detect the 64-bit firefox either with any of these plugins.

FindProcDLL worked fine for me on 32 and 64bit systems.
I tried to find 32bit process and 64 bit processes and both were fine.

nsProcess works just fine for me. It also seems to be the most recently updated of the plug-ins you listed, so that's why I tested with that one. I'm using Win 7 x64 and confirmed in Task Manager that Firefox showed as "firefox.exe *32"
!include nsProcess.nsh
...
${nsProcess::FindProcess} "firefox.exe" $R0
${If} $R0 == "0"
# it's running
${EndIf}
Possible return codes:
0 Success
603 Process was not currently running
604 Unable to identify system type
605 Unsupported OS
606 Unable to load NTDLL.DLL
607 Unable to get procedure address from NTDLL.DLL
608 NtQuerySystemInformation failed
609 Unable to load KERNEL32.DLL
610 Unable to get procedure address from KERNEL32.DLL
611 CreateToolhelp32Snapshot failed

Related

Gazebo GUI Not Showing Up when running WSL2 Graphics on Windows 11

I am attempting to use ROS with the Gazebo GUI. I recently upgraded to Windows 11 for the WSL GUI support and have the gedit GUI working. However, when I run the command $ gazebo, the GUI does not open.
Running $ gazebo --verbose gives the following error messages
[Err] [RenderEngine.cc:749] Can't open display: :0
[Err] [GuiIface.cc:124] This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.
After enabling the QT Debug environment variable using export export QT_DEBUG_PLUGINS=1 and rerunning the gazebo command with the verbose option set, It shows me
[Dbg] [GuiIface.cc:112] Got keys from plugin meta data ("xcb")
[Dbg] [GuiIface.cc:112] QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
[Dbg] [GuiIface.cc:112] loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
I believe that I have all of the necessary packages installed from this output, so I am wondering why gazebo is not showing up. I have tried uninstalling/reinstalling gazebo to no avail.
Thank you so much for your time. If I get this problem sorted out, I will post. Please let me know if any other system/output information is needed.
Other information:
I am not using X Server because the Windows 11 upgrade does not require it for graphical WSL applications (but did try it with X Server installed just in case)
I have tinkered around with the ~/.bashrc profile. DISPLAY=0:0 option was set, but I deleted this because Windows 11 did not need it (or so I think?)
Solution:
After reading up online, I found this answer to a similar question to mine.
https://superuser.com/questions/1681647/windows-11-wsl-not-opening-gui-in-my-ubuntu-shell
Getting ubuntu and re-installing gazebo on that worked. Now I can open up the Gazebo GUI.

Error while running IEDriverserver.exe on 64 bit system

I am trying to run IEDriverServer.exe on 64bit windows system.
The following is the output on windows command prompt on my desktop.
D:>IEDriver.exe 000000013F19C740000000013F19C7885555',
000000013F19C7A0', 000000013F19C7B8', 000000013F19C7D8'
What does this error mean?
However i can run the same IEDriverServer on the other computer.
The following is the output on windows command prompt on my desktop. (I am using the same IEDriver.exe file copied from the other system.)
E:\Demo\swas\src\Configuration>IEDriver.exe Started
InternetExplorerDriver server (64-bit)
2.31.0.0 Listening on port 5555
There are two IE drivers one is for 32 bit browser and one is for 64 bit browser. The problem can be random also on some systems because of difference in windows updates.
Downloading proper version removes the problem.

Installing INF files for a PnP device using devcon dp_add

I'm using a BAT file to execute the following command to install my INF file to another computer:
devcon dp_add "linux-cdc-acm.inf"
It works fine with Win7 x64 but it fails in Win8 x64. The error message is:
Adding the specified driver package to machine failed. devcon failed.
I assume the INF file is correct as I can install it manually via the DeviceManager and there is no new entry on [%windir%\inf\setupapi.dev.log]. Is there another way to install INF files to the driver store for Win8?
And another thing, is using devcon really the normal and correct way in installing INF files to client computers?
EDIT:
I got the devcon source from WDK, debugged it and found that I am getting a [ERROR_ACCESS_DENIED]. Is this failing because of the settings in Win8? What are ways to overcome this?
It seems the batch file or devcon just needed to be "run as administrator" in win8.
and test signing the catalog file for the INF file was also needed.
Alternatively for future reference, I was able to use WiX and DIFxApp to create a .msi installer that installs linux-cdc-acm.inf and linux.inf (RNDIS) gadget drivers. https://github.com/ambrice/linux-gadget
Haven't been able to figure out how to create a 32 bit version from my 64 bit dev box yet, even though there's no binaries..

Unable to install JDK7u21x64 on Windows 8 x64

I have just upgraded to Windows 8 Pro, mostly because my Windows 7 license has reached maximum activations and I have a free copy of 8, and partially so I can ensure my software is 8-compatible.
I seem to be incapable of installing the JDK. I just downloaded it from the Oracle website (jdk-7u21-windows-x64.exe).
Windows reports itself as: 64-bit Operating System, x64-based processor.
When I try and run it, either normally or as administrator is shows up with the message:
This app can't run on your PC
To find a version for your PC, check with the software publisher
Does anyone have any ideas on this, a quick Google indicates it should just install same as usual.
While 8 still insistently refuses to install the JDK even after re-downloading and checking the hash, the Netbeans + JDK bundle does install which includes the JDK so that solves this issue sufficiently for now.
Update: The 64-bit version now works fine.
Try the x86 version: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html , I don't think there is a proper build for Windows 8 Pro.

Simple-OpenNI for Processing fatal errors with the Kinect

I have been using SimpleOpenNI, a wrapper for Processing, all summer now. I use it for the Kinect to make games and demos. Last week, I have been getting a fatal error in my processing window and none of the SimpleOpenNI projects will work. Here is the error:
SimpleOpenNI Version 0.20
A fatal error has been detected by the Java Runtime Environment:
EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x72e8f955, pid=4596, tid=4624
JRE version: 6.0_24-b07
Java VM: Java HotSpot(TM) Client VM (19.1-b02 mixed mode windows-x86 )
Problematic frame:
C [OpenNI.dll+0xf955]
An error report file with more information is saved as:
C:\Users\mss042\Desktop\processing-1.5.1\hs_err_pid4596.log
If you would like to submit a bug report, please visit:
http://java.sun.com/webapps/bugreport/crash.jsp
The crash happened outside the Java Virtual Machine in native code.
See problematic frame for where to report the bug.
It appears as if the new OpenNI/NITE/SensorKinect drivers do not work with the SimpleOpenNI wrapper. I have tried it with people using the old drivers and everything still works. Problem is, you cannot download the old drivers off of the websites so I cannot test if it's that or not. You can see everything I've downloaded from the simpleopenni site: http://code.google.com/p/simple-openni/
Any help with this error would be appreciated. Thanks.
Mike
It looks like there's a problem with OpenNI.dll. Make sure that:
You have the dll (It should be in Program Files where you've installed OpenNI)
Make sure you've got the Environment Variables for the Open NI paths and that the paths are correct, otherwise, you might have the .dll file, but the .jnilib wouldn't know where it is.
Had a Kinect Workshop in Uni, and my colleagues using Windows all had issues with the drivers,
so I'm just passing on what they did:
Even though they had 64-bit versions of Windows they used the 32-bit version, and used Brekel OpenNI Kinect Auto Installer - Developer Edition v1.3.2.3.exe(direct link via developkinect.com) after reading this message:
Comment 4 by tijmenva...#gmail.com, Oct 21, 2011 Hey all I have Solved
the unsatisfied link dll error on windows 7 64 bits by installing java
runtime (jre-7u1-windows-i586.exe)and (Brekel OpenNI Kinect Auto
Installer - Developer Edition v1.3.2.3.exe) I uninstalled everything
and than it worked :)
hope this helpes
in Issue#17 on the SimpleOpenNI project issues page.
Another colleague used Synapse and OSC in Processing instead of SimpleOpenNI, but she had loads of errors with the drivers (basically spent a few good hours uninstalling/installing different versions). In her case, uninstalling any previous partial or complete drivers from the machine and deleting any registry entries related to PrimeSense(Sensor, Nite) and OpenNI, then using the installers from the links on the Synapse page, worked for her.
HTH
This is a long shot, but that exact error is also given if the Kinect USB and/or power supply simply becomes unplugged. Thought it was worth mentioning as it is not obvious from the error message itself and it may help someone out if they kicked their power supply and started searching for the above exception :)