To help you better we need some information from you.
*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***
Product: PowerShell Studio 2019 (64 Bit)
Build: v5.6.162
OS: Windows 10 Pro (64 Bit)
Build: v10.0.17763.0
*** Please add details and screenshots as needed below. ***
DO NOT POST SUBSCRIPTIONS, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM
I modified a script at the end of last week, repackaged it (for a Windows 7 PC), and copied it to the remote PC.
It wouldn't run.
Before the console window vanished I managed to grab a screenshot of it: there were numerous missing parenthesis & unexpected character errors.
All I had changed was the contents of a regexp to deal with a new format of our SKUs.
I checked the script on my PC - it works fine.
Just in case I had done something stupid (apart from overwriting the working exe) I set the script back to how it was & repackaged.
It still doesn't work on the PC where it's needed!
So I need to set up RSEE as soon as possible to try and figure out how it's broken.
My question is this:
Where in the PowerShell Studio 2019 manual are the instructions for installing the RSEE Service 2019?
I just get PrimalHost64.dll failed to register. HRESULT -214711024770 (same for the 32 bit version as well).
I really need to get this fixed before tomorrow morning if I can.
Many thanks.
Problems installing RSEE on remote PC
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.
- Alexander Riedel
- Posts: 8479
- Last visit: Thu Mar 28, 2024 9:29 am
- Been upvoted: 37 times
Re: Problems installing RSEE on remote PC
The install *should* be as simple as running the installer, the PrimalHost dll needs the Visual Studio 2019 runtime installed though.
I'll look into what that HRESULT means. In the meantime, please post that screenshot, your packaging options and some details about the OS where it fails.
I'll look into what that HRESULT means. In the meantime, please post that screenshot, your packaging options and some details about the OS where it fails.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: Problems installing RSEE on remote PC
OK - that's one piece of the puzzle solved:
I followed the latest piece of advice that I could find in your forums, and installed the C++ 2012 redistributable.
Thanks
More info to follow, hopefully.
I followed the latest piece of advice that I could find in your forums, and installed the C++ 2012 redistributable.
Thanks
More info to follow, hopefully.
Re: Problems installing RSEE on remote PC
Looks like the latest C++ redist is 2017 (please correct me if I'm wrong):
https://support.microsoft.com/en-gb/hel ... -downloads
I was wrong about it working on my PC - I only tested that the script is working.
I assumed that if the script ran, then the exe would too (Doh!).
If I run the exe on my PC, nothing happens. What it should do is open a command window and prompt for a works order number (or 'x' to quit).
Unfortunately I printed the screen capture without saving it.
Only a fraction of the error message was captured - there were too many errors to fit the window, but from what I can see the errors seem to be meaningless.
For example the 1st error that I can see complains of unexpected token 'Works' in expression or statement at line 185 char 3.
LInes 180 through 188 are a comment block; the original commands there provided an on screen progress summary, but I was asked to remove it.
With C++ 2017 (both x86 & x64) on the Win7 PC, the x86 RSEE installs without any messages.
The x64 RSEE install throws up 3 command windows with error messages in - so far they've disappeared too fast for me to capture any of them.
The only part I managed to read was RegAsm warning.
https://support.microsoft.com/en-gb/hel ... -downloads
I was wrong about it working on my PC - I only tested that the script is working.
I assumed that if the script ran, then the exe would too (Doh!).
If I run the exe on my PC, nothing happens. What it should do is open a command window and prompt for a works order number (or 'x' to quit).
Unfortunately I printed the screen capture without saving it.
Only a fraction of the error message was captured - there were too many errors to fit the window, but from what I can see the errors seem to be meaningless.
For example the 1st error that I can see complains of unexpected token 'Works' in expression or statement at line 185 char 3.
LInes 180 through 188 are a comment block; the original commands there provided an on screen progress summary, but I was asked to remove it.
- <# Commented out - feedback not currently required
- '' # A bit of feedback
- '----------------------------------------------------------------------------------------'
- "Works Order : $wo Part Number: $part Sales Order: $so Customer: $cust"
- "Qty : $origqty"
- "Done Date : $donedate"
- "Status : $status"
- ''
- #>
The x64 RSEE install throws up 3 command windows with error messages in - so far they've disappeared too fast for me to capture any of them.
The only part I managed to read was RegAsm warning.
Re: Problems installing RSEE on remote PC
OK got the exe to run on my PC. Just going to try it on the Win7 PC (it's quite a long walk though).
I updated to the latest version of PowerShell Studio a couple of weeks ago.
Earlier today I noticed there was a newer version, so updated.
I just noticed that when I repackaged the script after today's update there was a message in the 'Tools Output' panel saying the exe file could not be overwritten.
I don't recall ever seeing this before.
I renamed the old file to "Print-BoxLabel.exe.saved" and everything was OK again (repackaging worked).
Anyway, the exe now runs on my PC as I would expect it to.
If I repackage again it now works without any problems or error messages.
I updated to the latest version of PowerShell Studio a couple of weeks ago.
Earlier today I noticed there was a newer version, so updated.
I just noticed that when I repackaged the script after today's update there was a message in the 'Tools Output' panel saying the exe file could not be overwritten.
I don't recall ever seeing this before.
I renamed the old file to "Print-BoxLabel.exe.saved" and everything was OK again (repackaging worked).
Anyway, the exe now runs on my PC as I would expect it to.
If I repackage again it now works without any problems or error messages.
Last edited by wartech on Tue Apr 23, 2019 4:20 am, edited 1 time in total.
Re: Problems installing RSEE on remote PC
All good on the Win7 PC as well.
In case it's of any use, here's the script:
In case it's of any use, here's the script:
- <#
- .NOTES
- ===========================================================================
- Created with: SAPIEN Technologies, Inc., PowerShell Studio 2015 v4.2.95
- Created on: 03/08/2015 18:55
- Created by: Phil Sharpe
- Organization: Norbar Torque Tools Ltd.
- Filename: Print-BoxLabel.ps1
- ===========================================================================
- .DESCRIPTION
- Print Kiaro box labels from Works Order details.
- Currently runs on Windows 7 SP1 / Windows 10 (PowerShell 4 or above)
- - untested on anything else.
- PrintServer PC is hardcoded to NBW001124.
- It is not advisable to run from any other PC without checking the label stock loaded in each printer.
- SQL Server is Microsoft SQL Server 2008 Standard Edition (64-bit)
- Program Inputs:
- 1. Works order number (scanned from barcode)
- The inventory code and req'd qty are retrieved from the
- Norbar_Production database using the W/O number.
- Function: Read-WO
- 2. Printer number - currently 1, 2 or 3.
- Function: Read-Printer
- Used to construct the printer name
- For an audible warning of invalid input data, the Windows system
- sound "Question" (not normally used) should be set to a suitable
- WAV file. Currently set to a WWII submarine dive alarm.
- #>
- Add-Type -AssemblyName System.Data
- function Show-ErrorBox ($errTitle, $errMsg)
- {
- [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null
- [Windows.Forms.MessageBox]::Show($errMsg, $errTitle, [Windows.Forms.MessageBoxButtons]::OK, [System.Windows.Forms.MessageBoxIcon]::Error, [System.Windows.Forms.MessageBoxDefaultButton]::Button1, [System.Windows.Forms.MessageBoxOptions]::DefaultDesktopOnly) | Out-Null
- }
- function Read-WO
- {
- # Enter Works Order number
- # This must start with 3 followed by 6 digits
- $iWarning = 'Enter Works Order number (x to end)'
- $badInput = $false
- Do
- {
- if ($badInput)
- {
- [System.Media.SystemSounds]::Question.Play() | Out-Null
- }
- [string]$worksOrder = (Read-Host -Prompt $iWarning).Replace(" ", "").ToUpper()
- if ($worksOrder -eq "X")
- {
- Return "X"
- }
- $iWarning = 'Invalid Works Order. Please re-enter Works Order (x to end)'
- $badInput = $true
- }
- while ($worksOrder -notmatch '^3\d{6}$')
- Return $worksOrder
- }
- function Read-Printer
- {
- # Enter Printer number
- # Currently this must be 1, 2 or 3
- $iWarning = 'Enter Kiaro Printer number (1, 2 or 3)'
- $badInput = $false
- Do
- {
- if ($badInput)
- {
- [System.Media.SystemSounds]::Question.Play() | Out-Null
- }
- [string]$iPrinter = (Read-Host -Prompt $iWarning).Replace(" ", "")
- $iWarning = 'Invalid Printer number. Please enter 1, 2 or 3'
- $badInput = $true
- }
- while ($iPrinter -notin '1', '2', '3')
- $iPS = "PRINTER=QuickLabel Kiaro ;Kiaro!" #Base printer name
- switch ($iPrinter)
- {
- 1 { $iPS = $iPS.Replace(" ;", " 1;") }
- 2 { $iPS = $iPS.Replace(" ;", " 2;") }
- 3 { $iPS = $iPS.Replace(" ;", " 3;") }
- }
- Return $iPS
- }
- # Processing starts here
- #region Initialize
- #The QuickCommand process on the print server monitors the Monitor$ share for new print command files
- $printSrvr = 'NBW001124' #PC with QuickCommand & Kiaros connected
- $quickCommand = 'C:\Program Files (x86)\Custom QuickLabel\QuickCommand.exe'
- if ($env:COMPUTERNAME -ine $printSrvr)
- {
- #Firing up QuickCommand remotely - Hope you know what you're doing!
- $printing = "Remote"
- $quickCommand += ' /S'
- if ((Get-CimInstance -Query 'Select * from Win32_Process where name like "quickcommand%"' -ComputerName $printSrvr | Measure-Object).Count -eq 0)
- {
- Invoke-CimMethod –ClassName Win32_Process -Computer $printSrvr –Method "Create" –Arg @{ CommandLine = $quickCommand }
- }
- $monitor = '\\NBW001124\Monitor$' #This is a pre-created invisible share
- }
- else
- {
- #We're running locally - Much safer (in terms of fewer scrapped labels)
- $printing = "Local"
- if ((Get-Process | Where-Object Name -eq quickcommand).Count -eq 0)
- {
- Start-Process -FilePath $quickCommand -ArgumentList '/S'
- }
- $monitor = 'C:\Users\Public\Documents\Custom QuickLabel\QuickCommand\Monitor'
- }
- $lblRoot = "\\FS1\AssyLabels\ALF Files\Kiaro" #Root folder for our label files
- if ((Test-Path -Path $lblRoot -PathType Container) -eq $false)
- {
- $lblRoot = "\\FS2\AssyLabels\ALF Files\Kiaro"
- if ((Test-Path -Path $lblRoot -PathType Container) -eq $false)
- {
- throw "Fatal error - Cannot access label folder"
- }
- }
- $lblDblRow = @('26771', '26773', '26981', '266105') #Label stock with 2 labels per row
- $crlf = [char]13 + [char]10
- #Set up database access
- $dbUser = "UID=*******"
- $dbPass = "Pwd=**************"
- $server = "Server=dbserv"
- $database = "Database=NORBAR_PRODUCTION"
- $conn = New-Object System.Data.SqlClient.SqlConnection("$server;$database;$dbUser;$dbPass")
- $conn.Open() | Out-Null
- #endregion
- do
- {
- $worksOrder = Read-WO #Get works order number
- if ($worksOrder -eq 'X')
- {
- continue
- }
- #SQL query
- $query = @'
- SELECT [WOR_ORDER]
- ,[WOR_ITEM_ONLY]
- ,[WOR_SALORD]
- ,[WOR_CUSTOMER]
- ,[WOR_ORIG_QTY]
- ,[WOR_DONE_DATE]
- ,[WOR_STATUS]
- FROM [NORBAR_PRODUCTION].[dbo].[vwASC_WORTBL]
- WHERE WOR_ORDER = {0}
- '@ -f "'" + $worksOrder + "'"
- $command = New-Object System.Data.Sqlclient.SqlCommand($query)
- $command.Connection = $conn
- $DR = $command.Executereader()
- $DR.Read() | Out-Null
- $wo = $DR.GetValue(0) # Works order number
- $part = $DR.GetValue(1) # Part number
- $so = $DR.GetValue(2) # Sales order number
- $cust = $DR.GetValue(3) # Customer code
- $origQty = $DR.GetValue(4) # Qty reqd
- $doneDate = $DR.GetValue(5) # Date the W/O was closed (should be empty)
- $status = $DR.GetValue(6) # Open/Closed status
- $DR.Close()
- <# Commented out - feedback not currently required
- '' # A bit of feedback
- '----------------------------------------------------------------------------------------'
- "Works Order : $wo Part Number: $part Sales Order: $so Customer: $cust"
- "Qty : $origqty"
- "Done Date : $donedate"
- "Status : $status"
- ''
- #>
- # Dealing with our "special" way of numbering parts
- # and our "unique" way of naming labels, e.g. "26671_13070_NOR Iss1 Apr09.alf"
- $part = $part.Trim().ToUpper() #Convert to uppercase without spaces
- if ($part -match '^.{4,6}R$|.+R\.\d{2}') #Remove 'R' from the end of service replacement part codes
- {
- $part = $part.Replace('R', '')
- }
- if ($part.EndsWith('.01') -or $part -notmatch '.{4,6}\.[A-Z]{3}$') #Add _NOR to non own brand part codes
- {
- $part += '_NOR'
- }
- $part = $part.Replace(".", "_") #Replace dots with underscores (blame Marketing)
- $lblFilter = -join ('*_', $part, '*') #Throw in some super stars (wildcard it) to make a file name filter
- # Search for label files matching our part number from the label root folder down
- # excluding anything in folders named 'Obsolete'
- $lblFound = Get-ChildItem -File -Path $lblRoot -Recurse -Include *.alf -Filter $lblFilter | Where-Object fullname -NotMatch Obsolete
- switch ($lblFound.Count) #Action depends on how many label files we matched
- {
- 0 #Did someone steal my label?
- {
- 'No labels found for this part - Cannot print'
- }
- 1 #Perfect
- {
- "Printing label $lblFound"
- $lblStock = ($lblFound.Name -split "_", 2)[0] #1st part of filename before the "_"
- $lblRows = 1
- if ($lblStock -in $lblDblRow) #How many labels per row?
- {
- $lblRows = 2
- }
- switch ($lblRows) #Calculate the number of rows of labels to print
- {
- 1 { $printCount = [int16]$origQty }
- 2 { $printCount = [int16][math]::Truncate(($origQty/2) + 0.5) }
- }
- $printString = Read-Printer #Select a printer
- $pfContent = 'LABELNAME=' + $lblFound.FullName + $crlf
- $pfContent += 'LABELQUANTITY=' + $printCount + $crlf
- $pfContent += $printString + $crlf
- $pfName = $monitor + '\' + $worksOrder + '_' + [int16]$origQty + ' x ' + $part + '.acf'
- if (Test-Path -Path $pfName)
- {
- throw "Fatal error - Another copy of the print instruction file already exists"
- }
- # Stream label to destination file
- $stream = New-Object -ComObject ADODB.Stream
- $stream.Charset = "utf-8"
- $stream.Open()
- $stream.WriteText($pfContent)
- $stream.SaveToFile($pfName)
- $stream.Close()
- <# User wants less on-screen feedback
- ''
- "Label $pfName printed to $printing $printString"
- #>
- }
- default #Oops. More than 1 label found
- {
- "Found $($lblFound.Count) labels:"
- $lblFound
- 'Cannot print - There can be only one! (label per part number)'
- }
- }
- ''
- ''
- }
- until ($worksOrder -eq 'X')
- $conn.Close | Out-Null
Re: Problems installing RSEE on remote PC
(Apologies for combining 2 issues in the same post yesterday - drives me mad when my colleagues do that )
I reinstalled RSEE over & over until I captured one of the message popups (must be an easier way): So: it's only a warning & not an error, and the event log confirms that the install succeeded.
All now copacetic.
I reinstalled RSEE over & over until I captured one of the message popups (must be an easier way): So: it's only a warning & not an error, and the event log confirms that the install succeeded.
All now copacetic.