#How to convert .psf to .ps1

1 messages · Page 1 of 1 (latest)

arctic flint
#

I lost access to PowerShell Studio that I used for a Form Script, now I'm stuck with a psf file.
Can someone help me plz

spare lintel
#

you can export it in powershell studio

arctic flint
#

Yes, i was looking for an option outside of powershell studio. But i guess i could just use a Trail lizenz on a different PC to export it the way you suggested. Thx

spare lintel
#

Ah sorry, i missed that part. I guess once you have an example it would probably not be hard to build a code generator for that

digital burrow
#

PSF files are just xml, try:

# parse psf document
[xml]$psfDoc = Get-Content path\to\project.psf

# find <code /> nodes
$codes = $psfDoc.SelectNodes('//code')

# output their textual contents
$codes |ForEach-Object {
  $_.InnerText
}
arctic flint
digital burrow
#

This only extracts embedded code though, you'd need a bit more to also extract and recreate the form elements

#

Take a look at the psf file in a text editor 🙃

arctic flint
digital burrow
#

I'm not familiar enough with their schema to be able to tell, you'll have to work that out on your own

arctic flint
#

I looked at it in the editor and its not readable code

digital burrow
#

It is, it likely just have lots of Base64 encoded blocks of binary data (which propbably takes up 90% of the lines in your editor)

#

A dedicate XML editor might be more helpful

elfin wren
#

if you are comfortable sending me the psf, I can export it for you

digital burrow
#

I'm also happy to take a look at it if you want any pointers re: figuring out how to parse the whole project file as xml

spare lintel
#

can you post a sample?