Proof of Concept - Final Builder 7 with Power Shell

I've used Final Builder at a previous company, and I'm trying to create a proof of concept at a new company.  I'm trying to start out very simplistic by using a powershell script to launch Final Builder via command line properties, and then Final Builder runs and simply calls another power shell script with the variables passed in.  We would eventually take that power shell script and turn it into Final Builder built in functionality, but again, I'm trying to pull together a proof of concept so that we can make a purchase.

The command line functionality to load Final Builder is working fine.  I get it to open, start the project, and all of the variables load up into the project.  The problem comes when I tried to call a powershell script from the FB7 project.

I've already looked at this post in regards to setting the ExecutionPolicy for powershell:

https://www.finalbuilder.com/forums/finalBuilder-server/general-discussion/running-a-powershell-script-file-and-executionpolicy-in-finalbuilder-server/

We've set that for both 32-bit and 64-bit Powershell.  I even added the command to the very beginning of the powershell script.  That at least solved the problem where the script would not work at all.

The new problem is dealing with a zip of some files we are building.  When running this script from the command line, it all works fine.  It's just once we have FinalBuilder call the powershell script, it's having issues.  I look forward to when I can remove this code into a FinalBuilder zip command, but I need to prove that it can run our current powershell script.

Our script tries to make a $zip variable of type ICSharpCode.SharpZipLib.Zip.FastZip.  It then calls out $zip.CreateZip($ZipFile, $FilePath, $true, "")

The error almost seems like I'm not allowed to write out to this directory (which is a network location).

+         throw <<<<  "Build Exception!"
    + CategoryInfo          : OperationStopped: (Build Exception!:String) [], 
rgument(s): "Request for the permission of type 'System.Security.Permissions.Fi
leIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a
5c561934e089' failed."

Why would this work when I load our powershell script from the command line but not when we have FinalBuilder call the same thing?

I'm using FinalBuilder 7.0.0.1283
Windows Server 2008 SP1 64-Bit
PowerShell v1.0 (and tried both 32 and 64-bit)

Thanks,
Scott

Hi Scott

This looks to be a permission issue of some sort. Are you running the FB Project as an administrator?

Could you please try change the script so that the zip file is created on the local filesystem rather than on a network location and let me know if this succeeds.

I have downloaded the zip library and have tested the operation you have described here without being able to reproduce this error here. I am not sure why this works from the command line but not from FinalBuilder (unless FinalBuilder is being run under different user account).

After investigating this error, it appears that this issue can occur when attempting to perform an operation over a network connection where the application does not have sufficient rights to perform this operation remotely.

Here are a couple of references to this issue on MSDN that may help:
http://social.msdn.microsoft.com/forums/en-US/csharpgeneral/thread/e91bfb53-5148-4122-894c-56dc0d0b6a29/
http://social.msdn.microsoft.com/forums/en-US/winformssetup/thread/f1b4f239-4c53-43a4-89b2-31c1d666ccac/

Regards,
Steve