Script packager, PS1 multiple scripts

Use this forum to ask questions before you buy. Need information on licensing or pricing? Questions about a trial version? This is the right place for you. No scripting questions, please.
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
User avatar
elguido
Posts: 2
Joined: Tue May 11, 2010 5:20 pm

Script packager, PS1 multiple scripts

Post by elguido » Tue May 11, 2010 5:20 pm

Hi thereI am currently using the demo whilst our company's security team is reviewing your product (Primal Script) before we can purchase the 2009 edition (I believe we already got 40 copies of the 2007 edition?)I have hopefully a quick question.I have created a WPF based app in PS1 and split the code into 3 PS1 filesWhen I run the script by hand (from the command line etc) the scripts have a . pathtootherpsfile.ps1in themCan I use the script packager to have multiple scripts and create one encompassing exe?Should the dot sourcings be kept in or does adding them in the scripts section of the packager dialogue handle this?Or do I have to dump all the code into 1 script and just package that?Cheers,G

User avatar
Alexander Riedel
Posts: 7005
Joined: Tue May 29, 2007 4:43 pm

Script packager, PS1 multiple scripts

Post by Alexander Riedel » Wed May 19, 2010 8:21 am

You can add the additional files as data files and reference them from your main script. Please keep in mind that these data files will be extracted to a specific data file folder.

Base PathCompanyNameProductNameProductVersion

Under XP the "Base Path" is "C:Documents and SettingsAll UsersApplication Data"

The rest of the information is taken from your package's version resource, so make sure to fill these fields properly.

If security is a concern and you want no temporary files then you should consider combining your files all into one script.

Future versions of the packager will address this situation.

Alexander Riedel
SAPIEN Technologies, Inc.

User avatar
elguido
Posts: 2
Joined: Tue May 11, 2010 5:20 pm

Script packager, PS1 multiple scripts

Post by elguido » Wed May 19, 2010 6:27 pm

I think I understand

So in folders I have set %temp%

I've added my sourced ps1's to data files rather than scripts

Filled out the version information sections

and in the script done

$rootPath = Get-ChildItem Env:Temp

. "$rootPathMy CompanyMy ProductMy Versionmy-powershell-library.ps1"

Still getting an error when running the exe though

"Application has failed to start because the app config is incorrect"

Have I done something stupid?

Cheers,

G