I made a change in the blogger configuration to ease the later work when blogging. It is possible that older entries are not correctly formatted.

Showing posts with label Windows. Show all posts
Showing posts with label Windows. Show all posts

Friday, 21 June 2013

Create simple GUIs to your scripts - HTA files

While looking for a way to help my grilfriend be more productive I found ut that one can create hta files. The following example is with VB. I have to see if it is possible to use other kind of scripts.


<head>
<title>HTA Test</title>
<HTA:APPLICATION
APPLICATIONNAME="HTA Test"
SCROLL="yes"
SINGLEINSTANCE="yes"
WINDOWSTATE="maximize"
>
</head>

<script language="VBScript">
Sub TestSub
Msgbox "Testing 1-2-3."
End Sub

Sub GetOSVersion
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" &strComputer & "\root\cimv2")

Set colOperatingSystems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")

For Each objOperatingSystem in colOperatingSystems
Msgbox objOperatingSystem.Caption &" " &_
objOperatingSystem.Version
Next
End Sub
</script>

<body>
<input type="button" value="Run Script" name="run_button" onClick="TestSub"><p>
<input type="button" value="Get OS Version" name="run_button" onClick="GetOSVersion"><p>

</body>

This may turn out to be useful once or twice. But I would hate to have to program in visual basic.
There was actually an example how to create a simple selection list in powershell. But I have not tried the described there, but the page might be useful to you

Sunday, 24 June 2012

Cygwin Packages setup.exe and command line

It seems that there is the possibility to use setup.exe to perform some action for the management of cygwin packages. The link: http://cygwin.com/faq/faq.setup.html#faq.setup.cli shows the diverse options.

I will take a look at it and try to improve my pakage management.

Thursday, 3 November 2011

Windows Power Shell

As a linux user, I had always been frustrated that I must use a stupid command line to perform some task under windows. Or even worse, there were a lot of tasks I could even perform like that, because the commandline did not have any grep, find, and similar utilities.

This is until I discovered the powershell. Since I have to use windows at work and sometimes I do not even have the possibilty to use cygwin with suitable tools. I really got frustrated. But now that I looked into many of the power shell language, I must admit that it is quite impressive, what one can do with it. I also find it great that the powershell understands both pipes and objects...

I will probably add here many of the useful features I discovered. In someway I think Microsoft understood that they had to become more competitive in order to keep their customers.

Thursday, 18 February 2010

Eclipse 3.5 Windows and Unicode and Subversion

File.encoding in Eclipse and strange encoding problem in JavaSource UTF-8 files

While trying to deploy the package I have been deploying, a few problem arised yesterday.

We first had checked out a Web application.

Afterwards we set the default encoding to UTF-8 for a few files in the Window > Preferences > General > Content-Type > Text > JSP .

We also changed the encoding in the eclipse.ini file, adding the following line to the java command -Dfile.encoding=UTF-8 in the eclipse.ini

We had strange text where umlauts had been destroyed. The text was in UTF-8 in UTF-8 files in the JavaSource directory. By Debugging, we discovered that they were also called by UTF-8 JSP or UTF-8 Java Files.

The solution has been to check the Application again. Afterwards the text was displayed correctly

Subversion problem while checking files with same names with different Case

The other problem we had, was caused by two files having the same names but with different case: file.jsp and File.jsp. This caused some kind of conflict when checking the file out with subclipse.