« Posts under Windows

Change Windows server 2008 R2 language

To change, or add a language in a Windows Server 2008 R2 system, you need to download a language pack ISO from Microsoft download site.

You can find it here
Then you need to install it; but Microsoft documentation if obscure on this argument....

The faster way is to execute this command lpksetup from Start->Run

and choose the cab file from the language pack dir you want add.

That's all, follow the instruction an you are done.

WordPress redirect

My friend Francesco (www.flussiliberi.it) was hosted on a free service without having a domain ,so, after buying a domain name and space, ask me a way to redirect all vistors that point direct to a post or page in the old WordPress blog to the corresponding page on new site.

I don't know if exist a plugin, but with a few php lines it's possible:

  2. <?php
  3. $url="http://www.hacksandmore.com";
  4. if (($_GET["p"] === null) and ($_GET["page_id"] === null) and ($_GET["feed"]=== null) and ($_GET["cat"]=== null)) {
  5. $url=$url;
  6. }
  7. else
  8. {
  9. if(isset($_GET["cat"])) $url=$url."/?cat=".$_GET["cat"];
  10. if(isset($_GET["feed"])) $url=$url."/?feed=".$_GET["feed"];
  11. if(isset($_GET["p"])) $url=$url."/?p=".$_GET["p"];
  12. if(isset($_GET["page_id"])) $url=$url."/?page_id=".$_GET["page_id"];
  13. }
  14. <fieldset>
  15. <h1>Site transferred,
  16. redirect in a few seconds...</h1>
  17. <h3>WP redirect by: Umberto Bernardi
  18. <a href="http://www.hacksandmore.com">www.hacksandmore.com</a></h3>
  19. </fieldset>
  20. <script type="text/javascript"><!--mce:0--></script>
  21. ";
  22. ?>

You can download the script in the right panel in Downloads section

Debian GNU/Linux as Enterprise Desktop #2 – iSeries Access

iSeries access is needed if you have an AS400 or Iseries, so we can start installing...

You need the following packages:


install with apt-get or what way you want, then you need to create a file like


that must contain this line:


Now run

user@linux$ sudo ldconfig

Edit file /etc/locale.gen and uncomment line for your lang (for me is “it_IT ISO-8859-1” )
And generate languages with :

root@linux#  locale-gen 

Now setup general emulator options

user@linux$ /opt/ibm/iSeriesAccess/bin/setup5250 

(especialy to column separator)

You are finished... now you can run session with:

user@linux$ /opt/ibm/iSeriesAccess/bin/ibm5250 -LANGID "your_lang" "as400_system"

where "your_lang" is language you specified before in /etc/locale.gen, for me is IT_it
and "as400_system" is ip address or hostname of yout iSeries.

Schedule a reboot

If you need to schedule a reboot on your windows server 2k3 you can simply

create a new batch or CMD file with this code inside:

shutdown -r -f -c "Shutdown to refresh buggy program"

and then use the "scheduled tasks" utility to plan the reboot...

Serial Datalogger Service

I've wrote this very very simple tool to log CIL data from our PABX;

you can use it as you want, because it read data from the serial port an write it to a text file in c:\program files\sdl\data

It run as a windows service, so you don't have to login to the pc to start it.


Microsoft net framework 3.5