Sysprep on Windows XP

26. September 2006 12:31 by Jaguilar in General  //  Tags: ,   //   Comments (0)

A while back I documented the process for doing a Sysprep on a Windows 2003 installation. Well, that same process works for a Windows XP installation. The sysprep GUI on Windows XP is slightly different, but you only need to make sure that the “MiniSetup” and “Pre-Activate” options are selected before pressing the Reseal button and shutting down the machine.

Here are the instructions to run Sysprep on Windows 2003.

Automating windows

25. September 2006 10:22 by smurillo in General  //  Tags:   //   Comments (0)

Do you ever find yourself doing repetitive tasks on your computer? When you are a developer and this happens to you, the tendency is to start thinking about how you can automate that task and if it's worth the effort. You could immediately start thinking about WMI or API's, but there could probably be a simpler and quicker solution, macros.

I remember using the discontinued Macro Recorder on Windows 3.1 and thinking how useful it was. Recently I found myself taking lots of screenshots and adding borders to them using Paint Brush (I know there are lots of image editing tools that could easily do that for me). When I had done it a few times I started remembering the old macro recorder and I thought it couldn't have helped me much on this.

I started looking for modern alternatives and found AutoHotkey and what a long way we've come. It's not just a recorder, you can automate all sorts of stuff, interact with windows and controls, wait for events and automate tasks through hotkeys and hotstrings. Best of all, you work with text scripts that you can edit manually and even compile them into executable files.

Since I have been working on the virtualization scenario for a while now I also think about the impact this can have in terms of virtual machines. For example, perhaps you could add startup scripts that will install applications that could not be included in the image for licensing reasons.

Visual Studio Magazine: Refactor Your Way to Migration Success

19. September 2006 10:19 by Fzoufaly in General  //  Tags:   //   Comments (0)

 This is a very interesting article with yet another way to approach the Visual Basic migration issue.  It demonstrates once more that the process is not only feasible but highly rewarding.

Refactor Your Way to Migration Success

Source: Visual Studio Magazine – Refactor Your Way to Migration Success

 

In addition, I would like to also comment that ArtinSoft's Visual Basic Upgrade Companion product already implements most of the suggested refactorings and thus reduces dramatically the time required to move from VB6 to Optimized .NET.

SCVMM on Domain Controllers

19. September 2006 09:34 by smurillo in General  //  Tags:   //   Comments (0)

While I was playing with System Center Virtual Machine Manager Beta 1 I bumped into a problem when I tried to add a second host. Since the Virtual Server service won't even start on a VM, you can't use a VM as a host; you depend on physical equipment to test SCVMM properly.

We are working with limited resources and the only x64 host available happens to be a domain controller. The other available host is a 32-bit computer, the one we are using to run SCVMM, which we are also using as a host. While trying to add the host we got the following error:

"Error (406) Access denied while contacting the virtual machine host x64svr0x.virtua"

At first we thought it would be a domain configuration problem, it wouldn't be terribly unusual. But everything else was working just fine so we started thinking about other theories. This is very normal for beta versions of a product.

After getting some help from the nice people at Microsoft, I can tell you that if you are having this problem and you are thinking of theories too, you should know that installing either SCVMM or host agent on a DC is not supported in beta1. Keep that in mind if you are testing SCVMM.

Joel Spolsky: Things you should never NEVER Do

19. September 2006 03:57 by Fzoufaly in General  //  Tags:   //   Comments (0)

