Script packager, PS1 multiple scripts

Use this forum to ask questions after your subscription maintenance expires or 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.
This topic is 13 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
elguido
Posts: 2
Last visit: Wed May 19, 2010 6:27 pm

Script packager, PS1 multiple scripts

Post 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
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Script packager, PS1 multiple scripts

Post 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.

Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
elguido
Posts: 2
Last visit: Wed May 19, 2010 6:27 pm

Script packager, PS1 multiple scripts

Post 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
This topic is 13 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.