Page 1 of 1

Script packager, PS1 multiple scripts

Posted: Tue May 11, 2010 5:20 pm
by elguido
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

Script packager, PS1 multiple scripts

Posted: Wed May 19, 2010 8:21 am
by Alexander Riedel
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.


Script packager, PS1 multiple scripts

Posted: Wed May 19, 2010 6:27 pm
by elguido
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