Things I Learnt Today

December 3, 2009

Powershell script error?

Filed under: Windows — Ding @ 8:28 am

Did you ever setup a new machine, and run your first glorious powershell creation to get a message like this :-

File 1234.ps1 cannot be loaded because the execution of scripts is disabled on this system.  Please see “get-help about_signing” for more details.  At line: 1 char: 2

The reason for this is that the systems current execution policy prevents running of the script.  There are four levels :

Restricted: Commandlets can run, but not scripts.  This is the default.

Allsigned: Scripts can run but have to be digitally signed.  You’ll also get prompts when running scripts from trusted publishers.

Remotesigned: Scripts running on the local computer don’t need a signature, but any downloaded scripts do.

Unrestricted: Any script can run – useful for doing your testing!

To change the policy run the following in Powershell :

set-executionpolicy unrestricted

August 25, 2009

CPU Gadget

Filed under: Windows — Ding @ 11:48 am

I’ve been looking at CPU gadgets off and on for a little while, but not found one that I truly like.  Well I’m going to give this one a go :-

http://gallery.live.com/liveItemDetail.aspx?li=587ef54f-e121-418b-b258-e583e105a0d6&bt=1&pl=1

It looks pretty neat to me :)

Capture

July 7, 2009

Reading web.config setting

Filed under: Web App, Windows — Ding @ 11:20 am

The other day I had cause to figure out how to read a value from a web.config file, and display it on the screen.

