topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Saturday June 21, 2025, 1:53 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Recent Posts

Pages: prev1 ... 13 14 15 16 17 [18] 19 20 21 22 23 ... 225next
426
General Software Discussion / Re: Syncovery - OneDrive - Encryption
« Last post by 4wd on August 15, 2019, 11:04 AM »
I do assume I would need the pro version to do what I want if Syncovery can do it.

If you want Real-time Sync, Encryption, and Cloud Service integration, then yes.

So you are synching to OneDrive and it is encrypted and it is not a one time synch but can run in the background and automatically updates files added or changed to OneDrive?

Files are encrypted and file changes are mirrored on OneDrive within a few seconds of being detected on the system, (according to the testing I just did).

SyncBack Pro also offers similar features for a similar price, (mentioning because this is what I use at home), doesn't hurt to have more options.
427
Could avoid the GUI altogether and revert to a series of Read-Host prompt/answer inputs plus include the ability to run as a standard command if all parameters are fulfilled on the command line.

Would be the quickest way to make it portable.

W.r.t. filepaths, PowerShell (Core) is pretty agnostic when it comes to using / or \ - either will do, plus it sees multiple occurrences, (eg. ////), as just a single occurrence.

For example, the below are all the same path as far as PoSh (Core) is concerned:
D:\test\data\test.txt
d:test/data/test.txt
d:\\\\\\\\test///////data\\\\test.txt
d:\\\\\\\\test//\\\\data\/\/\/\/test.txt

It makes this aspect of PoSh scripts OS agnostic ... something they got exactly right :Thmbsup:
428
General Software Discussion / Re: Syncovery - OneDrive - Encryption
« Last post by 4wd on August 15, 2019, 04:58 AM »
One assumes you're using the Standard version of Syncovery since the Pro/Premium versions can access cloud services directly, (including OneDrive) ... then again, since the Standard version apparently doesn't have encryption (according to their Feature Matrix) ...

One has to wonder exactly which version you are using?


Addendum:
FWIW, just downloaded, installed, and created/ran a profile which synced to OneDrive - took all of 5 minutes.
Select Internet as the destination, select OneDrive from the drop-down selection, fill in the Account, continue with other settings.
When you first run the profile it will open your browser and you can log into Microsoft Live to authorise Syncovery access to OneDrive.
429
Four problems became apparent in PowerShell Core (Windows) for the above code:
  • Initial window size could not be set
  • The font used was not recognised
  • The FileBrowser did not work (locked up the console)
  • The Information window relies on VB routines

It ran and opened a GUI but you couldn't do anything.

I've installed PowerShell Core under Windows Subsytem for Linux (WSL) so I can have a play, (also installed on a RasPi I've got with me) - doesn't run at all under PoShCore (Linux), to be expected.
430
Living Room / Re: Windows 7 always slow after idle
« Last post by 4wd on August 14, 2019, 05:25 AM »
The MSI page says for compatibility, that my i5-8600K is only compatible with bios version 7B49v10.

You want this page: CPU Compatibility

The i5-8600(T/K) is listed which means it's supported until they say it's dropped from the BIOS in later versions - which they haven't.

ie. The version listed against a CPU is the minimum version of the BIOS required to support that CPU.
431
Do you think a Powershell Core implementation would make sense?


Yes, definitely ... but since I've only used Windows PowerShell up til now ...

2019-08-14 10_13_42.png

2019-08-14 10_17_17.png

The below is functionally similar to the original PoSh script, the changes are:
  • Put almost everything into Functions so they can be transplanted into other scripts.
  • Added a WPF GUI (the implemented version is just something simple but more than doubles the size of the script) - it would benefit from having a ListBox that shows the selected files and a TextBox that shows the progress of the operation.  I kept it simple so as to not invest too much time into something that might be replaced with either, for example, an Avalonia based interface or some other language/GUI, (eg. Python).
  • Added the ability to convert between RF Explorer, Sennheiser, and Shure input CSVs.  For example, select a Sennheiser file, select the Shure output option, hit Start.
  • Options to either delete the original files and create a distribution archive.

