Search found 8470 matches

by Alexander Riedel
Tue Mar 19, 2024 12:38 am
Forum: PowerShell Studio
Topic: Error: Writing scripts to bin\x64\my.exe failed, error code 87, data size
Replies: 1
Views: 16

Re: Error: Writing scripts to bin\x64\my.exe failed, error code 87, data size

Error code 87 (you can find quite some references here in the forum) indicates "Parameter incorrect" which is basically a catch all error in Windows. It can point to corrupt file system or simply a file being in use by another process. Delete the output file. Reboot your system. Try again....
by Alexander Riedel
Mon Mar 18, 2024 2:37 pm
Forum: PowerShell Studio
Topic: Message: PowerShell cannot be instantiated
Replies: 4
Views: 76

Re: Message: PowerShell cannot be instantiated

The reason for this error are the custom entries you are adding to the .config file. If you remove them, the application executes as packaged. Please note that custom entries in a config file can be added to the <AppSettings> node. They should not be added outside of that node. Adding them outside i...
by Alexander Riedel
Mon Mar 18, 2024 1:47 pm
Forum: PowerShell Studio
Topic: get-service startuptype returns nothing
Replies: 5
Views: 38

Re: get-service startuptype returns nothing

foreach ($Service in get-service | Select-Object Name, Startuptype, Status) { $Name = $Service.name.ToUpper() $Start = $Service.StartupType $State = $service.status Write-Host "$Name $Start $State" } Running your code from above here in PowerShell Studio produces: BITS Manual Stopped
by Alexander Riedel
Mon Mar 18, 2024 1:39 am
Forum: PowerShell Studio
Topic: get-service startuptype returns nothing
Replies: 5
Views: 38

Re: get-service startuptype returns nothing

Please note that PowerShell Studio does not modify, amend or restrict any PowerShell objects. It also does not alter types and their properties under any circumstances.
Any code you execute within PowerShell Studio runs under the selected PowerShell version's engine.
by Alexander Riedel
Fri Mar 15, 2024 12:47 am
Forum: PowerShell GUIs
Topic: Dealing with common functions
Replies: 2
Views: 344

Re: Dealing with common functions

Unfortunately modules do not lend themselves to be included in packaged executables. Modules come in script or binary form. Some are simply manifest modules and include many submodules, e.g. the Microsoft.Graph and Az modules. They have their own dependencies and are generally copyrighted and signed...
by Alexander Riedel
Thu Mar 14, 2024 4:15 pm
Forum: PowerShell
Topic: Running a script during MSI install
Replies: 6
Views: 1784

Re: Running a script during MSI install

Have you tried setting a "Manifest for elevation" for the packaged executable? Generally a custom action gets executed with admin privileges when "deferred" and "no impersonation" is checked. That executes the custom action under the system account. Now, if you ALSO wan...
by Alexander Riedel
Wed Mar 13, 2024 12:14 pm
Forum: PowerShell
Topic: Running a script during MSI install
Replies: 6
Views: 1784

Re: Running a script during MSI install

I don't know your use case, so I'll just throw in some opinions here, which also may benefit anyone finding this later. I would never recommend setting the execution policy in an installer to anything, let alone 'unrestricted'. I think this should always be left to whoever is in charge of that compu...
by Alexander Riedel
Tue Mar 12, 2024 3:58 pm
Forum: PowerShell
Topic: Running a script during MSI install
Replies: 6
Views: 1784

Re: Running a script during MSI install

I am not sure what your expectation is here. Import-Module is a session specific thing. So it will import that module in the script that runs as a custom in the installer. It has no lasting effect on other scripts.
That the action runs is verified by the registry entries existing after the install.
by Alexander Riedel
Tue Mar 12, 2024 10:11 am
Forum: VersionRecall
Topic: Version Recall 2024 DateStamps on Files with Same Date
Replies: 4
Views: 154

Re: Version Recall 2024 DateStamps on Files with Same Date

Please understand that I can only evaluate information you give me, we do not have access to your computer or your data. Let me repeat the questions about what the creation date of the files looks like. It appears something has touched all files on 11/15/2023. At least the ones shown in the little s...
by Alexander Riedel
Mon Mar 11, 2024 2:19 pm
Forum: VersionRecall
Topic: Version Recall 2024 DateStamps on Files with Same Date
Replies: 4
Views: 154

Re: Version Recall 2024 DateStamps on Files with Same Date

I had a quick look at my test repositories and the dates are all different, corresponding to the date the version was submitted.
Did you move the repository from one location to another?