Installation problems

Oct 27, 2010 at 9:58 AM

Hi,

I've downloaded the source code (v52263), compiled it but when I try to run \NodeXL-52263\NodeXL\ExcelTemplateSetup\Debug\setup.exe, installation process stops with following message:

Error 1001. The Visual Studio Tools for Office solution was signed by an untrusted publisher and as such cannot be installed automatically. Please use your browser to navigate to C:\Program Files\...\Microsoft.NodeXL.ExcelTemplate.vsto in order to install the solution manually. You will be prompted if the solution is trusted for execution.

Does anyone know how to get rid of this error message and install nodexl normally?

NOTE: My platform is Windows 7 with Office 2010.

Oct 27, 2010 at 4:41 PM

First, I assume that you need to customize the NodeXL source code, which is why you're downloading and rebuilding it.  (I say that because the way to "install NodeXL normally" is to download the latest default release, which contains a prebuilt Setup program, sans source code.)

If that's the case, please download the latest source code from the Downloads tab, not the Source Code tab, then rebuild the latest source code and try running your built Setup.exe again.  (As of today, the latest source code release is named "NodeXL Source Code, version 1.0.1.153.")  After CodePlex upgraded their TFS servers a few months ago, I had nothing but trouble trying to sync to those servers.  I finally gave up and packaged the source code as a Zip file on the Downloads tab.  Unfortunately, I can't figure out how to either disable the Source Code tab or add a note to it to point users to the Downloads tab.

If you still get a Setup error with the latest source code, let me know and we'll figure it out from there.

-- Tony

Oct 28, 2010 at 9:38 AM

Hi, yes your assumption is correct, but I've already customized v52263 and I need to deploy this version on Office 2010. Beside, v1.0.1.153 is still in beta version or I am wrong?

Oct 28, 2010 at 12:11 PM

Hi again. Ok, I've moved my functionalities to the version you suggested to me (version 1.0.1.153.) and when I try to build ExcelTemplateSetup project, it report me the following error:

'PostBuildEvent' failed with error code '1' 'Unspecified error'  D:\NodeXL-1.0.1.153\NodeXL\ExcelTemplateSetup\ExcelTemplateSetup.vdproj

Then when I clear PostBuildEvent field in ExcelTemplateSetup.vdproj and build the project again, it compiles successfuly. Now when I try to run setup, same message (from first post) appears.

"Error 1001. The Visual Studio Tools for Office solution was signed by an untrusted publisher and as such cannot be installed automatically. Please use your browser to navigate to C:\Program Files\...\Microsoft.NodeXL.ExcelTemplate.vsto in order to install the solution manually. You will be prompted if the solution is trusted for execution."

Any advise, please?

 

Oct 28, 2010 at 4:52 PM

NodeXL is always in a beta version, due partly to our biweekly release schedule but mostly to our not having a formal test team.

You need to figure out why the PostBuildEvent is failing on your machine.  It succeeds on the two build machines I just tried it on, so we need to know what is different about yours.  You cannot just remove the PostBuildEvent and hope for the best, because among other things, the PostBuildEvent changes an attribute of a security-related custom action.  Failing to change that attribute could explain the second error you're seeing, the one about the untrusted publisher.

The PostBuildEvent consists of a chain of command-line commands separated by "&&".  I'm including a reformatted version below to make it easier to read.  Most of the commands use the CScript host and a script file called WiRunSQL.vbs.  The latter is included in the NodeXL source code, but CScript isn't.  Could the problem on your machine be with CScript?

Try this experiment:

1. Create a file called "C:\Temp.vbs" containing this text: WScript.Echo "Hello"

2. Replace the PostBuildEvent with this: cscript C:\Temp.vbs

3. Try building ExcelTemplateSetup again.  Does it build?

If it fails, then there is a problem with running CScript on your machine.  If it succeeds, try replacing PostBuildEvent with the first command in the original PostBuildEvent text, removing the first "&&" and everything that follows.

-- Tony

