So as you all know I am a Non-MVP for Commerce Server 2007 however I have worked tirelessly with this server. I know a ton of the in’s and outs of the architecture and have written a good number of scripts and modified others scripts to work.
Recently I have had the pleasure of making Commerce Server 2007 run (play nice) with Windows Server 2008r2. This was interesting in many many ways to which I will document down the road.
For this post I wanted to share a great little script that helps with your own or the default “PUP” install.
As those of us that have installed Commerce Server 2007 on multiple machines architectures and what not know when installing the “PUP” it is important to keep the “default” web site intact. Also if you can help it, Not to have any other sites running or created in IIS6 - IIS7.5. However you may have some installed and the APP ID’s all randomized (default behavior for IIS (all versions)). The “PUP” installer may have issues with “other” web sites running in IIS.
So to check what may be causing these issues try running my happy little script.
Put the following code into a vbs and run.
'The code below simulates Commerce Server Site Packager checking IIS health.
'This IIS checking happens when you click the "next" button at the first dialog of the Site Unpacking
'This code helps you to find out where the checking fails
sLocalMachine = oNet.ComputerName
Set webServer = GetObject("IIS://" & sLocalMachine & "/w3svc")
msgbox "Web Server "+ sLocalMachine +" has the following Web Sites:"
For Each webSite In webServer
If IsNumeric(webSite.Name) Then
sName = webSite.Name
msgbox "Web Instance Number: "+sName
sComment = webSite.ServerComment
msgbox "Web Site Name: "+sComment
Foo = webSite.ServerBindings
msgbox "Port "+Foo(0)
Set vroot = webSite.GetObject("IIsWebVirtualDir", "Root")
msgbox "Root: "+vroot.path
Enjoy! Let me know how it goes.