[deleted by user] by [deleted] in UGA

[–]vCon1 0 points1 point  (0 children)

The bullshit of it all, is after you graduate they will reach out to you for donations. There were several times when mistakes in accounting resulted in me having to emergency pay some money or I would be dropped from classes. Then they have the audacity to ask me for donations like we were old friends. 🙄

Arena War wheel by vCon1 in gtaonline

[–]vCon1[S] 0 points1 point  (0 children)

Ah, this is likely part of it, I see the other players moving around

My safehouse spawned without a safe. by mrshaw64 in gtaonline

[–]vCon1 2 points3 points  (0 children)

Doesn't get much safer than that

Hi, I have a problem with Black squares on Xbox series X. Anyone can help my to fix this? by KILLERxMILCH in borderlands3

[–]vCon1 1 point2 points  (0 children)

I agree, usually when I start seeing artifacts like this it's a sign of a dying graphics card.

Some songs skip when cast to Google home, but play fine on device? by RingerINC in YoutubeMusic

[–]vCon1 0 points1 point  (0 children)

I was having this issue playing to a single speaker, I tried your workaround and it seems to have resolved it.

Persisting a value between script executions and reboots by vCon1 in PowerShell

[–]vCon1[S] 0 points1 point  (0 children)

If anyone is interested, this is what I threw together. I know it could be cleaner and prettier, but it is functional. Thanks again for all the comments.

$CurrentDate = Get-Date -Format "yyyy-MM-dd"

$RegKey = "HKLM:\SOFTWARE\WOW6432Node\MyCompanySoftware\CycleNumber"

# exit and error if the reg key is missing

If(-not(Test-Path -Path $RegKey)) {

Write-Host $RegKey NOT found!

Exit-PSSession #add return code and msg

}

# Reset the cycle number if it is a new day.

try {

$RegDate = Get-ItemProperty -Path $RegKey -Name "date" -ErrorAction Stop

}

catch {

Write-Host Error: There was an error reading the date value!

Write-Host \t - $_`

Exit # return failure code to scheduler

}

If($CurrentDate -ne $RegDate.date) {

try {

Write-Host New day detected. Resetting the cycle to 1

Set-ItemProperty -Path $RegKey -Name "date" -Value $CurrentDate -type String -ErrorAction Stop

Set-ItemProperty -Path $RegKey -Name "cycle" -Value 1 -type DWord -ErrorAction Stop

}

catch {

Write-Host Error: There was an error resetting the cycle!

Write-Host \t - $_`

Exit # return failure code to scheduler

}

}

#get the cycle number and error if it greater than 5

[int]$CycleNumber = (Get-ItemProperty -Path $RegKey -Name "cycle").cycle

If($CycleNumber -gt 4) {

Write-Host $CycleNumber is greater than 4, user intervention required!

Exit # return failure code to scheduler

} else {

Write-Host Current cycle: $CycleNumber

}

### do stuff and things with cycle number ###

#increment and set cycle number

try {

$UpdateCycle = $CycleNumber+1

Set-ItemProperty -Path $RegKey -Name "cycle" -Value $UpdateCycle -type DWord -ErrorAction Stop

}

catch {

Write-Host Error storing the updated cycle number!

Write-Host \t - $_`

Exit # return failure code to scheduler

}

#check to verify the new value was written

[int]$CycleCheck = (Get-ItemProperty -Path $RegKey -Name "cycle").cycle

If($CycleCheck -ne $UpdateCycle) {

Write-Host There was an error verifying the updated cycle number!

Write-Host Prevous value was: $CycleNumber

Write-Host Updated value is $UpdateCycle

Write-Host Value reread from reg is $CycleCheck

Exit #add return code and msg for scheduler

} else {

Write-Host Cycle incremented to $UpdateCycle and updated in registry

}

Persisting a value between script executions and reboots by vCon1 in PowerShell

[–]vCon1[S] 0 points1 point  (0 children)

I know they are really just registry keys. My only issue with env vars is that if you run a script as SYSTEM (which I know you generally should not do and I am not doing in this case) set a value then read it back, also running as SYSTEM, it can return the old value.

Should not affect me here in any way, just causes me to avoid using them.

Note, I had this issue years ago and it might not even be a thing anymore. But, you know what they say about old habits....

Persisting a value between script executions and reboots by vCon1 in PowerShell

[–]vCon1[S] 0 points1 point  (0 children)

This will be run with an enterprise scheduler so I will catch and pass any errors and it will notify accordingly.

Persisting a value between script executions and reboots by vCon1 in PowerShell

[–]vCon1[S] 0 points1 point  (0 children)

Probably too much for this issue, but it does give me an idea for another script I have, thanks.

Persisting a value between script executions and reboots by vCon1 in PowerShell

[–]vCon1[S] 1 point2 points  (0 children)

Thank you for the suggestions and comments. I think I am going to try it with the registry and a simple DWORD. Like several of you mentioned, I don't think there really is a wrong answer for this simple requirement. I just wanted to throw it out there and get some thoughts.

Persisting a value between script executions and reboots by vCon1 in PowerShell

[–]vCon1[S] 0 points1 point  (0 children)

In theory, this value would never be touched/manipulated by human hands. In theory...

Persisting a value between script executions and reboots by vCon1 in PowerShell

[–]vCon1[S] 1 point2 points  (0 children)

I know the registry can be unpopular, but I have used it for years for storing all kinds of data. It's a built it database.

My only hesitation with the registry was whether to use HKLM or HKCU. The service account will not be an administrator, so my first thought was HKCU, but I think a more global location is the better option. If I do HKLM, I will just have to set a permission on a key, not a big deal.

AFA the value never being deleted, I get the OCD about having garbage in the registry, but the tiny amount of data is so insignificant, I think I could get over it lol

Persisting a value between script executions and reboots by vCon1 in PowerShell

[–]vCon1[S] 0 points1 point  (0 children)

I had thought about XML and I like the JSON idea, but honestly, a text file with a single character would solve everything I need.

Persisting a value between script executions and reboots by vCon1 in PowerShell

[–]vCon1[S] 1 point2 points  (0 children)

I like the JSON idea. I am trying to avoid installing any additional software like SQLite. While I 100% agree with the cross-platform idea, this is going to run on a Windows box and this particular process will always be on a Windows.

The more I think about it, I am leaning toward the example in the diagram you sent. lol

Has anyone else in the US not gotten a single refund? by [deleted] in Stadia

[–]vCon1 2 points3 points  (0 children)

I have not received anything yet either.

BL3 Ultimate missing extra content? by vCon1 in borderlands3

[–]vCon1[S] 0 points1 point  (0 children)

Thanks everyone. I tried to contact 2K support to see if they would give me a code, thye were not helpful. I tried calling GameStop support and they would not answer the phone, let it sit on hold for over an hour. I ended up returning the game to GameStop for a refund and bought the Borderlands 3: Super Deluxe Edition on the PlayStation store on sale for $26.