Oct 28, 2010 at 4:52 PM
Edited Oct 28, 2010 at 4:59 PM

Reformatted PostBuildEvent text:

cscript $(ProjectDir)..\BuildTools\WiRunSQL.vbs "$(BuiltOuputPath)" "INSERT INTO Property(Property, Value) VALUES ('DISABLEADVTSHORTCUTS', '1')"
&&
cscript $(ProjectDir)..\BuildTools\WiRunSQL.vbs "$(BuiltOuputPath)" "INSERT INTO Property(Property, Value) VALUES ('REINSTALLMODE', 'amus')"
&&
cscript $(ProjectDir)..\BuildTools\WiRunSQL.vbs "$(BuiltOuputPath)" "UPDATE `CustomAction` SET `CustomAction`.`Type`='1025' WHERE `CustomAction`.`Action`='_AE0E13D9_C687_441D_9819_3FDABBC7F124.install'"
&&
cscript $(ProjectDir)..\BuildTools\WiRunSQL.vbs "$(BuiltOuputPath)" "UPDATE `Control` SET `Control`.`Attributes`='1' WHERE `Control`.`Dialog_`='FolderForm' AND `Control`.`Control`='FolderLabel'"
&&
cscript $(ProjectDir)..\BuildTools\WiRunSQL.vbs "$(BuiltOuputPath)" "UPDATE `Control` SET `Control`.`Attributes`='1' WHERE `Control`.`Dialog_`='FolderForm' AND `Control`.`Control`='DiskCostButton'"
&&
cscript $(ProjectDir)..\BuildTools\WiRunSQL.vbs "$(BuiltOuputPath)" "UPDATE `Control` SET `Control`.`Attributes`='1' WHERE `Control`.`Dialog_`='FolderForm' AND `Control`.`Control`='BrowseButton'"
&&
cscript $(ProjectDir)..\BuildTools\WiRunSQL.vbs "$(BuiltOuputPath)" "UPDATE `Control` SET `Control`.`Attributes`='5' WHERE `Control`.`Dialog_`='FolderForm' AND `Control`.`Control`='FolderEdit'"
&&
cscript $(ProjectDir)..\BuildTools\WiRunSQL.vbs "$(BuiltOuputPath)" "UPDATE `Control` SET `Control`.`Text`='{\VSI_MS_Sans_Serif13.0_0_0}The installer will install [ProductName] to the following folder.' WHERE `Control`.`Dialog_`='FolderForm' AND `Control`.`Control`='Body'"
&&
ren "$(ProjectDir)\$(Configuration)\setup.exe" "Setup.exe"

Oct 28, 2010 at 5:13 PM

I' ve tried with Temp.vbs and it builds fine. Then I copy/paste just the first line from original PostBuildEvent text:

cscript $(ProjectDir)..\BuildTools\WiRunSQL.vbs "$(BuiltOuputPath)" "INSERT INTO Property(Property, Value) VALUES ('DISABLEADVTSHORTCUTS', '1')"

and when I tried to build, it reports me the same error:

'PostBuildEvent' failed with error code '1' 'Unspecified error'  D:\NodeXL-1.0.1.153\NodeXL\ExcelTemplateSetup\ExcelTemplateSetup.vdproj

Oct 28, 2010 at 5:30 PM

Try this:

1. Open a command window: Start, cmd.exe.

2. In the command window, navigate to the ExcelTemplateSetup folder.

3. Run the cscript line you just quoted from the command window.  You will need to replace the $(ProjectDir) and $(BuiltOuputPath) macros with real paths.  If you're not sure how to do this, click the PostBuildEvent property in the Visual Studio Properties window, click the "..." button that appears to the right of the PostBuildEvent property's value, and click Macros>>.

Do you get a better error message when running the cscript line from the command window?

-- Tony

Oct 28, 2010 at 5:57 PM
Edited Oct 28, 2010 at 7:06 PM

When I run script from command line

