Search found 17 matches

by andycarpenter@westat.com
Wed Jul 15, 2020 12:50 pm
Forum: PowerShell
Topic: Service Getting Its Own Version?
Replies: 5
Views: 1269

Re: Service Getting Its Own Version?

Thanks for the quick, clarifying replies.
by andycarpenter@westat.com
Wed Jul 15, 2020 10:22 am
Forum: PowerShell
Topic: Service Getting Its Own Version?
Replies: 5
Views: 1269

Service Getting Its Own Version?

Is there a way for a service created with PowerShell Studio to get its own version number? For an EXE created with PowerShell Studio, I've done something like: $MyVer=[System.Diagnostics.FileVersionInfo]::GetVersionInfo($MyExe).FileVersion but that's really collecting it from the EXE file, which I d...
by andycarpenter@westat.com
Thu Feb 27, 2020 3:10 pm
Forum: PowerShell
Topic: Start EXE Under Privileged Account Elevated
Replies: 3
Views: 1784

Re: Start EXE Under Privileged Account Elevated

Thanks so much for your very quick reply. It's an area where I clearly don't have a great handle on the details. Your explanation makes sense. What I'm doing as a work-around for now [and it makes no sense to me that it works] is... EXE is not elevated and runs as the current/non-priviledged user EX...
by andycarpenter@westat.com
Thu Feb 27, 2020 11:01 am
Forum: PowerShell
Topic: Start EXE Under Privileged Account Elevated
Replies: 3
Views: 1784

Start EXE Under Privileged Account Elevated

Using PowerShell Studio/Packager I have created a PowerShell-based EXE that has a default manifest for elevation. Let's call that the elevated EXE. From a non-elevated EXE running under a non-privileged account, I want to call the elevated EXE, have it run under a privileged account, and run elevate...
by andycarpenter@westat.com
Thu Nov 10, 2016 1:41 pm
Forum: PowerShell
Topic: Issues with Start-Job
Replies: 2
Views: 1323

Re: Issues with Start-Job

Thanks. I agree with you. Could not see any reason it was not working. I made the recommended change. Did some more testing in a lot of different contexts (accounts). The job is clearly starting and doing what's required in most accounts. In one account, UAC kicks in and re-requires user type the pa...
by andycarpenter@westat.com
Thu Nov 10, 2016 12:06 pm
Forum: PowerShell
Topic: Issues with Start-Job
Replies: 2
Views: 1323

Issues with Start-Job

I have a need to run a few lines of PowerShell under different credentials than those of the account that's logged in and running the main script. Basically, this packaged EXE will be running due to an autologon&autorun in an account that has limited privilege. I need to change a Registry value to t...
by andycarpenter@westat.com
Thu Aug 04, 2016 6:31 am
Forum: PowerShell GUIs
Topic: Control after form opens
Replies: 8
Views: 2348

Re: Control after form opens

You have been spectacularly helpful. I see the Tab property and will test that out. Your suggested code segment for Activated is just what I had done. The Info Center looks to be just what I'll need to answer more questions on my own. Thanks very much for all your very quick and always-on-the-money ...
by andycarpenter@westat.com
Wed Aug 03, 2016 3:25 pm
Forum: PowerShell GUIs
Topic: Control after form opens
Replies: 8
Views: 2348

Re: Control after form opens

Thanks for the guidance. I have something working now. The Activate event seems to fire multiple times (on focus?), so I needed to only do my processing the first time it fires and ignore the rest. I need to do some basic reading before I do to much more with forms. Would you care to recommend the b...
by andycarpenter@westat.com
Wed Aug 03, 2016 2:15 pm
Forum: PowerShell GUIs
Topic: Control after form opens
Replies: 8
Views: 2348

Re: Control after form opens

Thanks.

There's no existing event for that in the form script, so I included:
$form1_Activated={ActivateThePayload}

ActivateThePayload is a function that performs the processing.

Is this not what you had meant? The form opens, but the processing code is not called.

Thanks for your assistance.
by andycarpenter@westat.com
Wed Aug 03, 2016 12:13 pm
Forum: PowerShell GUIs
Topic: Control after form opens
Replies: 8
Views: 2348

Control after form opens

I'm new to using forms, so sorry if this is obvious. This may be a little non-standard and maybe there is a much better way to go. I want to use a dialog style form as a UI to communicate status to the user as a PowerShell script does some processing. So I have a form with some text controls, etc. W...