"When you throw away code and start from scratch, you are throwing away all that knowledge. All those collected bug fixes. Years of programming work. You are throwing away your market leadership. You are giving a gift of two or three years to your competitors, and believe me, that is a long time in software years." Joel Spolsky. -- (The second NEVER in the title is mine, not Joel's!.)

I am not sure if when Joel wrote this quote (to which I profoundly agree) was thinking about automatic conversion of software.  I absolutely agree that if you have a running applicatiion and you want to move it to a new platform, a rewrite from scratch is the WORST possible option.  You would not believe how frequently I see this happening in my day to day work at ArtinSoft.

When you can automatically transform your source code to a new language you can have the best of both worlds.

Let me explain.  With automatic conversion you maintain all the knowledge that is embedded in your current application.  At the same time, you are able to move your source code to the more modern environment and immediately be able to take advantage of the new features and to effectively extend the life of your code.  The cost of migration of programmers skills is also reduced dramatically by the automatic upgrade approach.  What is the most difficult aspect to learn for a programmer?  Is it the new language or the inner workings of an application?  I would argue it is the second aspect.  Programmers are very adaptable in terms of technology, but learning the intricacies of a business model supported by an application can take years!  Again, the automatic migration approach allows a smooth transition for a programming team.  All the knowledge they had about the application is still there.  In fact, they can easily study the converted code and learn from it.  It is much easier to start modifying an existing program than creating one from scratch when you have never programmed in a certain language.

In summary, Joel is right.  You should NEVER throw away your code.  Automatic Upgrade from Visual Basic 6 to Visual Basic .NET is an excellent option to modernize your app while maximizing its ROI.

Getting started: Tips for VB6 to VB.NET 2.0 migration

19. September 2006 02:49 by Fzoufaly in General  //  Tags:   //   Comments (0)

 Some comments to the VB Upgrade Guide and how to approach the Migration exercise.

Link to Getting started: Tips for VB6 to VB.NET 2.0 migration

 

An excerpt of the above page that I believe is important to always remember when approaching a migration:

Functional equivalence
A migration of any kind tends to face a quandary. "As long as this application is being moved over," someone will ask, "why don't we add some features?"

In organizations large and small development managers are constantly pressed to create new functionality, but the essential goal when you move an application is to create a baseline reference of the app and the development team. How long does it take to develop/migrate? What has to be done? Does it still work the same? These are questions you need to answer, but cannot answer with assurance, if your application has morphed into something new.

Said Pleas, "When you add a feature, you are satisfying somebody's need and that can be important if they have the budget." It can be difficult to focus on the objective of learning as you migrate, Pleas indicated, but that is just what is needed if you are to achieve a successful outcome.

"It is very important to separate the actual migration project from further advances, said Eugenio Pace, product manager, Patterns & Practices, Microsoft. "We have found separating the migration [from other functional development] is very pivotal."

"It is important because you now will have a baseline against which you can test. If you had a test [before in the VB6 version], the application should now perform in the very same way," he said.

Achieving a "functional equivalent" is crucial, said Fedrico Zoufaly. As Zoufaly, Pleas and their co-authors point out in their migration guide, the process that you use becomes a key factor in upgrade projects. Maintaining functional equivalence as you move into the new technology is highly recommended.

Put another way: Take something over that you know is working in COM or DCOM and then you can actually see what is needed to make it work in .NET.

Thomas F. Abraham - On Technology : Code Conversion Tools - VB6 to VB.NET, Java to C# and more

19. September 2006 02:33 by Fzoufaly in General  //  Tags:   //   Comments (0)

Thomas, Thank you for your comments on ArtinSoft's technology. 

Link to Thomas F. Abraham - On Technology : Code Conversion Tools - VB6 to VB.NET, Java to C# and more

My blog has many links towards resources that can simplify the migration process and make the CIO justification much more palatable!

Expert's tips on SCVMM (Carmine)

11. September 2006 09:46 by smurillo in General  //  Tags:   //   Comments (0)

Clive Watson has been testing the new System Center Virtual Machine Manager Beta 1 and he has posted some articles about it on his Weblog. All of these parts together end up being a very nice user guide for this version of SCVMM:

Part 1: Introduction
Part 2: Host Groups and Self-Service policies
Part 3: Views for Hosts and Virtual Machines
Part 4: Adding a new Host
Part 5: Filtering views
Part 6: Host’s Managed Properties
Part 7: PowerShell
Part 8: PowerShell (cont’d)
Part 9: How to create a Virtual Machine
Extra: Can you help the help?
Part 10: Remote control
Extra: Summary and Diagram
Part 11: Template and Profiles

Extra: SCVMM Self-Service FAQ update

Since this is a Beta 1 version there is not a lot of documentation for you to start playing with it. Clive Watson has done a very good job on this, it’s really helpful and it can lead to a better testing of the product.

How to run Visual C++ Binaries in a 64-bit Machine without Visual Studio installed

11. September 2006 06:28 by Csaborio in General  //  Tags:   //   Comments (0)
Fact: You cannot install Visual Studio on an Itanium box - this is a "by design" issue and the installer will not budge regardless of what you try.

So if you are building binaries from Visual C++, how do you manage to make them run given that most of the libraries they need will not be found on the Itanium box?

One workaround is to statically link your binaries - which oftentimes lead to bloated sizes and defies the whole purpose of using dynamically linked libraries.

Another one is to install the Visual C++ Runtime libraries for Itanium and x64:
Install these on your 64-bit server and C++ binaries will run in all of their glory.  With Remote Debugging and these utilities installed, you won't even need a RDC to the 64-bit box to run your code.  Happy coding!

Detecting Virtual Machines

11. September 2006 05:09 by smurillo in General  //  Tags:   //   Comments (0)

I was a firm believer in the fact that an application could not for sure detect that it was running on a Virtual Machine. I had thought of things like checking if the VM Additions were installed, or checking if the hardware devices in the system matched those used by Microsoft's Virtualization products, but I still thought these techniques could not be conclusive enough, not beyond ALL reasonable doubt.

Then I decided to look for solid ways to detect if an application is running on a Virtual Machine. This could be helpful for example, if you want to release a time-limited trial version of an application you are developing and you want to restrict it from running on a VM.

Turns out if you check the motherboard on a Microsoft VM you are going to find that it was made by Microsoft. Since Microsoft doesn't really make motherboards (yet?), this is a clear indicator that you are in the presence of a VM. You can find a programmatic way to do this on Virtual PC Guy's Weblog. Of course if Microsoft decided in the future to start manufacturing motherboards your applications will refuse to work on some physical machines too :-)