P:\NodeXL-1.0.1.153\NodeXL\ExcelTemplateSetup>cscript P:\NodeXL-1.0.1.153\NodeXL\ExcelTemplateSetup\..\BuildTools\WiRunSQL.vbs "P:\NodeXL-1.0.1.153\NodeXL\Excel
TemplateSetup\Debug\Dnrd.msi" "INSERT INTO Property(Property, Value) VALUES ('DISABLEADVTSHORTCUTS', '1')"

 

I get this message:


Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

Msi API Error 80004005: Execute,Params
1: 2259 2: P:\NodeXL-1.0.1.153\NodeXL\ExcelTemplateSetup\Debug\Dnrd.msi 3:  4:

Oct 28, 2010 at 7:04 PM
Edited Oct 28, 2010 at 7:09 PM

The problem might be the very old version of Windows Script Host that you are using.  I am successfully using version 5.7 on Vista and 5.8 on Windows 7.  Version 5.6 is what originally shipped with Windows XP but was replaced by version 5.7 in Windows XP SP3.

Any idea as to how you can possibly be using version 5.6 on your Windows 7 machine?  Windows 7 shipped with version 5.8.

-- Tony

Oct 28, 2010 at 7:11 PM

I have dual boot system. I am developing in Visual Studio 2008 under Windows XP/Office2007 on one partition and on the other partition I have installed Windows 7 and Office 2010 which I am going to use for testing.

Oct 28, 2010 at 7:15 PM

You need to update the XP partition with all the latest Microsoft patches, including XP SP3.  That should give you the latest versions of Windows Script Host and Windows Installer, one of which is probably the source of the error you're seeing.

-- Tony

Oct 29, 2010 at 9:29 AM

Hi,

i've upgraded Windows XP to SP3 and now I'm using version 5.7 of Windows Script Host and that fixed problem with PostBuildEvent. But, when I run setup.exe on WindowsXP, first installer doesn't let me to choose installation folder path and secondly it stops with error message: Error. 1001. The installation of the ClickOnce solution failed with exit code -201.

Oct 29, 2010 at 11:45 AM

Hi,

I've done some modifications in ClickOneInstaller.cs. In public override void Install(System.Collections.IDictionary stateSaver) I've removed /S switch from arguments string to see what is going to happen and when I run setup.exe the following exception is raised:

Name: Microsoft.NodeXL.ExcelTemplate
From: file:///C:/Program Files/Microsoft Research/Microsoft NodeXL Excel Template/Microsoft.NodeXL.ExcelTemplate.vsto

File, Microsoft.NodeXL.Util.dll, has a different computed hash than specified in manifest.

************** Exception Text **************
System.Deployment.Application.InvalidDeploymentException: File, Microsoft.NodeXL.Util.dll, has a different computed hash than specified in manifest.
   at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.DownloadAddIn(TimeSpan timeout)
   at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()

Any advice how to fix this?

Oct 29, 2010 at 5:17 PM

I am able to reproduce the problem you are seeing by using the following build sequence:

1. Select the ExcelTemplateSetup project.

2. Select Build, Rebuild Solution.

To fix the problem, use this build sequence instead:

1. Select the Solution.

2. Select Build, Clean Solution.

3. Select Build, Rebuild Solution.

4. Select the ExcelTemplateSetup project.

5. Select Build, Build Solution.  (NOT Build, Rebuild Solution.)

I haven't yet figured out why these two sequences produce different results; it seems like they should do exactly the same thing.

-- Tony

Oct 29, 2010 at 5:27 PM
Edited Oct 29, 2010 at 7:01 PM

On another point you made: The Setup program does not allow the user to change the installation folder path, and that is by design.  At runtime, NodeXL needs to be able to find a few things in its installation folder, including the Excel template file and the PlugIns folder.  It can't use the path of the running assembly to figure out the installation folder path at runtime, because the assembly actually runs from the ClickOnce cache, not the installation folder.  Instead, NodeXL relies on a hard-coded installation folder path.  (Well, it's not actually hard-coded --NodeXL queries Environment.SpecialFolder.ProgramFiles to get the path root-- but you get my point.)

-- Tony