2009-09-18

Windows 7 boot remove

Thought I would share this with Windows 7 (beta and non beta) users, if you are running XP and removed Win 7, but can't get rid of the boot record "your pc attempts to dual boot still" you can use this command along with disk...

In XP, put in the Win 7 disk, go to Start, Run, then type this into run window...

whatever drive your Win 7 disk is in, eg..D,E:\boot\bootsect.exe /nt52 ALL /force

Click Ok.

Take out disk, restart the computer, you should then boot right to XP.

2009-09-13

Invalid object name 'sys.configurations'. (Microsoft SQL Server, Error: 208)

 

 

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

image

Perhaps you wanted to try Azure and especially SQL Azure. Maybe you wanted to connect to your SQL server in the cloud (especially as Microsoft provides a connection string) through Microsoft SQL Server Management Studio (MSMS). Forget that for now. Microsoft has no support for this currently.

There are some workarounds. You can, while in the Management Studio, open a new connection. Login. You will get an error. Click ok. Now, you can browse your tables but you can atleast peform SQL queries.

Guess we have to wait for the final release.

2009-09-07

Windows live writer

This is a first test using Windows live writer. Let see if this post can be done!

Kian

This is Kian – almost 6 months and already facebooking!

2009-01-07

TF31003: Your user account does not have permission to connect to the Team Foundation Server

My bad concience of not spreading my experience regarding this error led to this post. I noticed this strange popup error when I wanted to add a new user for accessing my Team Foundation Server. It was nothing wrong with the actual user, rather, I discovered it had something to do with accessing it from another computer. I could not even log in with my existing user from a remote computer without getting this error.

I found a solution and I have no idea if it is a good or bad fix - but it works. If someone knows that this is a stupid solution and have a better one then please tell me.

I figured out that it had something todo with the computer/domain name. So, I went into C:\Windows\System32\drivers\etc and edited the hosts-file. I added the ip and a name for that ip. I saved the file. Then I opened VisualStudio again and added that servername. The server name can be anything as long as it is pointing to the correct ip.

2008-12-30

pxhelp20.sys, x64 and Sony Picture Utility

My wife wanted to convert some AVCHD videos to a smaller format. I know there are tons of programs for that but I decided to use the free utility that came with our video camera SONY HDR-SR8 - the "Sony Picture Utility".

Everybody knows, that have worked with video that these kinds of tasks take time and CPU. So, I wanted to use some excessive CPU on my Windows 2008 Server - using latest Xeon CPU. This server is 64 bit operating system. I installed the software. It asked me to reboot. Since I only saw pictures and no videos I decided that maybe I had to reboot. By the way, I hate software that requires reboot!

Rebooting..It does not start..Moving a screen to the Server shows that Windows can't start because "pxhelp20.sys is corrupt or missing" - location \Windows\SysWOW64\Drivers\pxhelp20.sys. It seems like this driver is used by a lot of dvd tools and also the Sony Picture Utility. I started my Windows CD for repair but repair did not repair. My only way was through the command prompt. The file was there! I did not have any other 64 bit Windows 2008 so I asked a friend to send me same file for Vista x64. Replaced the file - same error. I was starting to getting nervous because I had a database on that Server that needed to be up and running. As a last option I deleted the file from the command prompt and hey, Windows started.

While this was a success in the end the story does not end here. I quickly noticed that all my cdroms where gone. Even Deamon Tools drives. This was not critical but needs to be solved.

Updated 2009-09-13:

Thanks to Junior-PL I got a solution:

1. Start->Run and open regedit
2. Go to HKEY_LOCAL_MACHINE/SYSTEM and open key CurrentControlSet/Control/Class/{4D36E965-E325-11CE-BFC1-08002BE10318}
3. There may be a lot of keys with this name but search for one that has (default) value DVD/CD-ROM drives
4. Now, when you have found this one you delete strings "LowFilters" and "UpperFilters" (if existing)
5. Reboot and pray (should work!)

2008-12-29

PAP2-T, Gigaset SL780 and change of time