I also found an interesting article on The Code Project website, that uses an exception method to detect a VM running on Virtual PC. And it also includes a technique for VMWare.

Turns out it is not impossible after all, there are plenty of ways you can find in the Web to detect when your application is running on a VM. Just be careful to choose one that is trust worthy and use it wisely.

Video demos

8. September 2006 15:28 by Jaguilar in General  //  Tags: , ,   //   Comments (0)
We just posted the last of three video demonstrations that I recorded. They are for the Informix 4GL to Java migration tool, JLCA Companion and the VB Upgrade Companion Enterprise Edition Demo. The videos outline the main points of each tool, how they work, and also contain a quick demonstration of a migration of a small application. You can check them on the Demos section of the downloads page.

PowerBuilder Migration

6. September 2006 05:48 by Mrojas in General  //  Tags:   //   Comments (0)
Powerbuilder is a nice language but is little propietary and the developer comunitty is not as big as the .NET or Java ones. It imposes some risks on Powerbuilder projects.
That why some shops have started moving some of their inhouse applications to other platforms.
Personally I feel that .NET is the more natural platform for migration. Even more there is now a datawindows.NET component. DataWindows are the core of any Powerbuilder application and using this component really makes it easier to migrate a PB application.
In my following post I will describe examples using the Datawindows.NET component to migrate some PB samples.
For more info on DataWindows.NET

Component Services and one of those weird small things

5. September 2006 04:46 by smurillo in General  //  Tags:   //   Comments (0)

While Jose was testing a Lab I have been working on, he found himself getting an error I wasn't expecting. The exercise requires for the user to change the Default Impersonation Level on the computer where an application will access COM object using the Impersonate level. So, it is kind of simple, the exercise described how to access Component Services, go to the Computer's Properties and change the Default Impersonation Level; after which it should be sufficient to click on the OK button and suppose Component Services has made the change by then. Think again!

Well, what I can tell you is that at least in a Windows XP Professional Edition running on a Virtual Machine using Virtual Server 2005 R2, you get one of these errors that you would probably never notice, but if it came up, it could drive you insane. Component Services doesn't register the change until you do something else inside the Component Services windows, after you click on the OK button; anything at all: click on an icon, navigate the tree, close the application, whatever you want, but you will need to do something that triggers an event. Once you do that, you are good to go.