After searching for a bit, and using the help provided in this article (http://codersource.net/asp_net_web_configuration_file.html), I came up with the following :

In Windows Explorer, go to c:\inetpub\wwwroot
Create a folder there called TestFldr
Open IIS Manager, and right click on the Default Web Site, and create a new virtual directory as follows :

Alias : TestFldr
Browse to the path that you created before
Permissions: Read + Run Scripts

Create a simple web.config file in the EVTest folder :

<configuration>

 <appSettings>
 <add key="MyTestSetting" value="1234"/>
 </appSettings>

</configuration>

Create a file in that folder called test.aspx, and put in it :

<script runat="server">

sub Page_load
 dim aconfig as system.configuration.configurationsettings
 dim extver as string = aconfig.appsettings("MyTestSetting")

 div1.innerhtml = "<b>" & extver & "</b>"

end sub

</script>

<html>
<body>
<form runat="server">
MyTestSetting is: <div id="div1" runat="server"></div>

</form>
</body>
</html>

Now open Internet Explorer, and go to http://servername/TestFldr/Test.aspx

MSIEXEC logging

Filed under: Windows — Ding @ 11:15 am

I always wondered how to get the logging enabled when you run an MSI and something goes wrong.  I had thought it was amazingly complex to turn on, but in fact it’s not !  You can do it liks this :

MSIEXEC /i “MyMSI.msi” /L*v “c:\mylogfile.log”

That logs everything “verbosely” to the filename specified.

February 10, 2009

Ultramon Alternative?

Filed under: Windows — Ding @ 11:44 am

I’ve been on the look out for something to use for multiple monitor OTHER THAN Ultramon.  Whilst I like it, I kind of wanted to do something that wasn’t the de facto standard, and something that was preferably free.

After a bit of googling, I found :-

http://www.softsia.com/DynaDeskXP-download-npc5.htm
http://www.snapfiles.com/get/displayfusion.html
http://www.mediachance.com/free/multimon.htm

I tried Display Fusion, but it didn’t seem to do the multiple task bar thing (one on each monitor) .. that’s something that I really wanted.  I then tried, and I am currently using the product from MediaChance, called Oscar’s Multi-Monitor TaskBar.

It’s good .. so far.

February 4, 2009

BatteryBar

Filed under: Windows — Ding @ 10:20 pm

I came across a little utility that I eventually installed on my Windows 7 laptop last night.  It’s called BatteryBar, and it’s from this site.  I saw it described on lifehacker.  I didn’t think it would work properly on Windows 7 — but it does, it works well.  I think I’ll keep it installed, as the standard icon you get in the system tray just isn’t that accurate, and doesn’t tell you that much information.

Previously when this laptop was running Windows XP it had a Lenovo / IBM utility that ran in the task bar area that showed battery life, but, since the laptop went to Vista, and now to Windows 7 I’ve been missing that visual clue of battery life.

Check out the utility – you just might like it too.

January 22, 2009

Odd Windows 7 Issue

Filed under: Windows — Ding @ 10:56 am

Today I thought it would be a good idea to install some more apps on my Windows 7 machine.  I had previously installed things like Office.  The difference today is that it was straight after production activation (well an hour or so afterwards).  I repeatedly got the same error :-

Error    22/01/2009 10:47:51    Application Error    1000    (100)

Faulting application name: msiexec.exe, version: 5.0.7000.0, time stamp: 0×49431c33
Faulting module name: ntdll.dll, version: 6.1.7000.0, time stamp: 0×49433e67
Exception code: 0xc0000005
Fault offset: 0×0007f6d6
Faulting process id: 0xdf4
Faulting application start time: 0×01c97c7ede31df1e
Faulting application path: C:\Windows\System32\msiexec.exe
Faulting module path: C:\Windows\SYSTEM32\ntdll.dll
Report Id: 1d4f5f49-e872-11dd-9d8d-001641a9741a

I thought it was because I was installing over the network, so I tried the files locally.  I tried other MSI’s, and had the same problem.  I hunted around a little bit, and Windows then helped me after I sent the error report … it said :-

function expand( obj ) { if( obj.nextSibling.style.display==’none’ ) { obj.nextSibling.style.display = ‘block’; obj.firstChild.firstChild.src= ‘http://wer.microsoft.com/Responses/include/images/down.gif’ } else { obj.nextSibling.style.display = ‘none’; obj.firstChild.firstChild.src= ‘http://wer.microsoft.com/Responses/include/images/right.gif’ } }

Solve a problem with Windows 7 beta

An issue with the Customer Experience Improvement Program (CEIP) client in Windows 7 beta is causing Explorer and some MSI-based installers to stop working properly.

To solve this problem, follow these steps:

  1. Click the Start button , click All Programs, and then click Accessories.
  2. Right-click Command Prompt, and then click Run as administrator. In the User Account Control window, verify that Program name is Windows Command Processor, and then click Yes.
  3. In the Administrator: Command Prompt window, type or paste the following text at the prompt:reg delete HKLM\SOFTWARE\Microsoft\SQMClient\Windows\DisabledSessions /va /f
  4. Press Enter to install the solution.
  5. If The operation completed successfully displays, close the Administrator: Command Prompt window to complete this procedure. If “ERROR: Access is denied” displays, repeat this procedure from the top, making sure you clicked Run as administrator in step two.

Low and behold … after that the installations are now working again !

January 21, 2009

Windows 7

Filed under: Windows — Ding @ 11:42 am

So like many people I grabbed a copy of the Windows 7 Beta, build 7000.  I must say I am very impressed.  I created a new partition on my home machine, and installed it… in the blink of an eye, if not faster!  It also runs very well on the machine (whereas Vista runs BADDDLY).
Well done I say!

July 1, 2008

Clustering an EV Server

Filed under: Clustering — Ding @ 3:03 pm

I was setting up EV 2007 Service Pack 2 on a Windows 2003 2-node cluster for the last couple of days (so I could work on a repro that I have to do).   One interesting thing that I found was that when I was trying to configure the failover node, it wasn’t giving me a list of all the cluster resource group containing my EV resources.

What I mean is that when I run the Enterprise Vault Configuration Wizard I see this :

If I select the middle option to add a new to an existing cluster I see this :

I should also see my other resource group called EVGroup.

I read through the notes on the wizard screen:

Does my group contain all those resources? Yes.

Is it online on the node in the cluster? Yes.

Why then is EVGroup not listed?  A little snippet of information in the Installing and Configuring Guide led me to find out what the problem was :

Configuring a failover node

Perform this procedure on the nodes that are to act as failover nodes.

To configure a failover node

1 On the node’s Windows Start menu, click All Programs > Enterprise Vault > Enterprise Vault Configuration. The first page of the Enterprise Vault Configuration wizard appears.

2 Click Configure the node as a failover node for an existing clustered server, and then click Next.

3 The wizard prompts you for the name of the resource group for which you want to add the node as a failover node. Select any resource group that is configured to fail over to this node. The resource group must be online on one of the nodes that you have configured as an Enterprise Vault primary node, and its  resources must all have the failover node as a possible owner.


Select the name of the resource group, and then click Next.

4 On the next wizard page, enter the password for the Vault Service account, and then click Next.

5 The next wizard page lists the actions the wizard will take if you proceed. To continue click Next, then click and then click OK to confirm the actions taken.

6 The final wizard page displays a list of the actions the wizard has performed,and the results. Click Finish to exit the wizard.

When I double checked the EV resources didn’t have this node listed as a possible owner :

Now one way to fix this up would be to edit each of the resources and add the second node as a possible owner.  Another way is to take the resources offline on the active node, fail the group over to the passive node (Node B in my case), then fail the resources back to the active node  (Node A in my case).  If you then bring the resources back online on NodeA, the configuration wizard can go through on the passive node !

June 24, 2008

Versioning in Outlook 2003

Filed under: Client, Windows — Ding @ 1:27 pm

I spotted a weird thing today. Installing a bunch of patches for Outlook 2003, and magically without actually installing Office 2003 SP 3, I ended up with Outlook reporting it was SP 3…..

First of all I checked what everything is about on the following link :

http://support.microsoft.com/kb/821549

When I started out, Outlook reported 11.0.6568.6568. This is Outlook 2003 SP 2. All is good.

There is then a bunch of different Office fixes that I wanted to install :

949044
943985
943983
945432
947355
943973
943649
946254
945185

It seems that the following happens :

Then Outlook 2003 Service Pack 2 – version info says 11.0.6568.6568 – SP 2
Installed 945432 – version info says 11.0.8206.6568 – SP 2
Installed 949044 – no change
Installed 943985 – no change
Installed 943983 – no change
Installed 947355 – version info says11.0.8206.8202 – SP 3

How very odd.

http://www.microsoft.com/technet/security/bulletin/ms08-015.mspx is 945432, and changes the version in Help -> About to 11.0.8206.6568. http://www.microsoft.com/technet/security/bulletin/ms08-016.mspx is 947355, and change sthe version in Help -> About to 11.0.8206.8202 … and it then says Service Pack 3.

With Enterprise Vault, Outlook 2003 SP 3 currently isn’t supported on the server, and the EV Deployment Scanner will complain if it detects it.

Older Posts »

Blog at WordPress.com.