Powershell Studio fails to recover source from backup info

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 4 years and 4 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
robert.ganshorn
Posts: 54
Last visit: Sat Nov 25, 2023 8:17 pm

Powershell Studio fails to recover source from backup info

Post by robert.ganshorn »

Product, version and build: 5.6.169
32 or 64 bit version of product: 64 bit
Operating system: Windows 10
32 or 64 bit OS: 64 Bit

I accidentally deleted a source file this morning, so I thought I would just recover it from the PS1 file. This seems very unreliable, especially with complex windows forms because not everything is always rebuilt 100%. In the case with this script, parts of the powershell code appear to just be missing in the rebuilt PSF file - making it totally unusable.

I am using a registered version of course, it's just that I'm not using the same license I had from before. Our software asset team gave me a different license and I don't have access to log into the other forums for support.

Rob
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: Powershell Studio fails to recover source from backup info

Post by Alexander Riedel »

Please email the license number you are using to support@sapien.com
We will check if we can add that your user account to make you eligible for support.

The recovery of project data is not a 100% fool proof option. It does not alleviate the need for backup and source control. There may be missing code in the recovered project files, as that code might in locations not covered by the recovery process.
You do however have all the code in the .ps1 file, so you can manually transfer any missing code.

As always, we highly recommend to use a source control system and regular backups in order to preserve your code.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
robert.ganshorn
Posts: 54
Last visit: Sat Nov 25, 2023 8:17 pm

Re: Powershell Studio fails to recover source from backup info

Post by robert.ganshorn »

Not to sound argumentative, but what's the point of a recovery process if it doesn't work reliably? You are making something that customers are possibly going to need to use, only to find out it doesn't really work. The recovered PSF is missing key elements like closing brackets on functions and not all form information is recovered either. I''ve noticed some container objects like a a datagrid or listview might be missing columns. Events are also missing (when trying to run a recovery), but that can be because the code structure is somehow corrupted/incomplete.

Rob
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: Powershell Studio fails to recover source from backup info

Post by Alexander Riedel »

It usually works, its not like we leave that in to deceive anyone :D. I cannot determine why it does not work in your case because I do not have access to your files. So I can only guess.
As I also do not know what the PowerShell Studio version was this was originally created with. That might be a factor. Additionally, if anyone has tampered with the resulting .PS1 after the fact,
the recovery data is quite obviously not in sync with the code. I can of course not say who had access to your code in your case, but it happens quite frequently.
I have to stress that I do not know what has happened in your case and without having access to the files I cannot determine anything else.

Which is why we recommend to not rely on this alone, but employ the standard source control / backup measures best practices recommend.
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 4 years and 4 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.