Visual Studio unattended install

4. September 2006 14:55 by Jaguilar in General  //  Tags:   //   Comments (0)

If you ever do a Visual Studio .NET 2005 unattended install, you’ll notice that the installation reboots the machine several times and won’t continue until you log back in – defeating in part the purpose of the UNATTENDED install.

Well, this page over at Aaron Stebner's WebLog has some instructions that can help you make your installation REALLY unattended. It requires two things: first, remove some pre-requisites that end up on the vs_2005.ini files regardless of what you do (instructions here), and second, create a batch file that installs both the prerequisites and VS.NET. This is the code in the batch file for the unattended install on x64 boxes (run it from the VS dir):

wcu\msi31\WindowsInstaller-KB893803-v2-x86.exe /quiet /norestart
wcu\dotNetFramework\x64\netfx64.exe /q:a /c:"install.exe /q"
wcu\DExplore\DExplore.exe /q:a /c:"install.exe /q"
setup\setup.exe /unattendfile vs_2005.ini

For other machines, you may need to change the architecture of the .NET framework for the correct one (x86/x64). I made that batch file for an unattended install a few months ago at a 64–bit event where I had to install Visual Studio in around 30 machines, and it worked like a charm. YMMV

Excellent tip... Mounting a .VHD by double clicking on it

4. September 2006 04:29 by Jaguilar in General  //  Tags:   //   Comments (0)

Last Friday on the Virtual PC Guy's WebLog,  Ben Armstrong, Virtual Machine program manager at Microsoft, posted a registry code snippet to mount vhd files by double clicking on them, and dismount them by using the right-click menu. You can get the code from here. I also recommend that you check out VPC guy’s blog every once in a while – his posts are always useful and interesting.

What's good about VHD Mounting?

4. September 2006 03:48 by smurillo in General  //  Tags:   //   Comments (0)

Microsoft uses and supports their VHD (Virtual Hard Disk) format on their virtualization products: Virtual PC and Virtual Server. You can get full access to the detailed specification online by signing the Virtual Hard Disk Image Format Specification License Agreement.