Recently I "updated" my home telephony to IP-telephony. I was installing the Linksys PAP2-T IP telephony adapter together with the new Siemens Gigaset SL780 phone.

Everything worked great except one thing. I noticed, that sometimes the time on the phone was set back 7 hours. Finally, I found that this happened when someone called us. The support at Siemens had no clue - of course..

I had a hunch that the time from the PAP2-T was sent over to the phone which proved to be true. When browsing the web interface of the adapter the timezone was 7 hours off. Changing this and making one call to myself set the time right. I am not the average consumer which leads me to the question:

How in the world are we ever able to move over to new technology when setting the time on a phone requires browsing a telephony adapters web interface and change properties? New technology should be easy to implement!

2006-06-29

"Specified Service Already Exists"

I ran into this problem when creating a setup in .NET and choosed "Repair" at a later stage. The problem was due to that I was creating my own Custom Actions. When doing a "Repair" the custom install action is run as well. To prevent this you need to add: "Not Installed" at the Condition property of the Custom Action.

2006-06-12

Problem - loop through a repeater for controls

I was using ASP.NET, C#, and wanted to auto translate some controls on a Page. I had no problems looping through controls like the GridView but when I tried the Repeater control I ran into problems. No controls or items were found when looping through it.

The problem was that the controls/items were created at a later stage than Page_Load where my function was executed.

I moved my function to Page_PreRender and everything went just fine..

2006-04-30

ToolStrip and it's responsiveness

I had a problem with the new .NET 2.0 component "ToolStrip". The problem appeared when switching between forms within an application by clicking on one of the toolstrip buttions. The first click was not "catched" as an event. This was really annoying and I was near switching to the toolstrip components of Infragistics.

First I found a quick solution. I added the event "MouseHover" and then focused on the toolstrip like this:

Private Sub tolMain_MouseHover(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tolMain.MouseHover
tolMain.Focus()
End Sub

It worked but it seemed unnesseary. I did a quick search on the Internet and I found a post from one who had faced and solved the problem. Read more about it here: http://blogs.msdn.com/rickbrew/archive/2006/01/09/511003.aspx

He hade made a C# example and here is my code, converted to VB.NET:


Imports System.Windows.Forms.ToolStrip
Public Class ToolStripEx
Inherits ToolStrip
Private bolClickThrough As Boolean = False

Public Property ClickThrough() As Boolean
Get
Return bolClickThrough
End Get
Set(ByVal value As Boolean)
bolClickThrough = value
End Set
End Property

Public Sub New()
MyBase.new()
End Sub

Protected Overrides Sub WndProc(ByRef m As Message)
MyBase.WndProc(m)
If bolClickThrough Then
If m.Msg = NativeConstants.WM_MOUSEACTIVATE And m.Result = CType(NativeConstants.MA_ACTIVATEANDEAT, IntPtr) Then
m.Result = CType(NativeConstants.MA_ACTIVATE, IntPtr)
End If
End If
End Sub
End Class

Friend Class NativeConstants
Friend Const WM_MOUSEACTIVATE As UInt32 = 33
Friend Const MA_ACTIVATE As UInt32 = 1
Friend Const MA_ACTIVATEANDEAT As UInt32 = 2
Friend Const MA_NOACTIVATE As UInt32 = 3
Friend Const MA_NOACTIVATEANDEAT As UInt32 = 4
End Class

2006-04-24

Long time no blog

There have been a lot of work on VisualCron lately. There is a clear roadmap but sometimes I get busy on sidetracks - smaller o bigger requests by customers. Luckily, my dad, a professional tester has been there helping with testing and documentation.

On the personal side, I have a lot of things that I look forward to. First, the average temperature is increasing every day. Second, there will be a lot of traveling this year. In the end of May, me and Neda are traveling to Istanbul, Turkey. In July we will travel to Malage in Spain. Later in the autumn, me and my friends are going to London.

I haven't had the time to work with the studio yet. Hopefully there will be more time soon..

2006-01-25

WMI Adventures - "Invalid Class", "Not Found" and "Access Denied"

I was trying to monitor the registry with WMI - Windows Management Instrumentation. I could find almost everything in the namespace "root\CIMV2" for my needs except for registry changes. Those where located in "root\DEFAULT" and did not use the regular WQL polling operator "WITHIN".

I searched for examples on the net using C# or VB.NET. The net was quite dry on this subject. I found some examples but when implementing those I got "Invalid Class". After some testing I found that you need to specify the class in the EventQuery. And the class changes depending on the type of registry query you want todo.

Registry changes are divided in three parts:

RegistryTreeChangeEvent - Monitors changes to a hierarchy of keys.
RegistryKeyChangeEvent - KeyPath Monitors changes to a single key.
RegistryValueChangeEvent - ValueName Monitors changes to a single value.

This is a VB.NET example:

Dim evQuery As New WqlEventQuery()
evQuery.EventClassName = "RegistryValueChangeEvent" <--- here you specify the classname which should match the "tablename" in the querystring evQuery.WithinInterval = New TimeSpan(0, 0, 0, 10, 0) evQuery.QueryString = "SELECT * FROM RegistryValueChangeEvent WHERE hive = '" & _ "HKEY_LOCAL_MACHINE" & "' AND KeyPath = '" & _ "Software\\Activision" &amp;amp; "'" & _ "AND ValueName='mamma'"

So remember to change the EventClassName depending on the tablename.

While testing I also stumbled upon the ManagementException "Not found". This error is due to that there is not match in the WQL. Maybe you have specified the wrong KeyPath or your are missing the double backspace.

The error "Access denied" is however not solved. I am getting the error when using the LIKE operator in WQL. If you have any idea about this the please comment that :)

