Search found 18 matches

by andycarpenter@westat.com
Tue Sep 19, 2023 11:40 am
Forum: PowerShell
Topic: Command found in module, but can't be loaded
Replies: 0
Views: 20594

Command found in module, but can't be loaded

Using Powershell 5. Need to migrate to a new host quickly and need to keep it neutral (i.e., not hopping to 7 at the same time). I am suddenly getting errors like the ones below -- the command is found in a module, but the module can't be loaded . These cmdlets have worked for me for a long time on ...
by andycarpenter@westat.com
Wed Jul 15, 2020 12:50 pm
Forum: PowerShell
Topic: Service Getting Its Own Version?
Replies: 5
Views: 3909

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: 3909

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 2:10 pm
Forum: PowerShell
Topic: Start EXE Under Privileged Account Elevated
Replies: 3
Views: 3625

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 10:01 am
Forum: PowerShell
Topic: Start EXE Under Privileged Account Elevated
Replies: 3
Views: 3625

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 12:41 pm
Forum: PowerShell
Topic: Issues with Start-Job
Replies: 2
Views: 2064

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 11:06 am
Forum: PowerShell
Topic: Issues with Start-Job
Replies: 2
Views: 2064

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 ...
by andycarpenter@westat.com
Thu Aug 04, 2016 6:31 am
Forum: PowerShell GUIs
Topic: Control after form opens
Replies: 8
Views: 4320

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: 4320

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: 4320

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.