This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules DO NOT POST LICENSE NUMBERS, ACTIVATION 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.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 7 years and 5 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.
Product, version and build: version 5.2.129
32 or 64 bit version of product: 64bit
Operating system: windows 10 pro
32 or 64 bit OS: 64bit
PowerShell Version: 5.0 build 10586 revision 494
I have a single form project that works when I click the run button but once I package the script it stops working. Here is the subroutine that isn't working. Specifically the New-psdrive line isn't working. When I try to copy a file from that location in a different function I get an error drive copyfrom does not exist. I have tried to package it using several different options with no luck. It has to run 32bit since I am using SQL and I currently have the 32bit version of SQL loaded on the machines I am running this script on. I have the STA mode checked in the packager settings and have tried every version of V2 and V5 for the platform. I am using Embed a default manifest and run mode of current user. If you need a complete version of the script let me know and I will remove the server names and send it to you.
Usually, when something like this occurs it's due to the executable not having the correct permissions. Can you provide the exact build settings you're using?
You can either type this all out or upload the .psbuild file that contains this information. If you don't want it to be public, you can zip it up and upload it here: https://www.sapien.com/support/upload
I changed it to use an elevated manifest and it didn't help. I am almost positive it worked before I upgraded to my current version but I couldn't tell you what version I was using before, I don't skip or miss many version updates.
I got it working. For some reason once I packaged the script it was losing the new-psdrive information when I went to use it. I made the location a global variable and recreate the new-psdrive just before I want to use it and I am able to use that location. I don't understand why it changes after it is packaged but I am able to continue using the script now.
This topic is 7 years and 5 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.