Repository navigation
Expand file tree
/
Copy pathrun.ps1
More file actions
1242 lines (984 loc) · 60.1 KB
/
Copy pathrun.ps1
File metadata and controls
1242 lines (984 loc) · 60.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
$version = "1.0.1.20260714"
# 0.x.x - zmiany działania aplikacji, dodanie nowych funkcji
# x.0.x - zmiany w interfejsie, poprawki błędów
# x.x.0 - dodawanie nowych aplikacji, zmiany kosmetyczne
# ----
# 1.0.1 - pierwsze wydanie z oznaczeniem wersji, poprawki dla HeidiSQL
# 1.0.1.20260227 - aktualizacja linków do instalatorów, dodanie DBeaver
# 1.0.1.20260303 - aktualizacja linków do instalatorów, dodanie SQLiteStudio
# 1.0.1.20260305 - aktualizacja linków do instalatorów, dodanie Remote Desktop Manager
# 1.0.1.20260308 - poprawa linku do Winbox, dodanie Winbox4
# 1.0.1.20260714 - pobieranie z paskiem postepu
$installPath = "C:\Serwis"
$jsonContent = @"
[
{ "nazwa": "Diagnostyczne" },
{ "nazwa": "💾 CPU-Z 2.10", "polecenia": [ "InstallCpuZ" ] },
{ "nazwa": "💾 Crystal DiskInfo 9.3.2", "polecenia": [ "InstallCrystalDiskInfo" ] },
{ "nazwa": "💾 Crystal DiskMark", "polecenia": [ "InstallCrystalDiskMark" ] },
{ "nazwa": "📦 Disk Genius", "polecenia": [ "InstallDiskGenius" ] },
{ "nazwa": "💾 HD Sentinel", "polecenia": [ "InstallHDSentinel" ] },
{ "nazwa": "💾 hwiNFO", "polecenia": [ "InstallHwinfo" ] },
{ "nazwa": "💾 HWMonitor PRO", "polecenia": [ "InstallHwmonitor" ] },
{ "nazwa": "📦 miniTool Partition Wizard", "polecenia": [ "InstallMiniTool" ] },
{ "nazwa": "💾 OCCT", "polecenia": [ "InstallOcct" ] },
{ "nazwa": "💾 SSD-Z", "polecenia": [ "InstallSsdZ" ] },
{ "nazwa": "💾 Throttle Stop", "polecenia": [ "InstallThrottleStop" ] },
{ "nazwa": "Podstawowe" },
{ "nazwa": "📦😎 Total Commander", "polecenia": [ "InstallTotalCommander" ] },
{ "nazwa": "📦 Total Commander (tylko exe)", "polecenia": [ "InstallTotalCommanderExe" ] },
{ "nazwa": "💾 Notepad 3", "polecenia": [ "InstallNotepad3" ] },
{ "nazwa": "💾😎 Double Commander", "polecenia": [ "InstallDoubleCmd" ] },
{ "nazwa": "💾 7-zip", "polecenia": [ "Install7Zip" ] },
{ "nazwa": "💾 LibreOffice.org", "polecenia": [ "InstallLibreOffice" ]},
{ "nazwa": "Systemowe" },
{ "nazwa": "💾 PowerShell 7", "polecenia": [ "InstallPowerShell7" ] },
{ "nazwa": "Zdalna pomoc" },
{ "nazwa": "📦 AnyDesk (kopiuj na pulpit)", "polecenia": [ "InstallAnyDesk" ] },
{ "nazwa": "📦 TeamViewerQS (kopiuj na pulpit)", "polecenia": [ "InstallTeamViewerQS" ] },
{ "nazwa": "💾😎 TeamViewer Host (instaluj)", "polecenia": [ "InstallTeamViewerHost" ] },
{ "nazwa": "Narzędzia SQL" },
{ "nazwa": "📦 AdminSQL", "polecenia": [ "InstallAdminSql" ] },
{ "nazwa": "💾 HeidiSQL", "polecenia": [ "InstallHeidiSql" ] },
{ "nazwa": "📦 SQLiteStudio", "polecenia": [ "InstallSQLiteStudio" ] },
{ "nazwa": "📦 DBeaver", "polecenia": [ "InstallDBeaver" ] },
{ "nazwa": "💾 SQL Server Management Studio", "polecenia": [ "InstallSSMS" ] },
{ "nazwa": "💾 SQL Backup Master", "polecenia": [ "InstallSQLBackupMaster" ] },
{ "nazwa": "SysInternals" },
{ "nazwa": "📦😎 Bginfo", "polecenia": [ "InstallBginfo" ] },
{ "nazwa": "📦 Autologon", "polecenia": [ "InstallSysInternals -fileName 'Autologon'" ] },
{ "nazwa": "📦 Autoruns", "polecenia": [ "InstallSysInternals -fileName 'autoruns'" ] },
{ "nazwa": "📦 Disk2vhd", "polecenia": [ "InstallDisk2vhd" ] },
{ "nazwa": "📦 Process Explorer", "polecenia": [ "InstallSysInternals -fileName 'procexp'" ] },
{ "nazwa": "📦 Process Monitor", "polecenia": [ "InstallSysInternals -fileName 'Procmon'" ] },
{ "nazwa": "📦 Tcpview", "polecenia": [ "InstallSysInternals -fileName 'Tcpview'" ] },
{ "nazwa": "📦 ZoomIt", "polecenia": [ "InstallSysInternals -fileName 'ZoomIt'" ] },
{ "nazwa": "Nirsoft" },
{ "nazwa": "📦 DHCPLogView", "polecenia": [ "InstallDHCPLogView " ] },
{ "nazwa": "📦 LANIPScanner", "polecenia": [ "InstallLANIPScanner" ] },
{ "nazwa": "📦 Lost My Password (AV?) ☠️", "polecenia": [ "InstallLostMyPassword" ] },
{ "nazwa": "📦 ExtPassword (AV?) ☠️", "polecenia": [ "InstallExtPassword" ] },
{ "nazwa": "📦 Mail PassView (AV!) ☠️", "polecenia": [ "InstallMailPassView" ] },
{ "nazwa": "📦 Network Password Recovery (AV!) ☠️","polecenia": [ "InstallNetworkPasswordRecovery" ] },
{ "nazwa": "📦 NirCmd", "polecenia": [ "InstallNirCmd" ] },
{ "nazwa": "📦 ProcessTCPSummary ", "polecenia": [ "InstallProcessTCPSummary " ] },
{ "nazwa": "📦 TaskSchedulerView ", "polecenia": [ "InstallTaskSchedulerView " ] },
{ "nazwa": "📦 WinUpdatesView", "polecenia": [ "InstallWinUpdatesView" ] },
{ "nazwa": "📦 WirelessKeyView ☠️", "polecenia": [ "InstallWirelessKeyView" ] },
{ "nazwa": "📦 WirelessNetView", "polecenia": [ "InstallWirelessNetView" ] },
{ "nazwa": "📦 WirelessNetworkWatcher (Netscan)", "polecenia": [ "InstallWirelessNetworkWatcher" ] },
{ "nazwa": "Do urządzeń fiskalnych" },
{ "nazwa": "📦 Posnet NPS", "polecenia": [ "InstallPosnetNps" ] },
{ "nazwa": "💾 Posnet OPS", "polecenia": [ "InstallPosnetOps" ] },
{ "nazwa": "📦 Elzab Eureka", "polecenia": [ "InstallElzabEureka" ] },
{ "nazwa": "📦 Elzab Stampa", "polecenia": [ "InstallElzabStampa" ] },
{ "nazwa": "📦 Elzab - programy komunikacyjne", "polecenia": [ "InstallElzabWinexe" ] },
{ "nazwa": "📦 Sterowniki do urządzeń", "polecenia": [ "InstallDrivers" ], "opis": "Wszystkie sterowniki z https://pajcomp.pl/pub/?dir=Sterowniki" },
{ "nazwa": "Silnik bazy danych SQL" },
{ "nazwa": "💾😎🛠️ MS SQL 2025 Express", "polecenia": [ "InstallSql2025" ],
"opis": "Instalacja SQL Server Express z włączonym TCP, logowaniem SQL\n- Instancja .\\SQL2025\n- Hasło sa to `Wapro3000`\n- Port TCP jest ustawiany na `52025`\n- Otwarcie tego portu w firewall-u windows (!!)." },
{ "nazwa": "💾😎🛠️ MS SQL 2022 Express", "polecenia": [ "InstallSql2022" ],
"opis": "Instalacja SQL Server Express z włączonym TCP, logowaniem SQL\n- Instancja .\\SQL2022\n- Hasło sa to `Wapro3000`\n- Port TCP jest ustawiany na `52022`\n- Otwarcie tego portu w firewall-u windows (!!)." },
{ "nazwa": "💾😎🛠️ MS SQL 2019 Express", "polecenia": [ "InstallSql2019" ],
"opis": "Instalacja SQL Server Express z włączonym TCP, logowaniem SQL\n- Instancja .\\SQL2019\n- Hasło sa to `Wapro3000`\n- Port TCP jest ustawiany na `52019`\n- Otwarcie tego portu w firewall-u windows (!!)." },
{ "nazwa": "💾😎🛠️ MS SQL 2017 Express", "polecenia": [ "InstallSql2017" ],
"opis": "Instalacja SQL Server Express z włączonym TCP, logowaniem SQL\n- Instancja .\\SQL2017\n- Hasło sa to `Wapro3000`\n- Port TCP jest ustawiany na `52017`\n- Otwarcie tego portu w firewall-u windows (!!)." },
{ "nazwa": "Programy" },
{ "nazwa": "💾 Insoft PCM", "polecenia": [ "InstallPcm" ] },
{ "nazwa": "💾 Insoft PcKSeF (usługa)", "polecenia": [ "InstallPcKSeF" ] },
{ "nazwa": "💾 Insoft PC-POS", "polecenia": [ "InstallPcPos" ] },
{ "nazwa": "💾 Insoft SCServer", "polecenia": [ "InstallScserver" ] },
{ "nazwa": "💾 Insoft Impex", "polecenia": [ "InstallImpex" ] },
{ "nazwa": "💾 WAPRO (wszystkie, aktualizacja)", "polecenia": [ "InstallWapro" ] },
{ "nazwa": "Narzędzia" },
{ "nazwa": "📦 Remote Desktop Manager", "polecenia": [ "InstallRemoteDesktopManager" ] },
{ "nazwa": "📦 OpenVPN Community (klient)", "polecenia": [ "InstallOpenVPN" ] },
{ "nazwa": "📦 WireGuard (klient)", "polecenia": [ "InstallWireGuard" ] },
{ "nazwa": "💾 Netscan", "polecenia": [ "InstallNetscan" ] },
{ "nazwa": "💾 Putty", "polecenia": [ "InstallPutty" ] },
{ "nazwa": "💾 Winbox 3.x", "polecenia": [ "InstallWinbox" ] },
{ "nazwa": "📦 Winbox 4.x", "polecenia": [ "InstallWinbox4" ] },
{ "nazwa": "📦😎 Key-n-Stroke", "polecenia": [ "InstallKeyNStroke" ] },
{ "nazwa": " " },
{ "nazwa": "Pajcomp/Specjalne" },
{ "nazwa": "☠️ Uruchom zdefiniowane polecenia PS", "polecenia": [ "RunPSFromPajcomp" ] }
]
"@
# Funkcja do pobierania pliku z internetu z paskiem postępu
# chatgpt 20250219
function Get-File {
param (
[Parameter(Mandatory)]
[Alias("Source", "Uri", "Link", "Address")]
[string]$Url,
[Parameter(Mandatory)]
[Alias("OutFile", "Path", "Destination")]
[string]$File,
[Alias("Headers")]
[hashtable]$CustomHeaders
)
function Show-Progress {
param ([Parameter(Mandatory)][Single]$TotalValue, [Parameter(Mandatory)][Single]$CurrentValue, [Parameter(Mandatory)][string]$ProgressText, [Parameter()][int]$BarSize = 40, [Parameter()][switch]$Complete)
$percent = $CurrentValue / $TotalValue
$percentComplete = $percent * 100
if ($psISE) { Write-Progress "$ProgressText" -id 0 -percentComplete $percentComplete }
else { Write-Host -NoNewLine "`r$ProgressText $(''.PadRight($BarSize * $percent, [char]9608).PadRight($BarSize, [char]9617)) $($percentComplete.ToString('##0.00').PadLeft(6)) % " }
}
try {
$request = [System.Net.HttpWebRequest]::Create($URL)
if ($CustomHeaders) {
foreach ($header in $CustomHeaders.GetEnumerator()) {
switch ($header.Key.ToLowerInvariant()) {
'referer' { $request.Referer = $header.Value; break }
'user-agent' { $request.UserAgent = $header.Value; break }
'accept' { $request.Accept = $header.Value; break }
'content-type' { $request.ContentType = $header.Value; break }
default { $request.Headers[$header.Key] = $header.Value }
}
}
}
$response = $request.GetResponse()
if ($response.StatusCode -eq 401 -or $response.StatusCode -eq 403 -or $response.StatusCode -eq 404) { throw "Remote file either doesn't exist, is unauthorized, or is forbidden for '$URL'." }
if ($File -match '^\.\\') { $File = Join-Path (Get-Location -PSProvider 'FileSystem') ($File -Split '^\.')[1] }
if ($File -and !(Split-Path $File)) { $File = Join-Path (Get-Location -PSProvider 'FileSystem') $File }
if ($File) { $fileDirectory = $([System.IO.Path]::GetDirectoryName($File)); if (!(Test-Path($fileDirectory))) { [System.IO.Directory]::CreateDirectory($fileDirectory) | Out-Null } }
[long]$fullSize = $response.ContentLength
[byte[]]$buffer = new-object byte[] 1048576
[long]$total = [long]$count = 0
$reader = $response.GetResponseStream()
$writer = new-object System.IO.FileStream $File, 'Create'
do {
$count = $reader.Read($buffer, 0, $buffer.Length)
$writer.Write($buffer, 0, $count)
$total += $count
if ($fullSize -gt 0) { Show-Progress -TotalValue $fullSize -CurrentValue $total -ProgressText "- Pobieranie: " }
} while ($count -gt 0)
}
finally {
$reader.Close()
$writer.Close()
Write-Host ""
}
}
# Funkcja do zapisu komunikatu do pliku logu
function Write-Log {
Param ([string]$LogString)
$Stamp = (Get-Date).toString("yyyy-MM-dd HH:mm:ss")
$LogMessage = "$Stamp $LogString"
Add-content $logFile -value $LogMessage
$textbox.Text += $LogMessage + "`r`n"
$textbox.ScrollToEnd()
Write-Host $LogString
}
# Funkcja wyświetla w konsoli informację dla użytkownika i zapisuje ją do pliku logu z sygnatura czasową
function Write-HostAndLog {
param (
[Parameter(Mandatory = $true)]
[string]$LogString
)
Write-Log -LogString $LogString
Write-Host $LogString
}
function CreateDesktopShortcut {
param (
[string]$ShortcutName,
[string]$File,
[string]$Arguments
)
$WshShell = New-Object -ComObject WScript.Shell
try {
$shortcut = $WshShell.CreateShortcut("$([Environment]::GetFolderPath('CommonDesktopDirectory'))\$ShortcutName.lnk")
$shortcut.TargetPath = $File
$shortcut.Arguments = $Arguments
$shortcut.Save()
} Catch {
$shortcut = $WshShell.CreateShortcut("$([Environment]::GetFolderPath('DesktopDirectory'))\$ShortcutName.lnk")
$shortcut.TargetPath = $File
$shortcut.Arguments = $Arguments
$shortcut.Save()
}
}
function InstallCpuZ {
$uri = "https://www.pajcomp.pl/pub/!Misc/Diag/cpu-z_2.10-en.zip"
$installerPath = Join-Path $env:TEMP (Split-Path $uri -Leaf)
Get-File -Url $uri -OutFile $installerPath
Expand-Archive $installerPath -DestinationPath "$installPath\Diag\CPU-Z\" -Force
CreateDesktopShortcut -ShortcutName "CPU-Z x64" -File "$installPath\Diag\CPU-Z\cpuz_x64.exe"
CreateDesktopShortcut -ShortcutName "CPU-Z x32" -File "$installPath\Diag\CPU-Z\cpuz_x32.exe"
Remove-Item $installerPath
}
function InstallCrystalDiskInfo {
$uri = "https://www.pajcomp.pl/pub/!Misc/Diag/crystalDiskInfo_9_3_2.zip"
$installerPath = Join-Path $env:TEMP (Split-Path $uri -Leaf)
Get-File -Url $uri -OutFile $installerPath
Expand-Archive $installerPath -DestinationPath "$installPath\Diag\DiskInfo\" -Force
CreateDesktopShortcut -ShortcutName "Crystal DiskInfo x64" -File "$installPath\Diag\DiskInfo\DiskInfo64.exe"
CreateDesktopShortcut -ShortcutName "Crystal DiskInfo x32" -File "$installPath\Diag\DiskInfo\DiskInfo32.exe"
Remove-Item $installerPath
}
function InstallCrystalDiskMark {
$uri = "https://www.pajcomp.pl/pub/!Misc/Diag/crystalDiskMark.zip"
$installerPath = Join-Path $env:TEMP (Split-Path $uri -Leaf)
Get-File -Url $uri -OutFile $installerPath
Expand-Archive $installerPath -DestinationPath "$installPath\Diag\DiskMark\" -Force
CreateDesktopShortcut -ShortcutName "Crystal DiskMark x64" -File "$installPath\Diag\DiskMark\DiskMark64.exe"
CreateDesktopShortcut -ShortcutName "Crystal DiskMark x32" -File "$installPath\Diag\DiskMark\DiskMark32.exe"
Remove-Item $installerPath
}
function InstallDiskGenius {
$uri = "https://www.pajcomp.pl/pub/!Misc/Diag/diskgenius_DGEngSetup5601565.exe"
$installerPath = Join-Path $installPath (Split-Path $uri -Leaf)
Get-File -Url $uri -OutFile $installerPath
Start-Process -FilePath $installerPath -Verb RunAs -Wait -ArgumentList "/SILENT"
Remove-Item $installerPath
}
function InstallHDSentinel {
$uri = "https://www.pajcomp.pl/pub/!Misc/Diag/hdsentinel_pro_portable.zip"
$installerPath = Join-Path $env:TEMP (Split-Path $uri -Leaf)
Get-File -Url $uri -OutFile $installerPath
Expand-Archive $installerPath -DestinationPath "$installPath\Diag\HDSentinel\" -Force
CreateDesktopShortcut -ShortcutName "HDSentinel" -File "$installPath\Diag\HDSentinel\HDSentinel.exe"
Remove-Item $installerPath
}
function InstallHwinfo {
$uri = "https://www.pajcomp.pl/pub/!Misc/Diag/hwiNFO_hwi_806.zip"
$installerPath = Join-Path $env:TEMP (Split-Path $uri -Leaf)
Get-File -Url $uri -OutFile $installerPath
Expand-Archive $installerPath -DestinationPath "$installPath\Diag\HWiNFO\" -Force
CreateDesktopShortcut -ShortcutName "HWiNFO x64" -File "$installPath\Diag\HWiNFO\HWiNFO64.exe"
CreateDesktopShortcut -ShortcutName "HWiNFO x32" -File "$installPath\Diag\HWiNFO\HWiNFO32.exe"
Remove-Item $installerPath
}
function InstallHwmonitor {
$uri = "https://www.pajcomp.pl/pub/!Misc/Diag/hwmonitor-pro_1.53.zip"
$installerPath = Join-Path $env:TEMP (Split-Path $uri -Leaf)
Get-File -Url $uri -OutFile $installerPath
Expand-Archive $installerPath -DestinationPath "$installPath\Diag\HWMonitorPro\" -Force
CreateDesktopShortcut -ShortcutName "HWMonitorPro x64" -File "$installPath\Diag\HWMonitorPro\HWMonitorPro_x64.exe"
CreateDesktopShortcut -ShortcutName "HWMonitorPro x32" -File "$installPath\Diag\HWMonitorPro\HWMonitorPro_x32.exe"
Remove-Item $installerPath
}
function InstallMiniTool {
# instalator uruchamia się bez -Wait i nie jest kasowany
# po instalacji uruchamia kilka procesów i zatrzymuje instalację kolejnych aplikacji
$uri = "https://www.pajcomp.pl/pub/!Misc/Diag/miniTool_Partition_Wizard_pw-free-online.exe"
$installerPath = Join-Path $installPath (Split-Path $uri -Leaf)
Get-File -Url $uri -OutFile $installerPath
Start-Process -FilePath $installerPath -Verb RunAs -ArgumentList "/SILENT /SP-"
# Remove-Item $installerPath
}
function InstallOcct {
$uri = "https://www.pajcomp.pl/pub/!Misc/Diag/occt.exe"
$installerPath = Join-Path "$installPath\Diag\OCCT\" (Split-Path $uri -Leaf)
New-Item -Path "$installPath\Diag\OCCT\" -ItemType Directory -Force | Out-Null
Get-File -Url $uri -OutFile $installerPath
CreateDesktopShortcut -ShortcutName "OCCT" -File "$installPath\Diag\OCCT\occt.exe"
}
function InstallSsdZ {
$uri = "https://www.pajcomp.pl/pub/!Misc/Diag/ssd-z_16.09.09wip.zip"
$installerPath = Join-Path $env:TEMP (Split-Path $uri -Leaf)
Get-File -Url $uri -OutFile $installerPath
Expand-Archive $installerPath -DestinationPath "$installPath\Diag\SSD-Z\" -Force
CreateDesktopShortcut -ShortcutName "SSD-Z" -File "$installPath\Diag\SSD-Z\SSD-Z.exe"
Remove-Item $installerPath
}
function InstallThrottleStop {
$uri = "https://www.pajcomp.pl/pub/!Misc/Diag/throttleStop_9.6.zip"
$installerPath = Join-Path $env:TEMP (Split-Path $uri -Leaf)
Get-File -Url $uri -OutFile $installerPath
Expand-Archive $installerPath -DestinationPath "$installPath\Diag\ThrottleStop\" -Force
CreateDesktopShortcut -ShortcutName "ThrottleStop" -File "$installPath\Diag\ThrottleStop\ThrottleStop.exe"
Remove-Item $installerPath
}
function InstallTotalCommander {
$uri = "https://raw.githubusercontent.com/mieszkou/programy/master/totalcmd/totalcmd.zip"
$installerPath = Join-Path $env:TEMP (Split-Path $uri -Leaf)
Get-File -Url $uri -OutFile $installerPath
Expand-Archive $installerPath -DestinationPath "$installPath\Totalcmd\" -Force
CreateDesktopShortcut -ShortcutName "Total Commander x64" -File "$installPath\Totalcmd\TotalCmd64.exe"
Remove-Item $installerPath
}
function InstallTotalCommanderExe {
$uri = "https://raw.githubusercontent.com/mieszkou/programy/master/totalcmd/totalcmdexe.zip"
$installerPath = Join-Path $env:TEMP (Split-Path $uri -Leaf)
Get-File -Url $uri -OutFile $installerPath
Expand-Archive $installerPath -DestinationPath "$installPath" -Force
CreateDesktopShortcut -ShortcutName "Total Commander x64 - tylko exe" -File "$installPath\TotalCmd64.exe"
Remove-Item $installerPath
}
function InstallNotepad3 {
$uri = Invoke-RestMethod -uri https://api.github.com/repos/rizonesoft/Notepad3/releases/latest | Select-Object -ExpandProperty "assets" | ? { $_.name.Contains("x64_Setup.exe")} | Select-Object -ExpandProperty browser_download_url
$installerPath = Join-Path $env:TEMP (Split-Path $uri -Leaf)
Get-File -Url $uri -OutFile $installerPath
# Wylaczam cicha instalacje - nie dziala w najnowszej wersji notepad3 - dodali instalator Opery którego nie da się pominąć automatycznie
Start-Process -FilePath $installerPath -Verb RunAs -Wait -ArgumentList "/SILENT /SP-"
# Start-Process -FilePath $installerPath -Verb RunAs -Wait -ArgumentList "/LOG /LANG=plk /SP-"
New-Item -Path "$installPath\Notepad3" -ItemType Directory -Force | Out-Null
Get-File -Url "https://raw.githubusercontent.com/mieszkou/programy/master/Notepad3/example.md" -OutFile "$installPath\Notepad3\example.md"
Get-File -Url "https://raw.githubusercontent.com/mieszkou/programy/master/Notepad3/prezentacja.ini" -OutFile "$installPath\Notepad3\prezentacja.ini"
CreateDesktopShortcut -ShortcutName "Notepad3 do prezentacji" -File "C:\Program Files\Notepad3\Notepad3.exe" -Arguments "/f $installPath\Notepad3\prezentacja.ini /t Show $installPath\Notepad3\example.md"
Remove-Item $installerPath
}
function InstallDoubleCmd {
$uri = Invoke-RestMethod -uri https://api.github.com/repos/doublecmd/doublecmd/releases/latest | Select-Object -ExpandProperty "assets" | ? { $_.name.Contains("win64.exe")} | Select-Object -ExpandProperty browser_download_url
Get-File -Url $uri -OutFile "$($env:TEMP)\doublecmd.exe"
Start-Process -Wait -FilePath "$($env:TEMP)\doublecmd.exe" -ArgumentList "/SILENT /SP-"
New-Item -Path "$($env:APPDATA)\doublecmd" -ItemType Directory -Force | Out-Null
try {
Get-File -Uri "https://raw.githubusercontent.com/mieszkou/programy/master/doublecmd/doublecmd.xml" -OutFile "C:\Program Files\Double Commander\doublecmd.xml"
Get-File -Uri "https://raw.githubusercontent.com/mieszkou/programy/master/doublecmd/libeay32.dll" -OutFile "C:\Program Files\Double Commander\libeay32.dll"
Get-File -Uri "https://raw.githubusercontent.com/mieszkou/programy/master/doublecmd/ssleay32.dll" -OutFile "C:\Program Files\Double Commander\ssleay32.dll"
}
catch {
}
try {
Get-File -Uri "https://raw.githubusercontent.com/mieszkou/programy/master/doublecmd/doublecmd.xml" -OutFile "$($env:APPDATA)\doublecmd\doublecmd.xml"
Get-File -Uri "https://raw.githubusercontent.com/mieszkou/programy/master/doublecmd/libeay32.dll" -OutFile "$($env:APPDATA)\doublecmd\libeay32.dll"
Get-File -Uri "https://raw.githubusercontent.com/mieszkou/programy/master/doublecmd/ssleay32.dll" -OutFile "$($env:APPDATA)\doublecmd\ssleay32.dll"
}
catch {
}
CreateDesktopShortcut -ShortcutName "Double Commander" -File "C:\Program Files\Double Commander\doublecmd.exe"
}
function InstallLibreOffice {
$DownloadUri = "https://download.documentfoundation.org/libreoffice/stable/"
$r = Invoke-WebRequest -UseBasicParsing -Uri "$DownloadUri/"
$versions = ($r.Links | Where-Object { $_.href -match "(\d{2}\.\d+\.\d+\/)" }).href -replace "/", ""
$Version = $versions | Sort-Object -Descending | Select-Object -First 1
$uri = $($DownloadUri + $Version + "/win/x86_64/") + (Invoke-WebRequest -UseBasicParsing -Uri $($DownloadUri + $Version + "/win/x86_64/") | Select-Object -ExpandProperty Links | Where-Object {($_.href -like '*_x86-64.msi')} | Select-Object -First 1 | Select-Object -ExpandProperty href)
$installerPath = Join-Path $env:TEMP (Split-Path $uri -Leaf)
Get-File -Uri $uri -OutFile $installerPath
Start-Process -Wait -FilePath $installerPath -ArgumentList "/passive ProductLanguage=1045"
Remove-Item $installerPath
}
function InstallAnyDesk {
$uri = "https://download.anydesk.com/AnyDesk.exe"
try {
Get-File -Url $uri -OutFile "$([Environment]::GetFolderPath('CommonDesktopDirectory'))\AnyDesk.exe"
} Catch {
Get-File -Url $uri -OutFile "$([Environment]::GetFolderPath('DesktopDirectory'))\AnyDesk.exe"
}
}
function InstallTeamViewerQS {
$uri = "https://www.pajcomp.pl/pub/TeamViewer/TeamViewerQS_paj24.exe"
try {
Get-File -Url $uri -OutFile "$([Environment]::GetFolderPath('CommonDesktopDirectory'))\TeamViewerQS.exe"
} Catch {
Get-File -Url $uri -OutFile "$([Environment]::GetFolderPath('DesktopDirectory'))\TeamViewerQS.exe"
}
}
function InstallTeamViewerHost {
$uri = "https://www.pajcomp.pl/pub/TeamViewer/TeamViewer_Host_x64.msi"
$uri_conf = "https://www.pajcomp.pl/pub/TeamViewer/.tv_paj.tvopt"
$installerPath = Join-Path $env:TEMP (Split-Path $uri -Leaf)
$confPath = Join-Path $env:TEMP (Split-Path $uri_conf -Leaf)
Get-File -Url $uri -OutFile $installerPath
Get-File -Url $uri_conf -OutFile $confPath
#-Wait -FilePath "$($env:TEMP)\ps7.msi" -ArgumentList "/qb-! REBOOT=ReallySuppress"
Start-Process -Wait -FilePath $installerPath -ArgumentList "/passive CUSTOMCONFIGID=639wciv SETTINGSFILE=$confPath"
}
# msiexec.exe /i TeamViewer_Host_x64.msi /passive CUSTOMCONFIGID=639wciv
function Install7Zip {
$uri = (Invoke-WebRequest -UseBasicParsing -Uri 'https://7-zip.org/' |
Select-Object -ExpandProperty Links |
Where-Object {($_.outerHTML -match 'Download') -and ($_.href -like '*-x64.exe')} |
Select-Object -First 1 |
Select-Object -ExpandProperty href)
$installerPath = Join-Path $env:TEMP (Split-Path $uri -Leaf)
Get-File -Url $uri -OutFile $installerPath
Start-Process -FilePath $installerPath -Args "/S" -Verb RunAs -Wait
Remove-Item $installerPath
}
function InstallPowerShell7 {
$uri = Invoke-RestMethod -uri https://api.github.com/repos/PowerShell/PowerShell/releases/latest | Select-Object -ExpandProperty "assets" | ? { $_.name.Contains("win-x64.msi")} | Select-Object -ExpandProperty browser_download_url
Get-File -Uri $uri -OutFile "$($env:TEMP)\ps7.msi"
Start-Process -Wait -FilePath "$($env:TEMP)\ps7.msi" -ArgumentList "/qb-! REBOOT=ReallySuppress"
}
function InstallSysInternals {
param(
[string]$fileName
)
New-Item -Path "$installPath\Sysinternals\" -ItemType Directory -Force | Out-Null
Get-File -Uri "https://live.sysinternals.com/$fileName.exe" -OutFile "$installPath\Sysinternals\$fileName.exe"
CreateDesktopShortcut -ShortcutName $fileName -File "$installPath\Sysinternals\$fileName.exe"
}
function InstallDisk2vhd {
$uri = "https://download.sysinternals.com/files/Disk2vhd.zip"
$installerPath = Join-Path $env:TEMP (Split-Path $uri -Leaf)
Get-File -Url $uri -OutFile $installerPath
Expand-Archive $installerPath -DestinationPath "$installPath\Sysinternals\Disk2vhd\" -Force
CreateDesktopShortcut -ShortcutName "Disk2vhd x64" -File "$installPath\Sysinternals\Disk2vhd\disk2vhd64.exe"
CreateDesktopShortcut -ShortcutName "Disk2vhd x32" -File "$installPath\Sysinternals\Disk2vhd\disk2vhd.exe"
Remove-Item $installerPath
}
function InstallBginfo {
$fileName = "Bginfo"
InstallSysInternals -fileName $fileName
CreateDesktopShortcut -ShortcutName $fileName -File "$installPath\Sysinternals\Bginfo.exe" -Arguments "$installPath\Sysinternals\bginfo.bgi /timer:0 /nolicprompt"
CreateDesktopShortcut -ShortcutName "$fileName - edytuj info" -File "$installPath\Sysinternals\bginfo.txt"
Get-File -Uri "https://github.com/mieszkou/programy/raw/master/BgInfo/bginfo.bgi" -OutFile "$installPath\Sysinternals\bginfo.bgi"
Get-File -Uri "https://github.com/mieszkou/programy/raw/master/BgInfo/bginfo.txt" -OutFile "$installPath\Sysinternals\bginfo.txt"
$WshShell = New-Object -ComObject WScript.Shell
$shortcut = $WshShell.CreateShortcut("$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup\BgInfo.lnk")
$shortcut.Arguments = "$installPath\Sysinternals\bginfo.bgi /timer:0 /nolicprompt"
$shortcut.TargetPath = "$installPath\Sysinternals\Bginfo.exe"
$shortcut.Save()
# Wczytaj plik binarny
$file = "$installPath\Sysinternals\bginfo.bgi"
$filenew = $file
$newpath = $installPath
try {
# Wczytaj plik binarny jako bajty
$bytes = [System.IO.File]::ReadAllBytes($file)
$endIndex = 0x0502
$startIndex = 0x50C
$newPathBytes = [System.Text.Encoding]::UTF8.GetBytes($newpath)
$bytes[0x04fd] = ("$installPath\Sysinternals\bginfo.txt").Length+2
$newBytes = $bytes[0..($endIndex-1)] + $newPathBytes + $bytes[($startIndex+1)..($bytes.Length - 1)]
[System.IO.File]::WriteAllBytes($filenew, $newBytes)
} catch {
Write-Host "Wystąpił błąd: $_"
}
Invoke-Item "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup\BgInfo.lnk"
}
function InstallKeyNStroke {
New-Item -Path "$installPath\Key-n-Stroke\" -ItemType Directory -Force | Out-Null
New-Item -Path "$($env:LOCALAPPDATA)\Key-n-Stroke" -ItemType Directory -Force | Out-Null
Get-File -Uri "https://github.com/mieszkou/programy/raw/master/Key-n-Stroke/Key-n-Stroke.exe" -OutFile "$installPath\Key-n-Stroke\Key-n-Stroke.exe"
Get-File -Uri "https://raw.githubusercontent.com/mieszkou/programy/master/Key-n-Stroke/settings.json" -OutFile "$($env:LOCALAPPDATA)\Key-n-Stroke\settings.json"
CreateDesktopShortcut -ShortcutName "Key-n-Stroke" -File "$installPath\Key-n-Stroke\Key-n-Stroke.exe"
}
function InstallDHCPLogView {
$uri = "https://www.nirsoft.net/utils/dhcplogview-x64.zip"
$nirsoftHeaders = @{"Referer"="https://www.nirsoft.net/utils/dhcp_log_view.html"}
$installerPath = Join-Path $env:TEMP (Split-Path $uri -Leaf)
Get-File -Url $uri -OutFile $installerPath -Headers $nirsoftHeaders
Expand-Archive $installerPath -DestinationPath "$installPath\Nirsoft\" -Force
CreateDesktopShortcut -ShortcutName "DHCPLogView" -File "$installPath\Nirsoft\DHCPLogView.exe"
Remove-Item $installerPath
}
function InstallLANIPScanner {
$uri = "https://www.nirsoft.net/utils/lanipscanner.zip"
$nirsoftHeaders = @{"Referer"="https://www.nirsoft.net/utils/lan_ip_scanner.html"}
$installerPath = Join-Path $env:TEMP (Split-Path $uri -Leaf)
Get-File -Url $uri -OutFile $installerPath -Headers $nirsoftHeaders
Expand-Archive $installerPath -DestinationPath "$installPath\Nirsoft\" -Force
CreateDesktopShortcut -ShortcutName "LANIPScanner" -File "$installPath\Nirsoft\LANIPScanner.exe"
Remove-Item $installerPath
}
function InstallLostMyPassword {
$uri = "https://www.nirsoft.net/utils/lostmypassword-x64.zip"
$nirsoftHeaders = @{"Referer"="https://www.nirsoft.net/utils/lost_my_password.html"}
$installerPath = Join-Path $env:TEMP (Split-Path $uri -Leaf)
Get-File -Url $uri -OutFile $installerPath -Headers $nirsoftHeaders
Expand-Archive $installerPath -DestinationPath "$installPath\Nirsoft\" -Force
CreateDesktopShortcut -ShortcutName "Lost My Password" -File "$installPath\Nirsoft\LostMyPassword.exe"
Remove-Item $installerPath
}
function InstallExtPassword {
$uri = "https://www.nirsoft.net/utils/extpassword.zip"
$nirsoftHeaders = @{"Referer"="https://www.nirsoft.net/utils/external_drive_password_recovery.html"}
$installerPath = Join-Path $env:TEMP (Split-Path $uri -Leaf)
Get-File -Url $uri -OutFile $installerPath -Headers $nirsoftHeaders
Expand-Archive $installerPath -DestinationPath "$installPath\Nirsoft\" -Force
CreateDesktopShortcut -ShortcutName "ExtPassword" -File "$installPath\Nirsoft\ExtPassword.exe"
Remove-Item $installerPath
}
function InstallNirCmd {
$uri = "https://www.nirsoft.net/utils/nircmd-x64.zip"
$nirsoftHeaders = @{"Referer"="https://www.nirsoft.net/utils/nircmd.html"}
$installerPath = Join-Path $env:TEMP (Split-Path $uri -Leaf)
Get-File -Url $uri -OutFile $installerPath -Headers $nirsoftHeaders
Expand-Archive $installerPath -DestinationPath "$installPath\Nirsoft\" -Force
CreateDesktopShortcut -ShortcutName "NirCmd - pomoc" -File "$installPath\Nirsoft\NirCmd.chm"
Remove-Item $installerPath
}
function InstallWirelessKeyView {
$uri = "https://www.nirsoft.net/toolsdownload/wirelesskeyview.zip"
$uri7zip = "https://www.pajcomp.pl/pub/%21Misc/7z.exe"
$nirsoftHeaders = @{"Referer"="https://www.nirsoft.net/utils/wireless_key.html"}
$installerPath = Join-Path $env:TEMP (Split-Path $uri -Leaf)
$7zipPath = Join-Path $env:TEMP (Split-Path $uri7zip -Leaf)
Get-File -Url $uri -OutFile $installerPath -Headers $nirsoftHeaders
Get-File -Url $uri7zip -OutFile $7zipPath
Start-Process -Wait -FilePath $7zipPath -ArgumentList "e $installerPath -o$installPath\Nirsoft\ * -p`"WKey4567#`" -y" -NoNewWindow
CreateDesktopShortcut -ShortcutName "WirelessKeyView" -File "$installPath\Nirsoft\WirelessKeyView.exe"
Remove-Item $installerPath
}
function InstallWirelessNetworkWatcher {
$uri = "https://www.nirsoft.net/utils/wnetwatcher-x64.zip"
$nirsoftHeaders = @{"Referer"="https://www.nirsoft.net/utils/wireless_network_watcher.html"}
$installerPath = Join-Path $env:TEMP (Split-Path $uri -Leaf)
Get-File -Url $uri -OutFile $installerPath -Headers $nirsoftHeaders
Expand-Archive $installerPath -DestinationPath "$installPath\Nirsoft\" -Force
CreateDesktopShortcut -ShortcutName "Wireless Network Watcher" -File "$installPath\Nirsoft\WNetWatcher.exe"
Remove-Item $installerPath
}
function InstallWirelessNetView {
$uri = "https://www.nirsoft.net/utils/wirelessnetview.zip"
$nirsoftHeaders = @{"Referer"="https://www.nirsoft.net/utils/wireless_network_view.html"}
$installerPath = Join-Path $env:TEMP (Split-Path $uri -Leaf)
Get-File -Url $uri -OutFile $installerPath -Headers $nirsoftHeaders
Expand-Archive $installerPath -DestinationPath "$installPath\Nirsoft\" -Force
CreateDesktopShortcut -ShortcutName "WirelessNetView" -File "$installPath\Nirsoft\WirelessNetView.exe"
Remove-Item $installerPath
}
function InstallMailPassView {
$uri = "https://www.nirsoft.net/toolsdownload/mailpv.zip"
$nirsoftHeaders = @{"Referer"="https://www.nirsoft.net/utils/mailpv.html"}
$installerPath = Join-Path $env:TEMP (Split-Path $uri -Leaf)
Get-File -Url $uri -OutFile $installerPath -Headers $nirsoftHeaders
Expand-Archive $installerPath -DestinationPath "$installPath\Nirsoft\" -Force
CreateDesktopShortcut -ShortcutName "MailPassView" -File "$installPath\Nirsoft\mailpv.exe"
Remove-Item $installerPath
}
function InstallNetworkPasswordRecovery {
$uri = "https://www.nirsoft.net/toolsdownload/netpass-x64.zip"
$uri7zip = "https://www.pajcomp.pl/pub/%21Misc/7z.exe"
$nirsoftHeaders = @{"Referer"="https://www.nirsoft.net/utils/network_password_recovery.html"}
$installerPath = Join-Path $env:TEMP (Split-Path $uri -Leaf)
$7zipPath = Join-Path $env:TEMP (Split-Path $uri7zip -Leaf)
Get-File -Url $uri -OutFile $installerPath -Headers $nirsoftHeaders
Get-File -Url $uri7zip -OutFile $7zipPath
Start-Process -Wait -FilePath $7zipPath -ArgumentList "e $installerPath -o$installPath\Nirsoft\ * -p`"ntps5291#`" -y" -NoNewWindow
CreateDesktopShortcut -ShortcutName "Network Password Recovery" -File "$installPath\Nirsoft\netpass.exe"
Remove-Item $installerPath
}
function InstallTaskSchedulerView {
$uri = "https://www.nirsoft.net/utils/taskschedulerview-x64.zip"
$nirsoftHeaders = @{"Referer"="https://www.nirsoft.net/utils/task_scheduler_view.html"}
$installerPath = Join-Path $env:TEMP (Split-Path $uri -Leaf)
Get-File -Url $uri -OutFile $installerPath -Headers $nirsoftHeaders
Expand-Archive $installerPath -DestinationPath "$installPath\Nirsoft\" -Force
CreateDesktopShortcut -ShortcutName "TaskSchedulerView " -File "$installPath\Nirsoft\TaskSchedulerView.exe"
Remove-Item $installerPath
}
function InstallProcessTCPSummary {
$uri = "https://www.nirsoft.net/utils/processtcpsummary-x64.zip"
$nirsoftHeaders = @{"Referer"="https://www.nirsoft.net/utils/process_tcp_summary.html"}
$installerPath = Join-Path $env:TEMP (Split-Path $uri -Leaf)
Get-File -Url $uri -OutFile $installerPath -Headers $nirsoftHeaders
Expand-Archive $installerPath -DestinationPath "$installPath\Nirsoft\" -Force
CreateDesktopShortcut -ShortcutName "ProcessTCPSummary " -File "$installPath\Nirsoft\ProcessTCPSummary.exe"
Remove-Item $installerPath
}
function InstallWinUpdatesView {
$uri = "https://www.nirsoft.net/utils/winupdatesview-x64.zip"
$nirsoftHeaders = @{"Referer"="https://www.nirsoft.net/utils/windows_updates_history_viewer.html"}
$installerPath = Join-Path $env:TEMP (Split-Path $uri -Leaf)
Get-File -Url $uri -OutFile $installerPath -Headers $nirsoftHeaders
Expand-Archive $installerPath -DestinationPath "$installPath\Nirsoft\" -Force
CreateDesktopShortcut -ShortcutName "WinUpdatesView" -File "$installPath\Nirsoft\WinUpdatesView.exe"
Remove-Item $installerPath
}
function InstallPosnetNps {
Get-File -Uri "https://github.com/mieszkou/programy/raw/master/Posnet-NPS/NPS.ZIP" -OutFile "$installPath\NPS.zip"
Expand-Archive "$installPath\NPS.zip" -DestinationPath "$installPath" -Force
Rename-Item "$installPath\NPS" "Posnet-NPS"
CreateDesktopShortcut -ShortcutName "PosnetNPS" -File "$installPath\Posnet-NPS\NPS.exe"
}
function InstallPosnetOps {
$uri = "https://github.com/mieszkou/programy/raw/master/Posnet-OPS/Posnet_OPS_Setup_11.50.98.exe"
$installerPath = Join-Path $installPath (Split-Path $uri -Leaf)
Get-File -Url $uri -OutFile $installerPath
Start-Process -FilePath $installerPath -Wait -ArgumentList "/S /D=$installPath\Posnet-OPS"
}
# (dla systemu Windows XP/2000/VISTA/7/8/8.1/10)
# Program przeznaczony jest do obsługi K10/Sigma/kas ONLINE: .net 4
function InstallElzabEureka {
New-Item -Path "$installPath\Elzab-Eureka\" -ItemType Directory -Force | Out-Null
Get-File -Uri "https://github.com/mieszkou/programy/raw/master/Elzab/eureka.zip" -OutFile "$installPath\eureka.zip"
Expand-Archive "$installPath\eureka.zip" -DestinationPath "$installPath\Elzab-Eureka" -Force
CreateDesktopShortcut -ShortcutName "ELZAB Eureka" -File "$installPath\Elzab-Eureka\bez instalatora\Eureka!.exe"
}
# dla Windows XP/2000/VISTA/7/8/8.1/10
# Program przeznaczony jest do obsługi drukarek fiskalnych Zeta,D10,MERA, nowszych w tym ONLINE
# .net 4.5
function InstallElzabStampa {
New-Item -Path "$installPath\Elzab-Stampa\" -ItemType Directory -Force | Out-Null
Get-File -Uri "https://github.com/mieszkou/programy/raw/master/Elzab/stampa.zip" -OutFile "$installPath\stampa.zip"
Expand-Archive "$installPath\stampa.zip" -DestinationPath "$installPath\Elzab-Stampa" -Force
CreateDesktopShortcut -ShortcutName "ELZAB Stampa" -File "$installPath\Elzab-Stampa\bez instalatora\Stampa.exe"
}
# Do komunikacji z kasą (lub systemem kas) służy zestaw funkcji komunikacyjnych.
# Funkcje komunikacyjne opisane są w instrukcji programisty.
# Funkcje komunikacyjne przyjmują i zwracają dane w formie #plików tekstowych,
# przez co nie ma konieczności obsługi kas przez program magazynowy (lub inną aplikację) na poziomie sekwencji sterujących.
function InstallElzabWinexe {
New-Item -Path "$installPath\Elzab-winexe\" -ItemType Directory -Force | Out-Null
Get-File -Uri "https://github.com/mieszkou/programy/raw/master/Elzab/winexe.zip" -OutFile "$installPath\winexe.zip"
Expand-Archive "$installPath\winexe.zip" -DestinationPath "$installPath\Elzab-winexe" -Force
}
function InstallDrivers {
$uri = "https://www.pajcomp.pl/pub/?zip=Sterowniki"
$installerPath = Join-Path $env:TEMP "Sterowniki.zip"
$destinationPath = "$installPath\Sterowniki\"
Get-File -Url $uri -OutFile $installerPath
New-Item -Path $destinationPath -ItemType Directory -Force | Out-Null
Expand-Archive $installerPath -DestinationPath $destinationPath -Force
Remove-Item $installerPath
# Pobranie listy plików zip
$plikiZip = Get-ChildItem -Path $destinationPath -File -Recurse | Where-Object { ($_.Name -like "*.zip") -OR ( $_.Name -like "*.exe") }
# Dla każdego pliku zip
foreach ($plik in $plikiZip) {
try {
$nazwaKatalogu = $plik.BaseName
Expand-Archive -Path $plik.FullName -DestinationPath "$($plik.DirectoryName)\$nazwaKatalogu" -Force
} catch {
Remove-Item -Path "$($plik.DirectoryName)\$nazwaKatalogu" -Force
}
}
}
function InstallAdminSql {
$uri = "https://pajcomp.pl/pub/SQL-tools/AdminSQL.zip"
$installerPath = Join-Path $env:TEMP (Split-Path $uri -Leaf)
Get-File -Url $uri -OutFile $installerPath
Expand-Archive $installerPath -DestinationPath "$installPath\AdminSQL" -Force
CreateDesktopShortcut -ShortcutName "AdminSQL" -File "$installPath\AdminSQL\AdminSQL.exe"
Remove-Item $installerPath
}
function InstallHeidiSql {
$uri = "https://www.heidisql.com" + (Invoke-WebRequest -UseBasicParsing -Uri 'https://www.heidisql.com/download.php?download=installer' | Select-Object -ExpandProperty Links | Where-Object {($_.href -like "*/installers/*") -and ($_.href -like "*_Setup.exe")} | Select-Object -First 1 | Select-Object -ExpandProperty href)
$installerPath = Join-Path $env:TEMP (Split-Path $uri -Leaf)
Get-File -Url $uri -OutFile $installerPath
Start-Process -FilePath $installerPath -Args "/ALLUSERS /silent" -Verb RunAs -Wait
Remove-Item $installerPath
}
function InstallSQLiteStudio {
$uri = Invoke-RestMethod -uri https://api.github.com/repos/pawelsalawa/sqlitestudio/releases/latest | Select-Object -ExpandProperty "assets" | ? { $_.name.Contains("-windows-x64.zip")} | Select-Object -ExpandProperty browser_download_url
$installerPath = Join-Path $env:TEMP (Split-Path $uri -Leaf)
Get-File -Url $uri -OutFile $installerPath
Expand-Archive $installerPath -DestinationPath "$installPath\" -Force
CreateDesktopShortcut -ShortcutName "SQLiteStudio" -File "$installPath\SQLiteStudio\SQLiteStudio.exe"
Remove-Item $installerPath
}
function InstallDBeaver {
$uri = "https://dbeaver.io/files/dbeaver-ce-latest-win32.win32.x86_64.zip"
$installerPath = Join-Path $env:TEMP (Split-Path $uri -Leaf)
Get-File -Url $uri -OutFile $installerPath
Expand-Archive $installerPath -DestinationPath "$installPath" -Force
CreateDesktopShortcut -ShortcutName "DBeaver" -File "$installPath\dbeaver\dbeaver.exe"
Remove-Item $installerPath
}
function InstallSSMS {
$uri = "https://aka.ms/ssmsfullsetup"
Get-File -Uri $uri -OutFile "$($env:TEMP)\ssmsfullsetup.exe"
Start-Process -FilePath "$($env:TEMP)\ssmsfullsetup.exe" -Args "/passive" -Verb RunAs -Wait
}
function InstallSQLBackupMaster {
$uri = "https://www.sqlbackupmaster.com/Content/download/sbm-setup.exe"
$installerPath = Join-Path $env:TEMP (Split-Path $uri -Leaf)
Get-File -Url $uri -OutFile $installerPath
Start-Process -FilePath $installerPath -Verb RunAs -Wait
}
function InstallSql2025 {
$sqlver=2025
New-Item -Path "$($env:TEMP)\sql$($sqlver)" -ItemType Directory -Force | Out-Null
Get-File -Uri "https://pajcomp.pl/pub/MSSQL/sql$($sqlver)/SQLEXPR_x64_ENU.exe" -OutFile "$($env:TEMP)\sql$($sqlver)\SQLEXPR_x64_ENU.exe"
Start-Process -Wait -FilePath "$($env:TEMP)\sql$($sqlver)\SQLEXPR_x64_ENU.exe" -ArgumentList "/QS /IACCEPTSQLSERVERLICENSETERMS /ACTION=""install"" /FEATURES=SQL /SQLSVCSTARTUPTYPE=""Automatic"" /INSTANCENAME=SQL$($sqlver) /SECURITYMODE=SQL /SAPWD=Wapro3000 /TCPENABLED=1"
Set-ItemProperty -Path "HKLM:\software\microsoft\microsoft sql server\mssql17.SQL$($sqlver)\mssqlserver\supersocketnetlib\tcp\ipall" -Name TcpDynamicPorts -Value ''
Set-ItemProperty -Path "HKLM:\software\microsoft\microsoft sql server\mssql17.SQL$($sqlver)\mssqlserver\supersocketnetlib\tcp\ipall" -Name tcpport -Value "5$($sqlver)"
New-NetFirewallRule -DisplayName "SQL$($sqlver)" -Profile Any -Direction Inbound -Action Allow -Protocol TCP -LocalPort "5$($sqlver)"
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\MSSQL`$SQL$sqlver" -Name DelayedAutoStart -Value 0
net stop MSSQL`$SQL$sqlver
net start MSSQL`$SQL$sqlver
}
function InstallSql2022 {
$sqlver=2022
New-Item -Path "$($env:TEMP)\sql$($sqlver)" -ItemType Directory -Force | Out-Null
Get-File -Uri "https://pajcomp.pl/pub/MSSQL/sql$($sqlver)/SQLEXPR_x64_ENU.exe" -OutFile "$($env:TEMP)\sql$($sqlver)\SQLEXPR_x64_ENU.exe"
Start-Process -Wait -FilePath "$($env:TEMP)\sql$($sqlver)\SQLEXPR_x64_ENU.exe" -ArgumentList "/QS /IACCEPTSQLSERVERLICENSETERMS /ACTION=""install"" /FEATURES=SQL /SQLSVCSTARTUPTYPE=""Automatic"" /INSTANCENAME=SQL$($sqlver) /SECURITYMODE=SQL /SAPWD=Wapro3000 /TCPENABLED=1"
Set-ItemProperty -Path "HKLM:\software\microsoft\microsoft sql server\mssql16.SQL$($sqlver)\mssqlserver\supersocketnetlib\tcp\ipall" -Name TcpDynamicPorts -Value ''
Set-ItemProperty -Path "HKLM:\software\microsoft\microsoft sql server\mssql16.SQL$($sqlver)\mssqlserver\supersocketnetlib\tcp\ipall" -Name tcpport -Value "5$($sqlver)"
New-NetFirewallRule -DisplayName "SQL$($sqlver)" -Profile Any -Direction Inbound -Action Allow -Protocol TCP -LocalPort "5$($sqlver)"
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\MSSQL`$SQL$sqlver" -Name DelayedAutoStart -Value 0
net stop MSSQL`$SQL$sqlver
net start MSSQL`$SQL$sqlver
}
function InstallSql2019 {
$sqlver=2019
New-Item -Path "$($env:TEMP)\sql$($sqlver)" -ItemType Directory -Force | Out-Null
Get-File -Uri "https://pajcomp.pl/pub/MSSQL/sql$($sqlver)/SQLEXPR_x64_ENU.exe" -OutFile "$($env:TEMP)\sql$($sqlver)\SQLEXPR_x64_ENU.exe"
Start-Process -Wait -FilePath "$($env:TEMP)\sql$($sqlver)\SQLEXPR_x64_ENU.exe" -ArgumentList "/QS /IACCEPTSQLSERVERLICENSETERMS /ACTION=""install"" /FEATURES=SQL /INSTANCENAME=SQL$($sqlver) /SECURITYMODE=SQL /SAPWD=Wapro3000 /TCPENABLED=1"
Set-ItemProperty -Path "HKLM:\software\microsoft\microsoft sql server\mssql15.SQL$($sqlver)\mssqlserver\supersocketnetlib\tcp\ipall" -Name TcpDynamicPorts -Value ''
Set-ItemProperty -Path "HKLM:\software\microsoft\microsoft sql server\mssql15.SQL$($sqlver)\mssqlserver\supersocketnetlib\tcp\ipall" -Name tcpport -Value "5$($sqlver)"
New-NetFirewallRule -DisplayName "SQL$($sqlver)" -Profile Any -Direction Inbound -Action Allow -Protocol TCP -LocalPort "5$($sqlver)"
net stop MSSQL`$SQL$sqlver
net start MSSQL`$SQL$sqlver
}
function InstallSql2017 {
$sqlver=2017
New-Item -Path "$($env:TEMP)\sql$($sqlver)" -ItemType Directory -Force | Out-Null
Get-File -Uri "https://pajcomp.pl/pub/MSSQL/sql$($sqlver)/SQLEXPR_x64_ENU.exe" -OutFile "$($env:TEMP)\sql$($sqlver)\SQLEXPR_x64_ENU.exe"
Start-Process -Wait -FilePath "$($env:TEMP)\sql$($sqlver)\SQLEXPR_x64_ENU.exe" -ArgumentList "/QS /IACCEPTSQLSERVERLICENSETERMS /ACTION=""install"" /FEATURES=SQL /INSTANCENAME=SQL$($sqlver) /SECURITYMODE=SQL /SAPWD=Wapro3000 /TCPENABLED=1"
Set-ItemProperty -Path "HKLM:\software\microsoft\microsoft sql server\mssql14.SQL$($sqlver)\mssqlserver\supersocketnetlib\tcp\ipall" -Name TcpDynamicPorts -Value ''
Set-ItemProperty -Path "HKLM:\software\microsoft\microsoft sql server\mssql14.SQL$($sqlver)\mssqlserver\supersocketnetlib\tcp\ipall" -Name tcpport -Value "5$($sqlver)"
New-NetFirewallRule -DisplayName "SQL$($sqlver)" -Profile Any -Direction Inbound -Action Allow -Protocol TCP -LocalPort "5$($sqlver)"
net stop MSSQL`$SQL$sqlver
net start MSSQL`$SQL$sqlver
}
function InstallPcm {
$uri = "https://pobierz.insoft.com.pl/PC-Market7/Wersja_aktualna/InstallPCM_x64.exe"
$installerPath = Join-Path $installPath (Split-Path $uri -Leaf)
Get-File -Uri $uri -OutFile $installerPath
Start-Process -FilePath $installerPath -Verb RunAs -Wait -ArgumentList "--mode unattended --unattendedmodeui minimalWithDialogs --installer-language pl --db 0 --template 0 --killall 1 --enable-components installPcm,AktualizacjaShoper"
# Remove-Item $installerPath
}
function InstallPcKSeF {
$uri = "https://pobierz.insoft.com.pl/PC-Market7/Wersja_aktualna/pcksef-x64.exe"
$installerPath = Join-Path $installPath (Split-Path $uri -Leaf)
Get-File -Uri $uri -OutFile $installerPath
Start-Process -FilePath $installerPath -Verb RunAs -Wait -ArgumentList "--installer-language pl"
# Remove-Item $installerPath
}
function InstallPcPos {
$uri = "https://pobierz.insoft.com.pl/PC-POS7/Wersja_aktualna/pcpos7_x64_install.exe"
$installerPath = Join-Path $installPath (Split-Path $uri -Leaf)
Get-File -Uri $uri -OutFile $installerPath
Start-Process -FilePath $installerPath -Verb RunAs -Wait -ArgumentList "--mode unattended --unattendedmodeui minimalWithDialogs --enable-components POSY --installer-language pl --TYPDBINSTALL 1 --TYPDRUK SpoofFiscalPrinter"
# Remove-Item $installerPath
}
function InstallScserver {
$uri = "https://pobierz.insoft.com.pl/Scserver/Wersja_aktualna/Scserver-x64.exe"
$installerPath = Join-Path $installPath (Split-Path $uri -Leaf)
Get-File -Uri $uri -OutFile $installerPath
Start-Process -FilePath $installerPath -Verb RunAs -Wait
# Remove-Item $installerPath
}
function InstallImpex {
$uri = "https://pajcomp.pl/pub/Insoft/ImpEx/ImpEx.zip"
$installerPath = Join-Path $installPath (Split-Path $uri -Leaf)
Get-File -Uri $uri -OutFile $installerPath
Expand-Archive $installerPath -DestinationPath "$installPath\" -Force
CreateDesktopShortcut -ShortcutName "ImpEx" -File "$installPath\Impex\ImpEx.exe"
# Remove-Item $installerPath
}
function InstallWapro {
$uri = "https://storage.wapro.pl/storage/InstalatorWAPRO/InstalatorWAPRO.exe"
$installerPath = Join-Path $installPath (Split-Path $uri -Leaf)
Get-File -Uri $uri -OutFile $installerPath
Start-Process -FilePath $installerPath -Verb RunAs -Wait
# Remove-Item $installerPath
}
function InstallNetscan {
$uri = "https://www.pajcomp.pl/pub/!Misc/netscan.exe"
$installerPath = "$(Join-Path $installPath (Split-Path $uri -Leaf))"
Get-File -Uri $uri -OutFile $installerPath
CreateDesktopShortcut -ShortcutName "Netscan" -File $installerPath
}
function InstallPutty {
$uri = "https://the.earth.li/~sgtatham/putty/latest/w64/putty.exe"
$installerPath = "$(Join-Path $installPath (Split-Path $uri -Leaf))"
Get-File -Uri $uri -OutFile $installerPath
CreateDesktopShortcut -ShortcutName "Putty" -File $installerPath
}
function InstallWinbox {
$uri = "https://raw.githubusercontent.com/mieszkou/programy/master/winbox/winbox64.exe"
$installerPath = "$(Join-Path $installPath (Split-Path $uri -Leaf))"
Get-File -Uri $uri -OutFile $installerPath
CreateDesktopShortcut -ShortcutName "Winbox" -File $installerPath
}
function InstallWinbox4 {
$uri = (Invoke-WebRequest "https://mikrotik.com/download/winbox" |
Select-Object -ExpandProperty Links |
Where-Object {($_.href -like "*/*_Windows.zip")} |
Select-Object -First 1 |