Thanks — that log shows exactly why the script didn’t reboot: it didn’t find any Device Parameters key for those FTDI instances, so (by the safe policy we used) it skipped creating anything and changedCount remained 0.
Two safe next steps. Run the diagnostic first so we know where (if anywhere) Device Parameters live for these instances — then, if you want, run the apply script that will create the Device Parameters keys and write the four values (and then reboot).
Run both from an elevated PowerShell.
1) Diagnostic — search the registry Enum tree for Device Parameters under any keys that reference your FTDI instances
This will list any Device Parameters keys under Enum that include VID_0403 (FTDI) and show a short sample of their values.
Save and run (or paste into an elevated PowerShell):
Diagnostic: find Device Parameters keys for FTDI devices and show their names/values
$pattern = 'VID
0403'
$enumBase = 'HKLM:\SYSTEM\CurrentControlSet\Enum'
Get-ChildItem -Path $enumBase -Recurse -ErrorAction SilentlyContinue |
Where-Object { $.PSPath -match $pattern } |
ForEach-Object {
$dp1 = Join-Path $
.PSPath 'Device Parameters'
$dp2 = Join-Path $.PSPath '0000\Device Parameters'
foreach ($dp in @($dp1,$dp2) {
if (Test-Path $dp) {
"" ; "FOUND: $dp" ; Get-ItemProperty -Path $dp -ErrorAction SilentlyContinue |
Select-Object -Property DeviceIdleEnabled,DefaultIdleState,UserSetDeviceIdleEnabled,SSIdleTimeout,@{Name='AllProps';Expression={$_.PSObject.Properties.Name -join ','}} |
Format-List
}
}
}
What to expect
- If you see one or more FOUND lines with Device Parameters paths, paste one or two of them here and I’ll tailor the apply command to those exact paths.
- If nothing is printed, that confirms the Enum subtree has no Device Parameters keys for the FTDI instances on this machine (common if the driver/INF never wrote them).
2) If diagnostic shows no Device Parameters keys (or you want to proceed): safe apply (creates Device Parameters where missing and writes values)
This script will:
- Create the Device Parameters key if missing, then write the four selective‑suspend values (only when they do not already exist), and
- NOT touch PortName,
- Log changes to your Desktop,
- Reboot only if at least one property was created (unless you use -WhatIf or -NoReboot).
Save as Create-FTDI-DeviceParams-and-SetValues.ps1 and run elevated (or paste into an elevated PowerShell to run):
param(
[switch]$WhatIf,
[switch]$NoReboot)
require elevation
if (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent.IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator) { Write-Error "Run as Administrator"; exit 1 }
$log = Join-Path $env:USERPROFILE ("Desktop\FTDI
CreateDeviceParams{0}.log" -f (Get-Date -Format yyyyMMdd
HHmmss)
"Started: $(Get-Date)" | Out-File $log
$ports = Get-PnpDevice -Class Ports -PresentOnly | Where-Object { ($.Manufacturer -and $
.Manufacturer -like 'FTDI') -or ($.InstanceId -and $_.InstanceId -match 'VID_0403') }
if (-not $ports) { "No FTDI ports found." | Tee-Object -FilePath $log -Append; exit 0 }
$created = 0
foreach ($p in $ports) {
"----" | Tee-Object -FilePath $log -Append
"Device: $($p.FriendlyName) [$($p.InstanceId)]" | Tee-Object -FilePath $log -Append
$inst = $p.InstanceId
$enumBase = 'HKLM:\SYSTEM\CurrentControlSet\Enum'
$parts = $inst -split '\'
$sub = [string]($parts -join '\')
$basePath = Join-Path $enumBase $sub
$dp = Join-Path $basePath 'Device Parameters'
create if missing
if (-not (Test-Path $dp) {
if ($WhatIf) {
"WhatIf: would create key $dp" | Tee-Object -FilePath $log -Append
$created++
} else {
try {
New-Item -Path $dp -Force | Out-Null
"Created key $dp" | Tee-Object -FilePath $log -Append
$created++
} catch { "ERROR creating key $dp : $($_.Exception.Message)" | Tee-Object -FilePath $log -Append; continue }
}
} else {
"Key exists: $dp" | Tee-Object -FilePath $log -Append
}
ensure the 4 properties exist (create only if missing)
$props = @{ DeviceIdleEnabled=0; DefaultIdleState=0; UserSetDeviceIdleEnabled=0; SSIdleTimeout=0 }
foreach ($kv in $props.GetEnumerator {
$name=$kv.Key; $val=$kv.Value
try { $exists = (Get-ItemProperty -Path $dp -Name $name -ErrorAction SilentlyContinue) -ne $null } catch { $exists = $false }
if ($exists) {
"$name already exists at $dp - skipping" | Tee-Object -FilePath $log -Append
} else {
if ($WhatIf) {
"WhatIf: would set $name = $val at $dp" | Tee-Object -FilePath $log -Append
$created++
} else {
try {
New-ItemProperty -Path $dp -Name $name -PropertyType DWord -Value $val -Force -ErrorAction Stop | Out-Null
"WROTE $name = $val at $dp" | Tee-Object -FilePath $log -Append
$created++
} catch { "ERROR writing $name at $dp : $($_.Exception.Message)" | Tee-Object -FilePath $log -Append }
}
}
}
}
"Created/changed count: $created" | Tee-Object -FilePath $log -Append
if (($created -gt 0) -and (-not $WhatIf) -and (-not $NoReboot) {
"Scheduling reboot in 15s..." | Tee-Object -FilePath $log -Append
Start-Process -FilePath 'shutdown.exe' -ArgumentList @('/r','/t','15','/c','Applying FTDI Device Parameter changes') -NoNewWindow
} else {
"No reboot scheduled." | Tee-Object -FilePath $log -Append
}
"Done" | Tee-Object -FilePath $log -Append
Write-Output "Log: $log"
If you prefer to run a one‑line variant (immediate apply, no script file), run this in an elevated PowerShell — it creates Device Parameters and writes the four values for every FTDI instance and then schedules a 15s reboot if anything was created:
$made=0; Get-PnpDevice -Class Ports -PresentOnly | Where-Object { ($
.Manufacturer -like 'FTDI') -or ($.InstanceId -match 'VID
0403') } | ForEach-Object { $inst=$.InstanceId; $dp="HKLM:\SYSTEM\CurrentControlSet\Enum\$inst\Device Parameters"; if(-not (Test-Path $dp){ New-Item -Path $dp -Force | Out-Null; $made++ } foreach($kv in @{DeviceIdleEnabled=0;DefaultIdleState=0;UserSetDeviceIdleEnabled=0;SSIdleTimeout=0}.GetEnumerator{ if(-not (Get-ItemProperty -Path $dp -Name $kv.Key -ErrorAction SilentlyContinue){ New-ItemProperty -Path $dp -Name $kv.Key -PropertyType DWord -Value $kv.Value -Force | Out-Null; $made++ } } }; if($made -gt 0){ Start-Process -FilePath 'shutdown.exe' -ArgumentList @('/r','/t','15','/c','Applying FTDI Device Parameter changes') -NoNewWindow } else { Write-Output "No changes needed." }
Recap / recommendation
- First run the diagnostic I gave. If it finds Device Parameters nodes already present we can safely adjust the script to set values only where needed (no creation).
- If diagnostic finds nothing (as your log indicates), run the apply script above to create Device Parameters and set values (or run the one‑liner). That will then schedule the reboot.
- If you prefer not to create keys, instead let me produce the INF AddReg snippet and instructions to deploy it (preferred persistent solution).
Which do you want me to do now — run the diagnostic (paste output) or apply-create+write (I’ll give the exact command to run)?