Application not working in Windows 10

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Locked
User avatar
tirwin@iot.in.gov
Posts: 40
Joined: Mon Oct 19, 2015 5:45 am

Application not working in Windows 10

Post by tirwin@iot.in.gov » Thu Jan 07, 2016 8:28 am

I have created an app for back up and restore of computers. I also allows modification of ADObjects through the use of custom Profile.ps1 file. The app runs fine in the ISE with no errors and works properly no errors in Windows 7. However when I try to run it in a newly imaged Windows 10 machine I get "Property Can Not Be Found" errors on all my object propertys. The thing is I can read all the propetys when I fill comboboxes fine. The error only occurs when the form is submitted. I will attach 1 of the forms I am having a problem with. Again it runs fine in Windows 7 But not Windows 10. could this be a problem with Microsoft updates. Also "Yes" I am setting "Set-ExecutionPolicy -Scope Process -ExecutionPolicy Unrestricted". Thanks
Attachments
No.psf
(105.87 KiB) Downloaded 102 times

jvierra
Posts: 13992
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Application not working in Windows 10

Post by jvierra » Thu Jan 07, 2016 9:20 am

You cannot set execution policy inside of a script.

From an elevated prompt run this:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned


Then run your script in PowerShell CLI and note all errors.

User avatar
tirwin@iot.in.gov
Posts: 40
Joined: Mon Oct 19, 2015 5:45 am

Re: Application not working in Windows 10

Post by tirwin@iot.in.gov » Thu Jan 07, 2016 10:01 am

With all do respect I did do that, and my application runs with no errors in Windows 7 but has multiple errors on all of the object propertys in Windows 10. That is my problem. I there a method to send you the intire .exe and a .ps1 file that goes with it? I attempted to upload and it will not take it.

jvierra
Posts: 13992
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Application not working in Windows 10

Post by jvierra » Thu Jan 07, 2016 10:09 am

What are the errors? What is the exact first error? What do you see when you run the ps1 from powershell CLI.

You can get the errors from $error

THe errors will tell you want is missing. I suspect you do not have RSAT installed.

Locked