Support Forums

Packager 32 bit vs 64 bit question

Support for all customers who have purchased a PrimalScript product license. This forum does not offer a response time guarantee.
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE 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.
User avatar
brbedgood@gmail.com
Posts: 3
Joined: Thu Sep 27, 2007 3:18 am

Packager 32 bit vs 64 bit question

Postby brbedgood@gmail.com » Tue Oct 06, 2015 8:02 am

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
Attachments
PackagerSettings.png
PackagerSettings.png (61.15 KiB) Viewed 2624 times
User avatar
SAPIEN Support Forums
Posts: 945
Joined: Wed Dec 03, 2014 2:26 pm

Packager 32 bit vs 64 bit question

Postby SAPIEN Support Forums » Tue Oct 06, 2015 8:02 am

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?
    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.

If not, please take a moment to edit your original post or reply to this one.

*** Make sure you do not post any licensing information ***
User avatar
Alexander Riedel
Posts: 5780
Joined: Tue May 29, 2007 4:43 pm

Re: Packager 32 bit vs 64 bit question

Postby Alexander Riedel » Tue Oct 06, 2015 8:45 am

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.
Alexander Riedel
SAPIEN Technologies, Inc.

Return to “PrimalScript”

Who is online

Users browsing this forum: No registered users and 1 guest