As you may have heard, Virtual Server 2005 R2 SP1 BETA2 (quite a name) is out now (read Jose Aguilar's post on it for more details) and it includes Offline VHD mounting. This feature was already planned to be included in System Center Virtual Machine Manager, but it is sure nice to get it now with Virtual Server. So what is the big deal about this? What Offline Mounting does is, it lets you mount your VHD files as if they were real drives on your server and it lets you do all the reading and writing you want.

Before this very handy feature existed, if you wanted to copy some files from or to your VMs you would have had to create a virtual machine, link it to the VHD, run it, and use the Virtual Network to make the transaction between the server and the VM. With Offline Mounting this task becomes quite a lot easier and you can skip a few of those in between steps. You can access Brian A. Randell's blog for more details on how to do this.

In the end, Offline VHD Mounting is all very nice but some of you may have noticed it brings up a bigger possibility, Offline Patching. If you have a company and you want to cut expenses on your Disaster and Recovery Sites this is a topic that should really gain your attention. Microsoft is definitely using Offline VHD Mounting as a message that they are heading towards an Offline VM Patching solution (Microsoft has hinted about this on a few ocattions). Since Microsoft's Virtualization Licensing policies only charge for those VMs that are actually running, you can picture the economic impact this is going to have in the future, your Back-up sites will not even have to run unless a disaster does happen.

Offline VHD Mounting is not just a nice new feature that will help you speed things up, it is also Microsoft's announcement on what's to come!

Vista RC1 Completed

1. September 2006 13:09 by Jaguilar in General  //  Tags: ,   //   Comments (0)

Windows Vista RC1 was completed today. From the Windows Vista Team Blog:

It’s official — Windows Vista RC1 is done!
...
You’ll notice a lot of improvements since Beta 2. We’ve made some UI adjustments, added more device drivers, and enhanced performance. We’re not done yet, however — quality will continue to improve. We’ll keep plugging away on application compatibility, as well as fit and finish, until RTM. If you are an ISV, RC1 is the build you should use for certifying your application.

Right now it is only available for customers on the TAP program, but according to a post in the forum, they plan to make it available to MSDN and Technet subscribers.

Volume Shadow Copy Service and Virtual Server ... what's in it for me?

31. August 2006 12:01 by Jaguilar in General  //  Tags:   //   Comments (0)

One of the features available in the latest Beta of Virtual Server 2005 R2 SP1 is the support for the Volume Shadow Copy Service (VSS). VSS is a feature of Windows 2003 server that takes “snaphots” of files, and allows you to quickly create a backup copy of a volume.

For an application to support VSS, it needs to get to a consistent state, freeze, and the perform the shadow copy. Once the shadow copy is created, the application thaws and resumes operations. If an application does not have a VSS provider, VSS cannot guarantee that the resulting shadow copy will be consistent. That is one of the best features of this technology – the actual applications (called “Writers” in VSS-speak) are involved in the creation of the shadow copy, so they can verify that whatever goes into the copy can be later restored without any problems.

By supporting VSS, backup programs (“Requestors”) can now tell Virtual Server that a backup is going to take place. Virtual Server can then make sure that the Virtual Machines are in a consistent state (I”m not sure if it suspends the VMs – I’m currently in the process of finding out that information), and tell the requestor that it is ready for the copy. According to the documentation, creating a shadow copy is very fast – for large volumes I’ve heard numbers of around 30 seconds to 4 minutes. This can also work for quickly cloning a Virtual Server host to another server, so that VMs can resume operations very quickly even if the system goes down.

Virtual Server 2005 R2 SP1 BETA2 is out

30. August 2006 22:00 by Jaguilar in General  //  Tags:   //   Comments (0)

You can now download Virtual Server 2005 R2 SP1 BETA2 from http://connect.microsoft.com. As with other beta software, you need to register for the beta first.

This release is pretty significant because it is the first version to support both AMD-V and Intel-VT hardware virtualization. From the release notes, it includes:

  • AMD Virtualization (AMD-V) compatibility
  • Intel Virtualization Technology (IVT) compatibility
  • Volume Shadow Copy Service support
  • Offline VHD mounting
  • Active Directory integration using service connection points
  • Host Clustering technical white paper

The best part is that you can upgrade existing installations very easily:

VSUPGRADE

I just upgraded my 32–bit workstation, and everything is working like a charm.

OT: What to do in case of an accident in the USA

29. August 2006 16:11 by Csaborio in General  //  Tags:   //   Comments (0)
On a completely non-technical note, I thought I'd share with my fellow colleagues (and anyone who searches for this info), what to do in case of a car accident in the United States.

See, in Costa Rica, whenever you are in a car accident, you leave your cars as they are until the police officer decides to drop by.  This is mainly done because in Costa Rica, many people drive without insurance, so they will go any length in trying to avoid to pay for the damages they have done.   The only way to get them (guilty counterpart) to pay is by having the cop see the accident scene as  it happened and then settle in court.  This, of course, leads to massive traffic when an accident happens.

Anyhow, back to the accidents in the US story.  I had the (dis) pleasure of being in an accident last Saturday in Boston.  I had the honor of being crashed by none other than "Paul from Revere", on his slightly big tank car.  Here is what they look like:






Yeah, that's right, the amphibious tank smacked me real good and left quite some damage on my rented car:




So here is what you need to do if ever on an accident in the US:

  1. Move your car out of the way to avoid traffic congestion (your inner Costa Rican conscience will make it very hard to accomplish this task).
  2. Find out if everyone is alright, call 911 otherwise 
  3. You need to find out the following info from the driver who crashed your car: Name, Address, Company, Insurance Company, Insurance Claim Number
  4. Write down the time and street name where the accident happened
  5. Write down the names and numbers of some witnesses around who can corroborate what happened
Once you have collected this info, call your company insurance and file a claim.  You will also need to file a report in the accident form that is usually found in the glove compartment of your rented car.

Hope this helps someone in the future!


Categories