2005-12-20

MSMQ permissions needs a "touch"

Recently I was working with a project where I needed to set up some MSMQ queues at the install phase. I realized I needed to change the security attributes when converting the c# application to a windows service. After scraping the web I found a way to set attributes.

The install went fine but when trying to access that queue I still received errors about permissions. I looked in the MSMQ attributes for that queue in Administrive tools. All was set right. After unchecking and then rechecking a box followed by Apply it worked again. A bug! This workaround/step would not be accepted by the end customer so I had to find a work around. After some testing I found that I could use the function SetPermissions on a queue after setting the permissions in the install. The result looks like this:

// local system account
Trustee t1 = new Trustee();
t1.Name = "SYSTEM";
t1.TrusteeType = TrusteeType.User;
t1.SystemName = ".";
AccessControlEntry ace1 = new AccessControlEntry();
ace1.EntryType = AccessControlEntryType.Allow;
ace1.GenericAccessRights = GenericAccessRights.All;
ace1.StandardAccessRights = StandardAccessRights.All;
ace1.Trustee = t1;

// any other computer
Trustee t2 = new Trustee();
t2.Name = "Everyone";
t2.TrusteeType = TrusteeType.Group;
t2.SystemName = ".";
AccessControlEntry ace2 = new AccessControlEntry();
ace2.EntryType = AccessControlEntryType.Allow;
ace2.GenericAccessRights = GenericAccessRights.All;
ace2.StandardAccessRights = StandardAccessRights.All;
ace2.Trustee = t2;

AccessControlList acl = new AccessControlList();
acl.Add(ace1);
acl.Add(ace2);
MSMQInstaller.Permissions = acl;

// This corrects a bug when previous settings are not correctly applied
// Using the SetPermissions after adding the accesscontrollist applies previous settings
// Remember to use Allow below to keep existing settings
MessageQueue m = new MessageQueue(MSMQInstaller.Path);
m.SetPermissions("SYSTEM", MessageQueueAccessRights.FullControl, AccessControlEntryType.Allow);

2005-10-13

Every day is a new day

I has been a while since I last posted here. I have been spending a lot of time on VisualCron. The future of VisualCron is becoming more clear. There are still of lot of things to implement but the foundation feels very stable.

The "singing-booth" is also ready now. It's a black rectangle, 1.2 * 1.5 meters with 2.2 in height. It is painted black now and I have put up some diffusers. It looks quite good and it sounds very good. I may post some pictures here later. I have to spend some time singing every day. Training singing is like training a muscle. I am very "untrained" right now but a little practice will do the trick!