NOTE: In my limited testing it worked fine but there are most likely bugs and there is no error checking, (the original script didn't have any either).

Tested on: Windows 10 Pro x64, PowerShell 5.1.18362.145, .NET 4.8

Broken down into sections, you have:
  • Global variables - there are three, two of them are defined later in the script by prefacing with $global:
  • Functions - file request and working directory creation, conversions, archive creation
  • GUI - everything else plus what happens when you click the buttons

RFExplorer.ps1
Code: PowerShell [Select]
  1. <# This form was created using POSHGUI.com  a free online gui designer for PowerShell
  2. .NAME
  3.     .\RFExplorer.ps1
  4. #>
  5.  
  6. # Global variables
  7. $initMessage = 'This script lets you browse to and select the pertinent .csv spectrum scan files that were output by your RF Explorer device, sort them by creation time, join them together and output 2 seperate files plus the original un-modified scan files into a newly created subdirectory named with the current date and time.
  8.  
  9. 1. SHURE-importable
  10.         Shure Wireless workbench accepts .csv files consisting of
  11.         2 columns (no Headers) -> Frequency in MHz,Level in DBm
  12.         (columns seperated by a comma)
  13.                 492.6,-103
  14.                 492.625,-96
  15.                 492.65,-102
  16. 2. SENNHEISER-Importable
  17.         Sennheiser Wireless Systems Manager is more complicated. They expect a descriptive 2 column header then 3 columns of data -> Frequency in KHz;;Level in DB (columns seperated by a semi-colon)
  18.  
  19.                 Receiver;01
  20.                 Date/Time;$lastwrittentime
  21.                 RFUnit;dB
  22.                 Owner;$FirstName $LastName
  23.                 ScanCity;$ScanCity
  24.                 ScanComment;
  25.                 ScanCountry;$ScanCountry
  26.                 ScanDescription;$ScanDescription
  27.                 ScanInteriorExterior;$ScanInteriorORExterior
  28.                 ScanLatitude;
  29.                 ScanLongitude;
  30.                 ScanName;$ScanName
  31.                 ScanPostalCode;$ScanPostalCode
  32.  
  33.                 Frequency Range [kHz];$FreqRangeL;$FreqRangeH;$FreqSpan
  34.                 Frequency;RF level (%);RF level
  35.                 492600;;4
  36.                 492625;;11
  37.                 492650;;5
  38.  
  39. The $variables in the Sennheiser header get pulled from the info you enter into an initial popup dialog so you can archive AND/OR upload a zip file of the original RF Explorer scan chunks along with the 2 formatted files and a descriptive text file to an online database of venue scans from around the world    http://www.bestaudio.com/spectrum-scans/
  40. I am using Nuts AboutNets Touchstone Pro Software $49US   http://nutsaboutnets.com/touchstone/    to interact with the RF Explorer for setting scan parameters and actually running the scans. The native software that comes with RF explorer can do everything but I found it time consuming to break the spectrum down into smaller chunks to increase resolution'
  41.  
  42. Function Get-Files {
  43.   # Show an Open File Dialog and return the files selected by the user.
  44.   $FileBrowser = New-Object System.Windows.Forms.OpenFileDialog -Property @{
  45.     InitialDirectory = $scanDirectory
  46. #    InitialDirectory = [Environment]::GetFolderPath('MyDocuments')
  47.     Filter = 'RF Explorer Files|*.csv|All Files|*.*'
  48.     MultiSelect = $true
  49.   }
  50.  
  51.   $null = $FileBrowser.ShowDialog()
  52.  
  53.   if ($FileBrowser.FileNames.Count -eq 0) {
  54.     return
  55.   } else {
  56.     $RFexplorerDataDirectory = Split-Path $FileBrowser.FileNames[0] -Parent
  57.     $global:lastwrittentime = (Get-ItemProperty -Path $FileBrowser.FileNames[0]).LastWriteTime.tostring("MM-MMMM-dd-yyyy-hh-mm-ss")
  58.   }
  59.  
  60.   $currentdatetime = Get-Date -f ("MM-MMMM-dd-yyyy-hh-mm-ss")
  61.   $destDir = "$($RFexplorerDataDirectory)\$($currentdatetime)"
  62.   New-Item -ItemType Directory "$($destDir)" | Out-Null
  63.  
  64.   # Copy/Move selected files to Destination directory
  65.   for ($i = 0; $i -lt $FileBrowser.FileNames.Count; $i++) {
  66.   # Clear out non-CSV files from destination directory
  67.     if ($CheckBox1.CheckState) {
  68.       Move-Item $FileBrowser.FileNames[$i] -dest "$destDir"
  69.     } else {
  70.       Copy-Item $FileBrowser.FileNames[$i] -dest "$destDir"
  71.     }
  72.   }
  73.   return $destDir
  74. }
  75.  
  76. Function Senn-RFE {
  77.   param (
  78.     [double]$n1,
  79.     [double]$n2
  80.   )
  81.   if ($n1 -gt 1000) {
  82.     $n1 /= 1000
  83.     $n2 -= 107
  84.   }
  85.   return "$($n1);$($n2)"
  86. }
  87.  
  88. Function ConvertTo-RFE {
  89.   param (
  90.     [string]$file
  91.   )
  92.   Get-Content $file | `
  93.     Where-Object {$_ -match '^\d+.+'} | `
  94.     Foreach-Object {$_ -replace ";;" , ";"} | `
  95.     Foreach-Object {$_ -replace "," , ";"} | `
  96.     ForEach-Object {$fields = $_.Split(";") ;
  97.       Out-File -FilePath "intermediate.tmp" -InputObject (Senn-RFE $fields[0] $fields[1]) -Append -Encoding utf8}
  98. }
  99.  
  100. Function ConvertTo-Shure {
  101.   param (
  102.     [string]$file
  103.   )
  104.   (Get-Content $file) | `
  105.     Foreach-Object {$_ -replace " -" , "-"} | `
  106.     Foreach-Object {$_ -replace ";" , ","} | `
  107.     Set-Content -Path "SHURE-Importable-$($lastwrittentime).csv"
  108. }
  109.  
  110.  
  111. Function ConvertTo-Sennheiser {
  112.   param (
  113.     [string]$file
  114.   )
  115.   # Create a new array to temporarily house the dBm to dB conversion data that comes later
  116.   $BeingModified = New-Object System.Collections.ArrayList
  117.  
  118.   (Get-Content $file) | `
  119. #    Foreach-Object {$_ -replace "(\d{3})\.(\d{2})" , '$1$2'} |
  120. #    Foreach-Object {$_ -replace "(-\d{3})(\d{2})" , '$1.$2'} |
  121.     Foreach-Object {$_ -replace ";" , ";;"} | `
  122.     Foreach-Object {$_ -replace "," , ";;"} | `
  123. # Change the RF Level data from dBm to Sennheisers' dB by adding 107
  124.     Foreach-Object {$_
  125.       $fields = $_.Split(";")
  126.       $freq = [double]$fields[0]*1000
  127.       #$blank = $fields[1]
  128.       $dBm = [double]$fields[2]
  129.       [double]$dB = $dBm + 107
  130.       # Create array with the new values to use later to replace things in the new output file
  131.       [void]$BeingModified.Add("$freq;;$dB")
  132.     }
  133.  
  134.   $BeingModified | Set-Content $file
  135.   $wwbbasefile = "$($destDirectory)\$($file)"
  136.  
  137.   # Get FreqRange and Span Data into variables
  138.  
  139.   $FreqRangeL = Get-Content $wwbbasefile | Select -First 1
  140.   $FreqRangeH = Get-Content $wwbbasefile | Select -Last 1
  141.   $FreqRange_ = Get-Content $wwbbasefile | Select -Last 2
  142.  
  143.   # parse the CSV data back into separate variables, one for each column
  144.  
  145.   $dataArrayL = $FreqRangeL.Split(";")
  146.   $FreqRangeL = $dataArrayL[0]
  147.  
  148.   $dataArrayH = $FreqRangeH.Split(";")
  149.   $FreqRangeH = $dataArrayH[0]
  150.  
  151.   $dataArray_ = $FreqRange_.Split(";")
  152.   $FreqRange_ = $dataArray_[0]
  153.  
  154.   # Calculate the frequency span
  155.   $FreqSpan = $FreqRangeH - $FreqRange_
  156.  
  157.   # Define the Header required for Sennheiser Wireless Systems Manager to be able to read the .csv file
  158.  
  159.   $sennheader=
  160. @"
  161. Receiver;01
  162. Date/Time;$lastwrittentime
  163. RFUnit;dB
  164. Owner;$($TextBox1.Text) $($TextBox2.Text)
  165. ScanCity;$($TextBox3.Text)
  166. ScanComment;
  167. ScanCountry;$($ComboBox1.Text)
  168. ScanDescription;$($TextBox4.Text)
  169. ScanInteriorExterior;$($ComboBox2.Text)
  170. ScanLatitude;
  171. ScanLongitude;
  172. ScanName;$($TextBox5.Text)
  173. ScanPostalCode;$($TextBox6.Text)
  174. Frequency Range [kHz];$FreqRangeL;$FreqRangeH;$FreqSpan
  175. Frequency;RF level (%);RF level
  176. "@
  177.  
  178.  
  179.   # Insert the header text into  a text file
  180.   $sennheader | Set-Content sennheader.txt
  181.  
  182.   # Join the header file and .csv data into final output file
  183.   Get-Content sennheader.txt, $wwbbasefile | Set-Content "SENNHEISER-Importable-$($lastwrittentime).csv"
  184. }
  185.  
  186. Function Create-Distribution {
  187.   # Create a directory to store the zipped results for upload to Pet Erskines database
  188.   New-Item -ItemType Directory "$destDirectory\For Distribution" | Out-Null
  189.   $zipName = "$($destDirectory)\For Distribution\$($TextBox3.Text)-$($TextBox7.Text)-$($ComboBox1.Text)-$($TextBox8.Text)-$($lastwrittentime)-$($TextBox1.Text)-$($TextBox2.Text).zip"
  190.   Compress-Archive -Path "$($destDirectory)\*.csv" -DestinationPath "$($zipName)"
  191. }
  192.  
  193. Add-Type -AssemblyName Microsoft.VisualBasic
  194. Add-Type -AssemblyName System.Windows.Forms
  195. [System.Windows.Forms.Application]::EnableVisualStyles()
  196.  
  197. $Form                            = New-Object system.Windows.Forms.Form
  198. $Form.ClientSize                 = '400,500'
  199. $Form.text                       = "RFTSSE"
  200. $Form.TopMost                    = $false
  201.  
  202. $Label1                          = New-Object system.Windows.Forms.Label
  203. $Label1.text                     = "First Name:"
  204. $Label1.AutoSize                 = $true
  205. $Label1.width                    = 25
  206. $Label1.height                   = 10
  207. $Label1.location                 = New-Object System.Drawing.Point(25,20)
  208. $Label1.Font                     = 'Microsoft Sans Serif,10'
  209.  
  210. $TextBox1                        = New-Object system.Windows.Forms.TextBox
  211. $TextBox1.multiline              = $false
  212. $TextBox1.width                  = 210
  213. $TextBox1.height                 = 20
  214. $TextBox1.location               = New-Object System.Drawing.Point(160,18)
  215. $TextBox1.Font                   = 'Microsoft Sans Serif,10'
  216.  
  217. $Label2                          = New-Object system.Windows.Forms.Label
  218. $Label2.text                     = "Last Name:"
  219. $Label2.AutoSize                 = $true
  220. $Label2.width                    = 25
  221. $Label2.height                   = 10
  222. $Label2.location                 = New-Object System.Drawing.Point(25,46)
  223. $Label2.Font                     = 'Microsoft Sans Serif,10'
  224.  
  225. $TextBox2                        = New-Object system.Windows.Forms.TextBox
  226. $TextBox2.multiline              = $false
  227. $TextBox2.width                  = 210
  228. $TextBox2.height                 = 20
  229. $TextBox2.location               = New-Object System.Drawing.Point(160,43)
  230. $TextBox2.Font                   = 'Microsoft Sans Serif,10'
  231.  
  232. $Label3                          = New-Object system.Windows.Forms.Label
  233. $Label3.text                     = "Scan City:"
  234. $Label3.AutoSize                 = $true
  235. $Label3.width                    = 25
  236. $Label3.height                   = 10
  237. $Label3.location                 = New-Object System.Drawing.Point(25,70)
  238. $Label3.Font                     = 'Microsoft Sans Serif,10'
  239.  
  240. $TextBox3                        = New-Object system.Windows.Forms.TextBox
  241. $TextBox3.multiline              = $false
  242. $TextBox3.width                  = 210
  243. $TextBox3.height                 = 20
  244. $TextBox3.location               = New-Object System.Drawing.Point(160,68)
  245. $TextBox3.Font                   = 'Microsoft Sans Serif,10'
  246.  
  247. $Label4                          = New-Object system.Windows.Forms.Label
  248. $Label4.text                     = "Scan Country:"
  249. $Label4.AutoSize                 = $true
  250. $Label4.width                    = 25
  251. $Label4.height                   = 10
  252. $Label4.location                 = New-Object System.Drawing.Point(25,95)
  253. $Label4.Font                     = 'Microsoft Sans Serif,10'
  254.  
  255. $ComboBox1                       = New-Object system.Windows.Forms.ComboBox
  256. $ComboBox1.width                 = 210
  257. $ComboBox1.height                = 20
  258. @("Afghanistan","Albania","Algeria","American Samoa","Andorra","Angola","Anguilla","Antarctica","Antigua and Barbuda","Argentina","Armenia","Aruba","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bermuda","Bhutan","Bolivia","Bosnia and Herzegovina","Botswana","Bouvet Island","Brazil","British Antarctic Territory","British Indian Ocean Territory","British Virgin Islands","Brunei","Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Canada","Canton and Enderbury Islands","Cape Verde","Cayman Islands","Central African Republic","Chad","Chile","China","Christmas Island","Cocos [Keeling] Islands","Colombia","Comoros","Congo - Brazzaville","Congo - Kinshasa","Cook Islands","Costa Rica","Croatia","Cuba","Cyprus","Czech Republic","Côte d’Ivoire","Denmark","Djibouti","Dominica","Dominican Republic","Dronning Maud Land","East Germany","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Ethiopia","Falkland Islands","Faroe Islands","Fiji","Finland","France","French Guiana","French Polynesia","French Southern Territories","French Southern and Antarctic Territories","Gabon","Gambia","Georgia","Germany","Ghana","Gibraltar","Greece","Greenland","Grenada","Guadeloupe","Guam","Guatemala","Guernsey","Guinea","Guinea-Bissau","Guyana","Haiti","Heard Island and McDonald Islands","Honduras","Hong Kong SAR China","Hungary","Iceland","India","Indonesia","Iran","Iraq","Ireland","Isle of Man","Israel","Italy","Jamaica","Japan","Jersey","Johnston Island","Jordan","Kazakhstan","Kenya","Kiribati","Kuwait","Kyrgyzstan","Laos","Latvia","Lebanon","Lesotho","Liberia","Libya","Liechtenstein","Lithuania","Luxembourg","Macau SAR China","Macedonia","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Martinique","Mauritania","Mauritius","Mayotte","Metropolitan France","Mexico","Micronesia","Midway Islands","Moldova","Monaco","Mongolia","Montenegro","Montserrat","Morocco","Mozambique","Myanmar [Burma]","Namibia","Nauru","Nepal","Netherlands","Netherlands Antilles","Neutral Zone","New Caledonia","New Zealand","Nicaragua","Niger","Nigeria","Niue","Norfolk Island","North Korea","North Vietnam","Northern Mariana Islands","Norway","Oman","Pacific Islands Trust Territory","Pakistan","Palau","Palestinian Territories","Panama","Panama Canal Zone","Papua New Guinea","Paraguay","People's Democratic Republic of Yemen","Peru","Philippines","Pitcairn Islands","Poland","Portugal","Puerto Rico","Qatar","Romania","Russia","Rwanda","Réunion","Saint Barthélemy","Saint Helena","Saint Kitts and Nevis","Saint Lucia","Saint Martin","Saint Pierre and Miquelon","Saint Vincent and the Grenadines","Samoa","San Marino","Saudi Arabia","Senegal","Serbia","Serbia and Montenegro","Seychelles","Sierra Leone","Singapore","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","South Georgia and the South Sandwich Islands","South Korea","Spain","Sri Lanka","Sudan","Suriname","Svalbard and Jan Mayen","Swaziland","Sweden","Switzerland","Syria","São Tomé and Príncipe","Taiwan","Tajikistan","Tanzania","Thailand","Timor-Leste","Togo","Tokelau","Tonga","Trinidad and Tobago","Tunisia","Turkey","Turkmenistan","Turks and Caicos Islands","Tuvalu","U.S. Minor Outlying Islands","U.S. Miscellaneous Pacific Islands","U.S. Virgin Islands","Uganda","Ukraine","Union of Soviet Socialist Republics","United Arab Emirates","United Kingdom","United States","Unknown or Invalid Region","Uruguay","Uzbekistan","Vanuatu","Vatican City","Venezuela","Vietnam","Wake Island","Wallis and Futuna","Western Sahara","Yemen","Zambia","Zimbabwe","Åland Islands") | ForEach-Object {[void] $ComboBox1.Items.Add($_)}
  259. $ComboBox1.location              = New-Object System.Drawing.Point(160,93)
  260. $ComboBox1.Font                  = 'Microsoft Sans Serif,10'
  261.  
  262. $Label5                          = New-Object system.Windows.Forms.Label
  263. $Label5.text                     = "Scan Description:"
  264. $Label5.AutoSize                 = $true
  265. $Label5.width                    = 25
  266. $Label5.height                   = 10
  267. $Label5.location                 = New-Object System.Drawing.Point(25,121)
  268. $Label5.Font                     = 'Microsoft Sans Serif,10'
  269.  
  270. $TextBox4                        = New-Object system.Windows.Forms.TextBox
  271. $TextBox4.multiline              = $false
  272. $TextBox4.width                  = 210
  273. $TextBox4.height                 = 20
  274. $TextBox4.location               = New-Object System.Drawing.Point(160,119)
  275. $TextBox4.Font                   = 'Microsoft Sans Serif,10'
  276.  
  277. $Label6                          = New-Object system.Windows.Forms.Label
  278. $Label6.text                     = "Scan Int or Ext:"
  279. $Label6.AutoSize                 = $true
  280. $Label6.width                    = 25
  281. $Label6.height                   = 10
  282. $Label6.location                 = New-Object System.Drawing.Point(25,146)
  283. $Label6.Font                     = 'Microsoft Sans Serif,10'
  284.  
  285. $ComboBox2                       = New-Object system.Windows.Forms.ComboBox
  286. $ComboBox2.width                 = 210
  287. $ComboBox2.height                = 20
  288. @('Interior','Exterior') | ForEach-Object {[void] $ComboBox2.Items.Add($_)}
  289. $ComboBox2.location              = New-Object System.Drawing.Point(160,144)
  290. $ComboBox2.Font                  = 'Microsoft Sans Serif,10'
  291.  
  292. $Label7                          = New-Object system.Windows.Forms.Label
  293. $Label7.text                     = "Scan Name:"
  294. $Label7.AutoSize                 = $true
  295. $Label7.width                    = 25
  296. $Label7.height                   = 10
  297. $Label7.location                 = New-Object System.Drawing.Point(25,172)
  298. $Label7.Font                     = 'Microsoft Sans Serif,10'
  299.  
  300. $TextBox5                        = New-Object system.Windows.Forms.TextBox
  301. $TextBox5.multiline              = $false
  302. $TextBox5.width                  = 210
  303. $TextBox5.height                 = 20
  304. $TextBox5.location               = New-Object System.Drawing.Point(160,170)
  305. $TextBox5.Font                   = 'Microsoft Sans Serif,10'
  306.  
  307. $Label8                          = New-Object system.Windows.Forms.Label
  308. $Label8.text                     = "Scan Postcode:"
  309. $Label8.AutoSize                 = $true
  310. $Label8.width                    = 25
  311. $Label8.height                   = 10
  312. $Label8.location                 = New-Object System.Drawing.Point(25,197)
  313. $Label8.Font                     = 'Microsoft Sans Serif,10'
  314.  
  315. $TextBox6                        = New-Object system.Windows.Forms.TextBox
  316. $TextBox6.multiline              = $false
  317. $TextBox6.width                  = 210
  318. $TextBox6.height                 = 20
  319. $TextBox6.location               = New-Object System.Drawing.Point(160,195)
  320. $TextBox6.Font                   = 'Microsoft Sans Serif,10'
  321.  
  322. $Label9                          = New-Object system.Windows.Forms.Label
  323. $Label9.text                     = "Scan State/Province:"
  324. $Label9.AutoSize                 = $true
  325. $Label9.width                    = 25
  326. $Label9.height                   = 10
  327. $Label9.location                 = New-Object System.Drawing.Point(25,222)
  328. $Label9.Font                     = 'Microsoft Sans Serif,10'
  329.  
  330. $TextBox7                        = New-Object system.Windows.Forms.TextBox
  331. $TextBox7.multiline              = $false
  332. $TextBox7.width                  = 210
  333. $TextBox7.height                 = 20
  334. $TextBox7.location               = New-Object System.Drawing.Point(160,220)
  335. $TextBox7.Font                   = 'Microsoft Sans Serif,10'
  336.  
  337. $Label10                         = New-Object system.Windows.Forms.Label
  338. $Label10.text                    = "Scan Venue:"
  339. $Label10.AutoSize                = $true
  340. $Label10.width                   = 25
  341. $Label10.height                  = 10
  342. $Label10.location                = New-Object System.Drawing.Point(25,247)
  343. $Label10.Font                    = 'Microsoft Sans Serif,10'
  344.  
  345. $TextBox8                        = New-Object system.Windows.Forms.TextBox
  346. $TextBox8.multiline              = $false
  347. $TextBox8.width                  = 210
  348. $TextBox8.height                 = 20
  349. $TextBox8.location               = New-Object System.Drawing.Point(160,245)
  350. $TextBox8.Font                   = 'Microsoft Sans Serif,10'
  351.  
  352. $Button1                         = New-Object system.Windows.Forms.Button
  353. $Button1.text                    = "Select files ..."
  354. $Button1.width                   = 300
  355. $Button1.height                  = 30
  356. $Button1.location                = New-Object System.Drawing.Point(50,280)
  357. $Button1.Font                    = 'Microsoft Sans Serif,10'
  358.  
  359. $Button2                         = New-Object system.Windows.Forms.Button
  360. $Button2.text                    = "Start"
  361. $Button2.width                   = 95
  362. $Button2.height                  = 30
  363. $Button2.location                = New-Object System.Drawing.Point(50,320)
  364. $Button2.Font                    = 'Microsoft Sans Serif,10'
  365.  
  366. $Label11                         = New-Object system.Windows.Forms.Label
  367. $Label11.text                    = "Output"
  368. $Label11.AutoSize                = $true
  369. $Label11.width                   = 25
  370. $Label11.height                  = 10
  371. $Label11.location                = New-Object System.Drawing.Point(228,330)
  372. $Label11.Font                    = 'Microsoft Sans Serif,10'
  373.  
  374. $RadioButton1                    = New-Object system.Windows.Forms.RadioButton
  375. $RadioButton1.text               = "Sennheiser"
  376. $RadioButton1.AutoSize           = $true
  377. $RadioButton1.width              = 104
  378. $RadioButton1.height             = 20
  379. $RadioButton1.location           = New-Object System.Drawing.Point(213,350)
  380. $RadioButton1.Font               = 'Microsoft Sans Serif,10'
  381.  
  382. $RadioButton2                    = New-Object system.Windows.Forms.RadioButton
  383. $RadioButton2.text               = "Shure"
  384. $RadioButton2.AutoSize           = $true
  385. $RadioButton2.width              = 104
  386. $RadioButton2.height             = 20
  387. $RadioButton2.location           = New-Object System.Drawing.Point(213,370)
  388. $RadioButton2.Font               = 'Microsoft Sans Serif,10'
  389.  
  390. $RadioButton3                    = New-Object system.Windows.Forms.RadioButton
  391. $RadioButton3.text               = "RF Explorer"
  392. $RadioButton3.AutoSize           = $true
  393. $RadioButton3.width              = 104
  394. $RadioButton3.height             = 20
  395. $RadioButton3.location           = New-Object System.Drawing.Point(213,390)
  396. $RadioButton3.Font               = 'Microsoft Sans Serif,10'
  397.  
  398. $RadioButton4                    = New-Object system.Windows.Forms.RadioButton
  399. $RadioButton4.text               = "Combined"
  400. $RadioButton4.AutoSize           = $true
  401. $RadioButton4.width              = 104
  402. $RadioButton4.height             = 20
  403. $RadioButton4.Checked            = $true
  404. $RadioButton4.location           = New-Object System.Drawing.Point(213,410)
  405. $RadioButton4.Font               = 'Microsoft Sans Serif,10'
  406.  
  407. $CheckBox1                       = New-Object system.Windows.Forms.CheckBox
  408. $CheckBox1.text                  = "Delete originals"
  409. $CheckBox1.AutoSize              = $false
  410. $CheckBox1.width                 = 120
  411. $CheckBox1.height                = 20
  412. $CheckBox1.location              = New-Object System.Drawing.Point(50,370)
  413. $CheckBox1.Font                  = 'Microsoft Sans Serif,10'
  414.  
  415. $CheckBox2                       = New-Object system.Windows.Forms.CheckBox
  416. $CheckBox2.text                  = "Create archive"
  417. $CheckBox2.AutoSize              = $false
  418. $CheckBox2.width                 = 120
  419. $CheckBox2.height                = 20
  420. $CheckBox2.Checked               = $true
  421. $CheckBox2.location              = New-Object System.Drawing.Point(50,390)
  422. $CheckBox2.Font                  = 'Microsoft Sans Serif,10'
  423.  
  424. $Button3                         = New-Object system.Windows.Forms.Button
  425. $Button3.text                    = "Information"
  426. $Button3.width                   = 100
  427. $Button3.height                  = 30
  428. $Button3.location                = New-Object System.Drawing.Point(150,440)
  429. $Button3.Font                    = 'Microsoft Sans Serif,10'
  430.  
  431. $Form.controls.AddRange(@($Label1,$Label2,$Label3,$Label4,$Label5,$Label6,$Label7,$Label8,$Label9,$Label10,$Label11,$TextBox1,$TextBox2,$TextBox3,$TextBox4,$TextBox5,$TextBox6,$TextBox7,$TextBox8,$ComboBox1,$ComboBox2,$Button1,$Button2,$Button3,$RadioButton1,$RadioButton2,$RadioButton3,$RadioButton4,$CheckBox1,$CheckBox2))
  432.  
  433. # Select Files Button
  434. $Button1.Add_Click({
  435.   # Get the directory the working files are in
  436.   $global:destDirectory = Get-Files
  437.  
  438.   # Destination directory becomes working directory, so Push it
  439.   Push-Location -Path "$destDirectory"
  440.  
  441.   # Sort RF Explorer created .csv files by date and time, concat them into a temporary file
  442.   Get-ChildItem *.csv | sort LastWriteTime | % {$(Get-Content $_)} | Set-Content joined.tmp
  443. })
  444.  
  445. # Start Button
  446. $Button2.Add_Click({
  447.   if ($RadioButton1.Checked) {
  448.     ConvertTo-RFE joined.tmp
  449.     ConvertTo-Sennheiser intermediate.tmp
  450.   }
  451.   if ($RadioButton2.Checked) {
  452.     ConvertTo-RFE joined.tmp
  453.     ConvertTo-Shure intermediate.tmp
  454.   }
  455.   if ($RadioButton3.Checked) {
  456.     ConvertTo-RFE joined.tmp
  457.   }
  458.   if ($RadioButton4.Checked) {
  459.     ConvertTo-Shure joined.tmp
  460.     ConvertTo-Sennheiser joined.tmp
  461.   }
  462.  
  463.   # Remove non-CSV files
  464.   Remove-Item -Path "$($destDirectory)\*" -Exclude *.csv
  465.  
  466.   # Create archive for distribution
  467.   if ($CheckBox2.CheckState) {
  468.     Create-Distribution
  469.   }
  470.  
  471.   Pop-Location
  472. })
  473.  
  474. # Information Button
  475. $Button3.Add_Click({
  476.   $result = [Microsoft.VisualBasic.Interaction]::MsgBox($initMessage, 'OKOnly,SystemModal,Information', 'RFTSSE')
  477. })
  478.  
  479. [void]$Form.ShowDialog()
432
Living Room / Re: Windows 7 always slow after idle
« Last post by 4wd on August 13, 2019, 05:10 AM »
I've usually found that when I've done a BIOS update, changed/reset BIOS, moved a system drive to another motherboard, or something similar and the system crashes on Windows start consistently (including in Safe Mode) then I've done something stupid like specified AHCI i.l.o. SATA (or v.v.) in the BIOS.

Changing it back to SATA (or AHCI) has normally fixed the problem - this can also apply to any 3rd party SATA i/face chipsets.
433
I tried the script out on a Windows 10 Pro box, but didn't notice dialog boxes being behind things.  Script execution was tested both from Windows Explorer as well as from a Powershell window.  It might be helpful to be able to replicate the issue -- perhaps it's for particular versions of Windows?

Interestingly, I always had one of its dialogs open behind other windows, (either the OpenFile or the final Retry/Cancel), until I added the above run check.

The Retry/Cancel dialog still opens behind other windows sometimes.

The other problem, which I believe is related to the use of the Show-Command cmdlet, is that selecting Cancel still opens the OpenFile dialog.

Regarding running on macos, I looked a bit into 4wd's Avalonia idea, and came across: https://github.com/i...nsoftware/psavalonia "Avalonia bindings for PowerShell".  The supported versions of Powershell there look like Powershell Core though, so I tried running the script via Powershell Core.  The result was a fair number of error messages so I stopped its execution.

Due to the use of Show-Command, it tries to create a Window using WPF, (by the looks), and fails under PowerShell Core, (doesn't exist) - you get the errors in PoShCore regardless of whether Avalonia is installed or not.

Regarding "Convert .csv between existing manufacturer created scans", perhaps if this general conversion portion were implemented, the current script might benefit from being based on it.

This would be a better idea, I might get a chance to look at it later and try and isolate the relevant routines, (still overseas on a low-powered laptop atm).
434
General Software Discussion / Re: my solution to Virus Totaluploader
« Last post by 4wd on August 10, 2019, 06:26 AM »
what's this?
[ Invalid Attachment ]

Those four icons are inserted into all windows by DisplayFusion:
  • Resize window to 60% of the monitor in the lower right corner
  • Resize to 50% screen size, full height, right side
  • Next wallpaper for all monitors
  • Pin window as topmost

There are many more operations that can be pinned to a windows titlebar.

The meaning of VT is to test any site or file BEFORE downloading anything, not to download and only then test.

The meaning of VT is to test any file, not just before you download - that's why it has an upload file feature.

After all, how do expect to test a suspicious file that comes in via, for example, email, another computer on a network, a flash drive, etc, etc ?
435
In it's current form, there is a niggling issue where a file selection dialog popup appears behind the main window and unless you know it's there, the thing appears to be locked up. I was unable to solve it in a reasonable amount of time and got frustrated.

From here System.Windows.Forms.OpenFileDialog always ontop - add a check for how the script was run and set $ShowHelp appropriately:

Code: PowerShell [Select]
  1. function Read-OpenFileDialog([string]$WindowTitle, [string]$InitialDirectory, [string]$Filter = "All files (*.*)|*.*", [switch]$AllowMultiSelect)
  2. {
  3.     Add-Type -AssemblyName System.Windows.Forms
  4.     $openFileDialog = New-Object System.Windows.Forms.OpenFileDialog
  5.     $ShowHelp = $false
  6. # See https://community.idera.com/database-tools/powershell/ask_the_experts/f/learn_powershell_from_don_jones-24/13493/system-windows-forms-openfiledialog-always-ontop
  7.     if ($Host.name -eq "ConsoleHost") {$ShowHelp = $true}
  8.     $openFileDialog.Title = $WindowTitle
  9.     if (![string]::IsNullOrWhiteSpace($InitialDirectory)) { $openFileDialog.InitialDirectory = $InitialDirectory }
  10.     $openFileDialog.Filter = $Filter
  11.     if ($AllowMultiSelect) { $openFileDialog.MultiSelect = $true }
  12.     $openFileDialog.ShowHelp = $ShowHelp    # Without this line the ShowDialog() function may hang depending on system configuration and running from console vs. ISE.
  13.     $openFileDialog.ShowDialog() > $null
  14.     if ($AllowMultiSelect) { return $openFileDialog.Filenames } else { return $openFileDialog.Filename }
  15. }
436
There's now the Avalonia Project which provides a cross-platform UI solution for PowerShell (using XAML), (Windows, Linux, OSX), currently in beta but it shouldn't be hard to add a simple GUI to the script.
437
Developer's Corner / Re: Looking for freeware command line text to PDF
« Last post by 4wd on August 03, 2019, 03:13 PM »
That's the same name as the utility quoted in the original post.  Is it the same utility?  Or just another by the same name?

The OP references a post by me which includes a quote by jity2 which mentions "txttopdf.exe" - different name, (txt2pdf not mentioned in that whole thread - typo or mis-link?).

There are multiple versions of executables called txt2pdf including this one from Sourceforge but it puts up a requester when it finishes which makes it unsuitable for CLI batch use.

The one I linked is just a search result, (that I tested against a few files), that lets you also specify a few output options that should cover the majority of cases for simple text conversion.  As a bonus its website tested clean against VirusTotal.

In theory, you could do it all using PowerShell, for example, this code from TechNet, but I could only get it to produce blank PDFs and after staring at it for 30 minutes and not being able to work out what the hell was happening, decided it was easier to use the results of the Google search :-\ ... why reinvent the wheel?
438
Developer's Corner / Re: Looking for freeware command line text to PDF
« Last post by 4wd on August 03, 2019, 08:05 AM »
As long as your text is formatted beforehand, (it will truncate lines that don't fit your chosen output dimensions), then txt2pdf, (just another of many), is lightweight and fast.

TXT2PDF
TXT2PDF is a command-line tool for encoding ASCII as PDF. See the "ReadMe" file included with the zip for options and usage.

Example of calling TXT2PDF:

   txt2pdf -i"C:\temp\my ASCII file.txt" -o"C:\temp\pdfout.pdf" -w17 -h11
In this example, txt2pdf reads a file ("my ASCII file.txt") and writes it to a pdf ("pdfout.pdf"). The "-w" switch defines the page width as 17 inches; the "-h" switch defines the page height as 11 inches. Note that there are no spaces bewteen the flags and the associated parameters. See the ReadMe file for details.
439
Living Room / Re: For those with a CrashPlan...
« Last post by 4wd on July 30, 2019, 05:56 AM »
BUT: Spideroak website seems to suggest they support webdav, but I can't find any info about what url to connect to.. any thoughts?

I would have thought the opposite is true: FTP, WebDAV, and Web Access
Neither FTP clients, WebDAV clients, nor web browsers are very well suited to doing cryptography as part of the upload/download process, so accessing your data this way would require the server to first decrypt your data, and then give it to your browser. This breaks our no knowledge model, where SpiderOak does not have your encryption keys, and SpiderOak servers are entirely unable to decrypt, read, or send any data.

...

Nevertheless, convenient web access is important to some people, so we did build a web access option. It stores the user's password (and derived keys) in memory only -- never writing the session file to disk -- and purges them from memory as soon as the session ends. On our website, we actually recommend against using the web interface at all due to this issue, but we provide it anyway, due to overwhelming customer demand.

ie. Of the three methods mentioned, they've chosen to only implement the last - no support for FTP/WebDAV.

Just as a matter of interest I had a look at iDrive w.r.t. WebDAV - they do provide it but only if you used the default system generated encryption key on signup.  If you chose your own private key then you're in the same boat as with SpiderOak.
440
Living Room / Re: Gadget WEEKENDS
« Last post by 4wd on July 27, 2019, 05:56 PM »
Received my new Raspberry Pi 4B 4GB recently:

As well as a new "case" for my RasPi3B+ (which dropped its operating temperature to about 32°C):

Out of curiosity, what are you using your RPis for?

BitTorrent, Usenet, FTP, video stream recording, BBC iPlayer recording, local TV catchup recording, media server for Alexa, anything else I can think of.

Probably retire the 1B and 2B, just split tasks between the 3B, 3B+, and 4B.
441
Living Room / Re: Gadget WEEKENDS
« Last post by 4wd on July 27, 2019, 10:19 AM »
Received my new Raspberry Pi 4B 4GB recently:

signal-2019-07-17-162228.jpg

As well as a new "case" for my RasPi3B+ (which dropped its operating temperature to about 32°C):

signal-2019-05-28-114232.jpg

Waiting on a version for the RasPi4B to arrive.
442
General Software Discussion / Re: Fun and Games with 2fa Lockout Problem
« Last post by 4wd on July 17, 2019, 01:45 PM »
My experience:
1) ebay: Contact via the hard-to-find contact point for defunct hardware 2FA keys, (thing lasted about 10 years).  Result: They removed 2FA without even verifying I was the owner of the account.
2) CoinJar (Crypto): Wanted to disable 2FA by removing authorised devices in their app because I had changed phones and forgot to backup their app data before doing a factory reset.  Result: Had to contact them via email and get them to remove defunct phones from my account so I could add valid ones, (couldn't log into the account via web until I did), they wanted to know all contact details, etc, etc - plus since in Australia they require Drivers Licence, Passport, or something similar before you could trade I could also give them that info.
3) Namecheap: Wanted to disable the 2FA that originally used their own app, (I'd swapped phone and the 'fingerprint' had changed), so I could use Authenticator instead.  Result: They wanted to know everything: contact details, what the last transaction was and what means/card was used to pay for it, etc, etc ... then they removed 2FA.

All-in-all, just use their contact info and see how far you get, if you can provide details of the account with maybe a transaction or two ... you may get lucky.

FWIW, besides Authenticator, the 2FA tokens are now also added to KeePass, (by way of the Tray TOTP plugin), which gives me multiple redundancies, (synced across all computers/laptops/Androids), and covers all the usual 6 character 2FA plus PayPal 2FA and Steam 2FA.

The Authenticator dBase is also backed up, (requires root though).
443
Living Room / Re: Share your photos! Travel shots, photoblogs, etc.
« Last post by 4wd on July 09, 2019, 07:18 AM »
View from Prinsengracht 275-253, (outside Ann Frank House):
IMG_20190705_115211068.jpg

Robin Hood's Bayw (North Yorkshire):
IMG_20190707_115657160.jpg
444
Living Room / Re: Share your photos! Travel shots, photoblogs, etc.
« Last post by 4wd on July 09, 2019, 07:07 AM »
Sunset over Cowbar:
IMG_20190621_213716282.jpg

The Lizardw (Cornwall):
IMG_20190625_124501591.jpg

Hugh Townw (Isles of Scilly):
IMG_20190626_153017144.jpg

They are super photos 4wd, the sort you'd see on postcards (not that I have received a postcard in years!)

Thanks, they're just shots with the phone and then Google Photos applies filters, panorama, animation, etc.
445
General Software Discussion / Re: Out, damned WiFi spot! Out, I say!
« Last post by 4wd on July 09, 2019, 06:55 AM »
The page below gives you the standard methods of deleting WiFi networks, (Forget and netsh), and also shows you how to remove from the registry:

How to Delete Wireless Network Profiles in Windows 10 / 8 / 7

Method 3: Delete Wireless Network Profile Using Registry Editor

  • Open the Registry Editor and navigate to the following key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles
  • Click each subkey under Profiles, and check the ProfileName value on the right to see if that is the wireless network connection you want to remove. Once you find the subkey, right-click on it and select Delete.

Might need to Restart after.
446
Living Room / Re: Is it possible to change the buttons in Motorola G7?
« Last post by 4wd on June 30, 2019, 06:17 AM »
An option that might be of interest:
the G7 also has one button navigation, not sure how it works, you could let is know if you try it.

First thing I enabled on my G5+, prefer to have screen real estate than waste it on software buttons, (takes me a few seconds to wonder why it's not working when I grab my sister's G5+ because she doesn't use it ;D).

Paired with Nova Launcher where a single tap opens Search/Frequent/Recent/Newest|Updated apps, turns the fingerprint reader into a much more useful device.

I would think Single Button Navigation is more useful for those that use their device primarily one-handed, (as I do), a useful alternative/partner to the Swipe to Shrink Screen function.

As for swapping the Back and Recent buttons, you'll probably need to use a third party launcher, it's not an option on stock Android - which Motorola uses.
447
Living Room / Re: Share your photos! Travel shots, photoblogs, etc.
« Last post by 4wd on June 13, 2019, 06:50 AM »
IMG_20190511_210539432_HDR-EFFECTS.jpg
IMG_20190606_210327583_HDR-PANO.jpg
IMG_20190606_213547087-EFFECTS.jpg
448
Living Room / Re: How to purchase "USA shipping only" products from outside USA
« Last post by 4wd on May 09, 2019, 02:00 PM »
Edit: if I were in a position to take you up on your offer, I'd for sure invite you to try it out. You might just get converted.

I don't think so ;)
  • Trees spaced appropriately apart are hard to come by in the desert,
  • Rolling a swag out takes a couple of minutes which leaves more time for drinking enjoying the environment,
  • Rolling a swag up takes a couple of minutes, good when you want to move fast ie. it's about to downpour, fire, whatever,
  • We have space to spare in the Landcruiser: swags, table, chairs, fridge, food, fuel, etc, etc.

We're four wheel drivers, always looking for a new, more challenging track and trying to cover as much distance as possible ... we try not to spend more than a day in one place.

BTW, Amazon.com is not showing it in stock either AFAICT.
449
Living Room / Re: How to purchase "USA shipping only" products from outside USA
« Last post by 4wd on May 09, 2019, 04:37 AM »
If you're not in a hurry then I have the following option available, purchase from the EU website, (or anywhere else you can find it in the EU/UK), and get it sent to me in the UK, I can bring it back to Oz in September when I return - then you can either pick it up from me, (3766), or I stick it in a AusPost 3kg satchel.

PS. Promise I won't use it, much easier to roll out a swag  :P

IMG_20180310_073830256_HDR.jpg
450
Living Room / Re: How to expand laptop storage?
« Last post by 4wd on May 07, 2019, 04:14 PM »
It's been 19 months and this thread is still relevant ... mainly because, as usual, nothing was done using the info given in it ... this is going to turn into another 5 year thread, isn't it?

Don't suppose we could merge them?

FWIW, Amazon UK currently:
500GB mSata 860 EVO Samsung  (Write ~520MB/s, Read ~550+MB/s - optimal conditions) ~£85
400GB uSD A1, A2, U3/V30 Sandisk/Samsung (Rated Write minimum 10, 20, 30MB/s respectively, Read ~90-100MB/s) ~£80-160

Do your research ...
Pages: prev1 ... 13 14 15 16 17 [18] 19 20 21 22 23 ... 225next