PrimalScript 2015 7.1.69
64 bit
TLDR; My 32 bit PowerShell packages do not run on 64 bit computers. Is this by design or an error on my part?
I am trying to package a script to be used in a Windows 7 environment with a mix of 32 bit and 64 bit Windows. I have attached a sample of my packager settings. Most computers in the environment only have PowerShell v2.0 installed, so I have to program for the lowest common denominator.
I am finding that my 32 bit version of the package will not execute on 64 bit systems. It "runs", but does not execute the packaged script (no scripted actions performed) and does not return an error message. I am running the scripts elevated.
The same 32 bit version works correctly on a 32 bit computer and the 64 bit version works correctly on a 64 bit computer.
Is this by design or am I misconfiguring in some way?
I have had this problem with both the Sapien V2 Host and the PowerShell Command line engine.
I am including the PowerShell script for reference. FYI, I am using the "$result =" pattern to cut down on output, though when I run the package on a remote computer, I am using the /s command line parameter.
Set-StrictMode -Version 2.0
$ErrorActionPreference = 'SilentlyContinue'
function Main () {
$result = Remove-ItemProperty -Path 'hklm:Software\Microsoft\Windows\CurrentVersion\WindowsUpdate' -Name 'SusClientID' -Force
$result = Remove-ItemProperty -Path 'hklm:Software\Microsoft\Windows\CurrentVersion\WindowsUpdate' -Name 'SusClientIDValidation' -Force
$result = Stop-Service wuauserv
$result = rm c:\windows\SoftwareDistribution -force -recurse
$result = Start-Service wuauserv
$result = wuauclt /detectnow
$successRegKeyPath = 'hklm:Software\company\Infrastructure'
$executionTime = (get-date -format 'yyyy-MM-dd hh:mm:ss')
$result = New-Item -Path $successRegKeyPath -Force
$result = New-ItemProperty $successRegKeyPath -Name "RepairWSUS_Execution" -Value $executionTime -PropertyType String
}
. Main
$ExitCode = 0
Packager 32 bit vs 64 bit question
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.
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.
- brbedgood@gmail.com
- Posts: 3
- Last visit: Tue Oct 06, 2015 11:26 am
- SAPIEN Support Forums
- Posts: 945
- Last visit: Thu Oct 22, 2015 1:10 pm
Packager 32 bit vs 64 bit question
This is an automated post. A real person will respond soon.
Thank you for posting, brbedgood@gmail.com.
Did you remember to include the following?
*** Make sure you do not post any licensing information ***
Thank you for posting, brbedgood@gmail.com.
Did you remember to include the following?
- 1. Product, version and build (e.g. Product: PrimalScript 2014, Version & Build: 7.0.46. Version and build information can be found in the product's About box accessed by clicking the blue icon with the 'i' in the upper right hand corner of the ribbon.)
2. Specify if you are running a 32 or 64 bit version
3. Specify your operating system and if it is 32 or 64 bit.
4. Attach a screenshot if your issue can be seen on the screen
5. Attach a zip file if you have multiple files (crash reports, log entries, etc.) related to your issue.
*** Make sure you do not post any licensing information ***
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Re: Packager 32 bit vs 64 bit question
I do not know what "My 32 bit PowerShell packages do not run" means. It can mean it runs but does nothing, it crashes, it does not start at all or anything in between.
I see in your script that you use registry keys. Most likely there is your reason. Registry nodes and some file system folders are mapped differently for 32 bit processes on a 64 bit machine. So for your script it probably just looks like a key does not exist because it accesses the 32 bit version of a registry node rather then the 64 bit version.
I see in your script that you use registry keys. Most likely there is your reason. Registry nodes and some file system folders are mapped differently for 32 bit processes on a 64 bit machine. So for your script it probably just looks like a key does not exist because it accesses the 32 bit version of a registry node rather then the 64 bit version.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.