Both my friend DJ and I have had very little time over to spend on our new project. But it will get better! Our next meeting is on sunday and hopefully everything will be clearer then!

2005-09-07

X-Station finally here

I received my X-Station this monday. Finally. I played around with it for a while. I am a newbie on that area but I got it working with Reason 3 and upgrade the firmware.

At the same day I bought Battlefield 2. Now I am stuck on that one too!

This month will be hectic. A lot of happenings will occur. As usual, besides the music project and BF2, I have another project going on with my friend DJ. Can't tell you anything about it yet but we hope that our idea is as great as we think! :) We'll be finished, hopefully, in the middle of November. But that's a very tight schedule! ;)

Neda and I has booked a trip to London the 16th of December. Just for the weekend. Can you imagine that I have never been there before?!

2005-08-21

VisualCron 2.5.0 released

Finally, after many weeks of work the version above of VisualCron is released. This version was an important step for me and VisualCron.

I have listened to a lot of user requests and implemented the most important things, you can read a list of changes here. Hope you'll like it!

My personal life has been suffering and I hope that this version will calm down most of the users for, at least, a shorter period. So after another weekend of work I go to sleep and wake up to my regular work again ;)

2005-08-19

Free caribbean cruise

I just got a computer, automated call on my home phone saying that I won a caribbean cruise like this:

Congratulations! You’ve won a free caribbean cruise. To reclaim your prize, press 9. That’s the nine-key on your telephone.


I didn't press 9 - I hung up and I think that you should do it too because I have heard that they will charge you 800 Euro and you won't get any trip :)

2005-08-12

Result is what counts

I have not been lazy - I have just been busy like a bee. In the previous weeks I have dreamt about VisualCron and worked late nights. A lot of important steps has been made both which I have mentioned before and new ones.

You, VisualCron users out there, has been lucky because the fact that I have not received my X-Station yet.

I expect the VisualCron release to be within 2 weeks from now.

2005-07-26

Going to Sicily

The clock is 5 am and in less than two hours Neda and I go to Giardini-Naxos in Sicily. It's really hot there right now, about 38 degrees Celsius.

Last week I were with my friends in Gotland, Sweden. The weather was bad but it did not affect the partying! Anyway, I used some of the bad weather to develop VisualCron and the new features are doing great.

The cab is waiting now!

2005-07-12

X-Station delayed..

I received a mail today saying that my X-Station was delayed. "Hopefully" it would come in stock at the end of this month. We'll see, I was thinking of swapping to an M-Audio Ozonic but I don't like the idea of firewire and it has no synthesizer. Cheaper though. I don't have the time anyway right now :) so I'll guess I wait.

Another hot day today. This evening I am going to the gym. Finally I am back on track :) Have I felt this feeling before? ;)

2005-07-11

Soon vacation..

It's been a lot todo lately. Both at work and home. This week is the last before my three weeks of vacation. A short vacation this year.

It's hot in Sweden. Today it is 32C and it has been like this for two weeks now.

There are many things to finish up before the vacation. I hoped to have a new version of VisualCron before the vacation but that seems hard now. I made a version but wasn't satisfied with that design, so now I am redesigning it - hopefully you'll like it. I have received a lot of interesting emails from interesting people lately. It's nice to get to know you, who you are - you out there!

A major event of this week is the arrival of my new toy. Hopefully it will be delivered by end of this week. It isn't crucial because I have so many other things todo so I can't play with it. Are you curious? :) It's a Novation X-station, a midikeyboard with integrated synth, soundcard and mic preamp. I am also building a cube for recording songs. The strategy is to order some sounddiffusers from Germany. I am not sure what will be produced - it's just for fun! But maybe I'll place a link here later!

About vacation. This year we are leaving, all of my friends to Gotland. Gotland is a small island which belong to Sweden. Next, me and my girlfriend are leaving for Sicily, Giardini-Naxos. After that, we'll visit my parents cabin in "Värmland".

Time to go home for today!