eDosStation/SyncToSqlsrv7.ps1

65 lines
3.2 KiB
PowerShell
Raw Normal View History

2026-01-07 15:51:10 +01:00
$DestPath = "\\sqlsrv7\c$\soft\eDos2026"
2025-01-09 12:47:42 +01:00
$SourcePath="D:\l\src\cs2025\eDosStation"
2026-08-27 12:55:46 +02:00
2025-01-09 12:47:42 +01:00
$SourcePathTools="D:\l\src\cs2025\LSWTools"
2023-10-24 07:10:30 +02:00
$DistributePath="D:\Soft\Distribute"
2026-01-07 15:51:10 +01:00
$TWN4DevPackPath="D:\Soft\TWN4DevPack480"
2022-04-22 14:46:51 +02:00
2026-08-27 12:55:46 +02:00
if ($env:COMPUTERNAME -eq "T16LUC") {
$SourcePath = "C:\l\src\eDosStation"
$TWN4DevPackPath="C:\l\TWN4\TWN4DevPack520"
$SourcePathTools="C:\l\src\LSWTools"
$DestPath = "C:\l\Edos2026"
$DistributePath="c:\L\Distribute"
}
$ScriptPath="$SourcePath\scripts"
2022-04-22 14:46:51 +02:00
$cert = get-childitem -path cert:\CurrentUser\My\857150b64ef7d3e679c8cbde425d2a0b5e58ffaa
2023-10-24 07:10:30 +02:00
Export-Certificate -Force -FilePath "$DestPath\signertrust.cer" -Cert $cert
2022-04-22 14:46:51 +02:00
2024-05-27 07:54:35 +02:00
Set-AuthenticodeSignature -FilePath "$ScriptPath\Upgrader.ps1" -Certificate $cert -TimestampServer "http://timestamp.digicert.com"
Set-AuthenticodeSignature -FilePath "$ScriptPath\installatie.ps1" -Certificate $cert -TimestampServer "http://timestamp.digicert.com"
Set-AuthenticodeSignature -FilePath "$ScriptPath\installatie2.ps1" -Certificate $cert -TimestampServer "http://timestamp.digicert.com"
2022-04-22 14:46:51 +02:00
2025-01-10 08:59:01 +01:00
compress-archive -force -Path "$SourcePath\syncEdosLocal\bin\Release\*.*" -DestinationPath "$DestPath\eDosSync.zip"
compress-archive -force -Path "$SourcePath\eDosStation\bin\Release\*.*" -DestinationPath "$DestPath\eDosStation.zip"
2024-05-27 07:54:35 +02:00
2025-01-09 12:47:42 +01:00
Copy-Item -Path "$ScriptPath\*.cmd" -Destination "$DestPath"
Copy-Item -Path "$ScriptPath\ConfigurationFile.ini" -Destination "$DestPath"
Copy-Item -Path "$ScriptPath\eDosStation.pub" -Destination "$DestPath"
Copy-Item -Path "$ScriptPath\authorized_keys" -Destination "$DestPath\authorized_keys"
2024-05-27 07:54:35 +02:00
Copy-Item -Path "$ScriptPath\Upgrader.ps1" -Destination "$DestPath\Upgrader.ps1"
Copy-Item -Path "$ScriptPath\installatie.ps1" -Destination "$DestPath\installatie.ps1"
Copy-Item -Path "$ScriptPath\installatie2.ps1" -Destination "$DestPath\installatie2.ps1"
2025-01-09 12:47:42 +01:00
Copy-Item -Path "$ScriptPath\eDosSync.xml" -Destination "$DestPath"
Copy-Item -Path "$ScriptPath\*.cer" -Destination "$DestPath"
Copy-Item -Path "$ScriptPath\UpdateSql.cmd" -Destination "$DestPath"
Copy-Item -Path "$ScriptPath\sqlreg.reg" -Destination "$DestPath"
#nodig ?
Copy-Item -Path "$ScriptPath\*.sql" -Destination "$DestPath"
#updates
2023-10-24 07:10:30 +02:00
Copy-Item -Path "$SourcePath\eDosLocal\UpdateLocal.sql" -Destination "$DestPath\UpdateLocal.sql"
Copy-Item -Path "$SourcePath\eDosLocal\Updates.sql" -Destination "$DestPath\Updates.sql"
Copy-Item -Path "$SourcePathTools\LogFolderClean\bin\Release\logFolderClean.exe" -Destination "$DestPath\LogFolderClean.exe"
Copy-Item -Path "$SourcePathTools\LogFolderClean\bin\Release\logFolderClean.exe.config" -Destination "$DestPath\LogFolderClean.exe.config"
2026-08-27 12:55:46 +02:00
Copy-Item -Path "$DistributePath\OpenSSH\OpenSSH10p2Signed.zip" -Destination $DestPath
2025-01-09 12:47:42 +01:00
Copy-Item -Path "$TWN4DevPackPath\Tools\flash.exe" -Destination $DestPath
2026-08-27 12:55:46 +02:00
Copy-Item -Path "$DistributePath\Elatec\TWN4_xCx480_EDOS100_Edos_Badge_Reader.bix" -Destination $DestPath
2025-01-09 12:47:42 +01:00
2024-05-28 08:09:23 +02:00
write-host "Files are copied to $DestPath"
write-host "Source files from $SourcePath\syncEdosLocal\bin\Release are zipped to $DestPath\eDosSync.zip"
write-host "Source files from $SourcePath\eDosStation\bin\Release are zipped to $DestPath\eDosSync.zip"
2025-01-09 12:47:42 +01:00
Sleep 10
2022-04-22 14:46:51 +02:00
exit