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, version and build: 5.5.154
32 or 64 bit version of product: 64
Operating system:
32 or 64 bit OS: 64
#search directory and store uin.mdb into variable
$test = (get-childitem "C:\ROWriterData" -Recurse -include ?????.mdb -Exclude "Ishop.mdb") | select name
$test2string = $test | Out-String
$testtrim = $test2string.Trim()
$testrefine = $testtrim.Remove(0, 286)
#create registry entries
New-Item -Path HKCU:\Software -Name "Progressive Automotive Systems" –Force
New-Item -Path "HKCU:\Software\Progressive Automotive Systems" -Name "R.O. Writer" –Force
New-ItemProperty -Path "HKCU:\SOFTWARE\Progressive Automotive Systems\R.O. Writer" -Name "DataPath" -Value "C:\ROWriterData" -Force
When I compile this with setting in the attached screen shot it add's spaces instead of removing them.
DO NOT POST SUBSCRIPTIONS, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM
Query adding Spaces after it is compiled
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.
Query adding Spaces after it is compiled
- Attachments
-
- Ashampoo_Snap_Wednesday, August 29, 2018_10h47m43s_002_.jpg (78.94 KiB) Viewed 3274 times
Re: Query adding Spaces after it is compiled
Trim only removes the leading and trailing spaces of a string. If you want all spaces removed, use the following line:
$test2string = $test2string.Replace( ' ', '')
$test2string = $test2string.Replace( ' ', '')
Brittney
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- Alexander Riedel
- Posts: 8479
- Last visit: Thu Mar 28, 2024 9:29 am
- Been upvoted: 37 times
Re: Query adding Spaces after it is compiled
From your post it is not really clear where you see spaces added.
Packaging does not modify your code, so I am not sure how spaces would be added.
Packaging does not modify your code, so I am not sure how spaces would be added.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: Query adding Spaces after it is compiled
When I compile it as a EXE and then run it, then it puts extra spaces inside of the Registry creation. Any suggestion to why this occurs?
- Alexander Riedel
- Posts: 8479
- Last visit: Thu Mar 28, 2024 9:29 am
- Been upvoted: 37 times
Re: Query adding Spaces after it is compiled
You will have to be a little bit more specific. Extra spaces where precisely?
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.