plugins are only run in 32bit mode

Bug #800073 reported by Gerold Gruber
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OCS Inventory: Windows Agent
Fix Committed
Low
Didier Liroulet

Bug Description

Hi,

I'm about to implement the msofficekey plugin
http://wiki.ocsinventory-ng.org/index.php/Plugins:MSofficeKey

It is unable to detect a 64bit Office 2010 on a 64bit Win7 because of the plugin is run in a 32bit environment.
proof:
on 64bit system, run from within a "normal" cmd.exe (which is 64bit)
cscript /nologo msofficekey.vbs
and the key for the office is seen.
Start a 32bit cmd.exe (from Windows\syswow64) and do the same call (which will have the affect, that virtualisation
comes into the game and the 32bit version of cscript will be run)
cscript /nologo msofficekey.vbs
and the 64bit office key is invisible.

So what to do?
Apparently the OCS agent should be enabled to run 64bit plugins, or at least to start the 64bit cscript.exe

A programming former colleague of mine had to implement a similar thing: call a 64bit cmd.exe
from within a 32bit programm.
He told me that there is a flag with which you can disable this 32bit Virtualisation.
so the code sequence must be
disable virtualisation
exec %windir%\system32\cscript ... plugin
enable virtualisation

if we would like to run a plugin in 64bit mode.

So I'd suggest to implement an additional directory for plugins that should be run in 64bit mode
(and are 64bit aware), which then only comes into the game on 64bit systems.

No, not so good: this 64bit plugin would not be called on 32bit systems.
delivering both plugins would then lead to running both on 64 bit systems, or the 32bit vbs plugin
would need code to detect if the current is a 64bit system and then do nothing ...

What if the vbs plugins would always be executed from a 64bit cscript.exe?
Anything speaking against this idea?

Best regards

Gerold

description: updated
Revision history for this message
Didier Liroulet (dliroulet) wrote :

Hi Gerold,

This is a huge enhancement, so, we will look for this in a future major release.

But there is also a workaround using VBscript.

Cheers

Changed in ocsinventory-windows-agent:
assignee: nobody → Didier Liroulet (dliroulet)
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
bezourox (guillaume-priou) wrote :

Hi,

Could you test new version of vbscript available here : http://wiki.ocsinventory-ng.org/index.php/Plugins:MSofficeKey

Tell us if all is ok

Revision history for this message
Gerold Gruber (gruber-citkomm) wrote :

looks really good.
Great job, thanks a lot.

Indeed the plugin grabs the keys of a 64bit Office Package from a 64bit Win7 system.

So far the originally addressed problem of this bug is solved for me.

And having got good things makes often eager for more: do you think it is possible to differentiate the keys a bit more?
e.g., I got shown now two keys for Office 2010 Professional.
No hint, that this is 64 bit Office, which may be ok regarding the license keys, which are originally addressed
by this extension.
Even more of intererest for me/us is, that there is one key for "the regular office", the other for a Visio installation.
These informations are show from a Microsoft license checking tool.
Do you feel this could be added?
Should I open a new bug for this?

Best regards

Gerold

Revision history for this message
Didier Liroulet (dliroulet) wrote :

Hello,

As for bug #966320, I've committed a fix which works if agent is compiled without support for Windows 2000.

Current version 2.0 support Windows, and we only plan dropping Windows 2000 support for version 2.1.

Regards

Changed in ocsinventory-windows-agent:
status: Confirmed → Fix Committed
Revision history for this message
Didier Liroulet (dliroulet) wrote :

Hi

Windows 2000 support disabled in revision 501 of code.

Fix will be activated in release 2.2 of agent

Regards

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.