Archive for October, 2011

9

Fix for Windows 7 & wmic: Invalid XSL format (or) file name


In Windows 7, there is a bug with wmic and the /format switch. When using the /format switch, you will get the error “Invalid XSL format (or) file name.”

1. Example:

C:\Tmp>wmic /output:C:\tmp\procinfo.html CPU get Description,
DeviceID, Manufacturer, MaxClockSpeed, Name, Status, SystemName /format:hform.xsl
Invalid XSL format (or) file name.

2. Cause:

Windows looks for the XSL stylesheets but cannot find them, which produces the error above.

3. Resolution:

Copy *.xsl from x:\Windows\system32\wbem\en-US\ to x:\Windows\system32 – this can be done quicky from command prompt:

copy /y %WINDIR%\system32\wbem\en-US\*.xsl %WINDIR%\system32\

If you run your original wmic command (example in Section 1), there will be no errors and wmic will export data in the format required.

4

Install mod_rpaf on CentOS 5, CentOS 6


This is a quick guide on how to install mod_rpaf on CentOS 5 and CentOS 6. (This guide can also be used to install mod_rpaf on RHEL and Fedora Core)

1. Retrieve and Extract mod_rpaf packages:

# cd /usr/local/src
# wget http://stderr.net/apache/rpaf/download/mod_rpaf-0.6.tar.gz
# tar xzvf mod_rpaf-0.6.tar.gz
# cd mod_rpaf-0.6

2. Build and install mod_rpaf

# apxs -i -c -n mod_rpaf-2.0.so mod_rpaf-2.0.c

[ httpd-devel is the package required to run apxs ]

3. Add mod_rpaf to Apache configuration

# vim /etc/httpd/conf/httpd.conf

- Find the “LoadModule” list (near the top)
- Add the following lines at the bottom of the “LoadModule” list:

LoadModule rpaf_module modules/mod_rpaf-2.0.so

# mod_rpaf Configuration

RPAFenable On
RPAFsethostname On
RPAFproxy_ips 127.0.0.1 10.0.0.1
RPAFheader X-Forwarded-For

Important: Where “127.0.0.1 10.0.0.1″ is, add your proxy server IP address(es). This will tell mod_rpaf which hosts to get X-Forwarded-For headers from.

4. Finish

Restart Apache for the changes to take effect

/etc/init.d/httpd restart

5. Troubleshooting

The following dependencies may need to be installed before installing mod_rpaf:

httpd-devel, gcc

They can be installed using the following commands:

yum install httpd-devel gcc

Random Posts Recent Comments

  • Tony Says:

    Thanks it works! Just close the cmd windows and open a new one...

  • greenhart Says:

    I found another way around it. For the /format switch I used: /format:"%WINDIR%\system32\wbem\en-...

  • Jari Aalto Says:

    To determine OS, you can also use command lsb_release(1). See the options how to extract only part o...

  • shadovice Says:

    thanks! it worked like a charm, although there is still minor typo remained: rpm -Uvh http://downlo...

  • Joh Says:

    Great, thank you. Also works with the new version and Centos 6.3 without test repo, just install ...

  • sierprinsky Says:

    Muchas gracias por tu aporte :)...

  • kilby Says:

    The listed solution worked fine for me under Win7 64bit Though I had to run the copy as Asministr...

  • Viper5112 Says:

    The files are already in the C:\Windows\SysWOW64\wbem\en-US and they need to be in the system32 fold...

  • slowmOoh Says:

    Thanks...

  • Jørgen Says:

    @Jordan, I had the same problem also on Windows 7 64 bits. It worked for my user account and Admini...

Tag Cloud

backup mail backup mail server backup mailserver backup mx cd burner control multiple computers with one keyboard and mouse control panel DAG disk benchmark disk performance test DNS DNS check enable dag repo free cd burner free DNS check hdd benchmark http proxy install keyboard over network kloxo kloxo 64-bit kvm lxadmin lxadmin-master lxlabs mouse over network mtr ping plotter proxy proxy hide IP qmail repo RPM rpmforge share keyboard and mouse over network share keyboard over network share mouse and keyboard share mouse over network software kvm squid squid hide IP squid proxy trace traceroute tracert