Ikuti langkah-langkah berikut ini untuk membuat files, folders, dan registry di Windows PowerShell:
1. Ketik Windows PowerShell di Desktop Windows Server 2012R2
2. Pilih Icon Windows PowerShell
3. Di dalam prompt Windows PowerShell ketikkan script di bawah ini:
# If the files, folders, and registry items don't exist, create them.
if (!(test-path "HKCU:\Software\MyCustomSoftware\ConnectionInformation")) {
New-item –path "HKCU:\Software\MyCustomSoftware\ConnectionInformation" -
force | out-null }
if (!(test-path "HKCU:\Software\MyCustomSoftware\AppSettings")) { New-item
–path "HKCU:\Software\MyCustomSoftware\AppSettings" -force | out-null }
if (!(test-path "c:\Program Files\MyCustomSoftware\Graphics\")){ New-item –
path "c:\Program Files\MyCustomSoftware\" -name Graphics –ItemType
Directory | out-null }
if (!(test-path "c:\Program Files\MyCustomSoftware\Logs\")){ New-item –path
"c:\Program Files\MyCustomSoftware\" -name Logs –ItemType Directory | outnull
}
if (!(test-path "c:\Program
Files\MyCustomSoftware\Graphics\FirstGraphic.png")) { New-item –path
"c:\Program Files\MyCustomSoftware\Graphics\" -name "FirstGraphic.png" –
ItemType File | out-null }
if (!(test-path "c:\Program
Files\MyCustomSoftware\Graphics\SecondGraphic.png")) { New-item –path
"c:\Program Files\MyCustomSoftware\Graphics\" -name "SecondGraphic.png" –
ItemType File | out-null }
4. Tutup jendela PowerShell jika sudah selesai
Buat Video-video yang lainnya cek di Channel ini ya:
https://www.youtube.com/channel/UCikwGDYfTFWQxdiCqKvx6_w
Buat informasi seputar karir, travelling dan Reading kamu bisa mengunjungi blog ini ya:
https://nanangsadikin.wordpress.com/
Semoga bermanfaat.
Salam
Nanang
1. Ketik Windows PowerShell di Desktop Windows Server 2012R2
2. Pilih Icon Windows PowerShell
3. Di dalam prompt Windows PowerShell ketikkan script di bawah ini:
# If the files, folders, and registry items don't exist, create them.
if (!(test-path "HKCU:\Software\MyCustomSoftware\ConnectionInformation")) {
New-item –path "HKCU:\Software\MyCustomSoftware\ConnectionInformation" -
force | out-null }
if (!(test-path "HKCU:\Software\MyCustomSoftware\AppSettings")) { New-item
–path "HKCU:\Software\MyCustomSoftware\AppSettings" -force | out-null }
if (!(test-path "c:\Program Files\MyCustomSoftware\Graphics\")){ New-item –
path "c:\Program Files\MyCustomSoftware\" -name Graphics –ItemType
Directory | out-null }
if (!(test-path "c:\Program Files\MyCustomSoftware\Logs\")){ New-item –path
"c:\Program Files\MyCustomSoftware\" -name Logs –ItemType Directory | outnull
}
if (!(test-path "c:\Program
Files\MyCustomSoftware\Graphics\FirstGraphic.png")) { New-item –path
"c:\Program Files\MyCustomSoftware\Graphics\" -name "FirstGraphic.png" –
ItemType File | out-null }
if (!(test-path "c:\Program
Files\MyCustomSoftware\Graphics\SecondGraphic.png")) { New-item –path
"c:\Program Files\MyCustomSoftware\Graphics\" -name "SecondGraphic.png" –
ItemType File | out-null }
4. Tutup jendela PowerShell jika sudah selesai
Buat Video-video yang lainnya cek di Channel ini ya:
https://www.youtube.com/channel/UCikwGDYfTFWQxdiCqKvx6_w
Buat informasi seputar karir, travelling dan Reading kamu bisa mengunjungi blog ini ya:
https://nanangsadikin.wordpress.com/
Semoga bermanfaat.
Salam
Nanang
Comments
Post a Comment