Can you help with installer aroma? - Sony Ericsson Xperia Neo, Pro

I modified the installer aroma to include some optional installation apps, I edited the files "aroma-config" and "updater-script" but when you start the installation appears:
SYNTAX ERROR! aroma-config on line 380 col 2
(status 1)
Installation aborted
look in aroma-config on line 380 but only shows this:
PHP:
#--------[ Initial Value = 0: Unselected, 1: Selected, 2: Group Item, 3: Not Visible ]---------#
); (line 380)
##
#
# Next Screen is Installation UI, So change the next button text to "Install Now"
#
could someone help me?
thanks

I remember in android themes or general there is a thread for aroma installer q and a. U can ask there to get best help
Sent from my Xperia Neo V using Tapatalk 2

PHP:
###################################################################################################################
#
# STEP 8 - CUSTOMIZE YOUR INSTALLATION
#
checkbox(
#-- Title
"Customize",
#-- Sub Title
"Choose items what you desire as utilites",
#-- Icon: <AROMA Resource Dir>/icons/personalize.png or <ThemeDir>/icon.personalize.png
"@personalize",
#-- Will be saved in /tmp/aroma/customize.prop
"customize.prop",
#------------------------------------------------[ Checkbox Without Group ]----------------------------------------------#
# TITLE | SUBTITLE | Initial Value #
#------------------+-------------------------------------------------------------------------------------+---------------#
"App", "", 2, #-- Group 1. key = "item.1.x"
"Advanced Task Killer Pro","Advanced Task Killer Pro", 0, #-- item.1.3
"Download Music Info","Xperia Download Music info app works on both BL", 0, #-- item.1.4
"Sony's Facebook Integration","Facebook Integration for Xperia devices", 0, #-- item.1.5
"Stock Keyboard GB","Gingerbread keyboard stock", 0, #-- item.1.10
"Gallery Google","Gallery Google more Camera HOLO", 0 #-- item.1.7
SYNTAX ERROr...373 col 17 "Root Explorer","Explorer rooted system file manager", 0, #-- item.1.1
"Titanium backup","This app is used to backup user apps and system apps", 0, #-- item.1.2
"Link2SD","Their phone to move applications to the SD card.", 0, #-- item.1.9
"Boost My Xperia","Tiny yet Powerfull Tool", 0, #-- item.1.6
"Seeder","LAG Reduction", 0, #-- item.1.8
#--------[ Initial Value = 0: Unselected, 1: Selected, 2: Group Item, 3: Not Visible ]---------#
);
##
#
# Next Screen is Installation UI, So change the next button text to "Install Now"
#
ini_set("text_next", "Install");

Related

[Q] Need help on Aroma Installer.

Hi guys.
I need some help on Aroma Installer and how to configure it.
I know up to how to add the Aroma Installer, and choose it's theme.
But, I want to learn a bit more about how to add options.
e.g Select Launcher
Select Music Player
Select Theme.
etc.
How can options be added to the Aroma Installer?
Lots of reading to be done here....
http://forum.xda-developers.com/showthread.php?p=28706056
Sent from my GT-I9300 using xda app-developers app
Download the AROMA installer 2.56 from the thread and have a look through the files. All the files will be in the META-INF folder. The ones you want are all the way into the /aroma/ folder.
You want aroma-config and updater-script. If you don't know EDIFY... then you need to go and read up on EDIFY first. The two files are heavily annotated so it's quite easy to follow. You can/should also download a ROM that uses it and read through how they've implemented it. Darkside Agent who cooks CodecROM said I could freely look through his and see how he's done things. You could look at his, and I will extend the same and let you look through mine
This may be a good place to start also:
http://alpha-techs.co.uk/files/roms/ultima/Mods/Mega_Wipe_AROMA.zip
Compare it to the default installer with the examples (Aroma-installer-2.56.zip) or use it as a base and modify it to your liking. I don't mind.
Looking at my Mega_Wipe script, in aroma-config you see this:
Code:
selectbox(
"Mega, Super and Simple Data Wipe",
"Which method would you like to use?",
"@alert",
"clear.prop",
"Make your selection", "", 2, #-- Group 1. key = "selected.1"
"Mega Wipe", "Wipe EVERYTHING (System, Data, Preload and internal storage)", 0, #-- selected.1 = 1
"Wipe Data", "Wipe System Data, Dalvik Cache and Cache", 0, #-- selected.1 = 2
"Simple Wipe", "Wipe Cache and Dalvik Cache", 1 #-- selected.1 = 3
);
To add another choice you simply add something else like this ^ replacing everything as you see fit.
I suggest editing in notepad++ and setting the language to shell.
PM me if you need help and I'll try.
Download this zip and have a look in 2 files:
Aroma-config and
Updater-script
This is the configuration I use for my ROM.
Look at both the files side-by-side. Basically what happens here is you ask the user to choose an option, that option number 1,2,3,4 etc is stored in the cache in file.prop..
This value is then used to flash the respective files using IF-Then statement..
If you don't get to understand anything ping me..
I tried to put a selection in launcher. But it says bad in cwm.
What's wrong in this aroma-config file:
Code:
textbox(
#-- Title
"rom",
#-- Subtitle
"CHANGELOG",
#-- Icon
"@update",
#-- Arg 4
resread("changelogs.txt")
);
###########################################################################
# rom Aroma Config #
###########################################################################
selectbox(
"Launchers",
"Select the desired Launcher you wish to use",
"launcher.prop",
"**Default is Xperia Launcher**", "", 2, #-- Group 1. key = "selected.1"
"Xperia Launcher", "Use Xperia Launcher as default in your rom", 1, #-- selected.1 = 1
"Holo Launcher", "Use Holo Launcher as default in your rom", 0, #-- selected.1 = 2
);
appendvar("installmsg","\n\nPlease Select Installation Type Below:");
install(
"Installing",
"<#999>Now flashing rom...\nPlease Wait...</#>",
"icons/install"
);
masterex567 said:
I tried to put a selection in launcher. But it says bad in cwm.
What's wrong in this aroma-config file:
Code:
textbox(
#-- Title
"rom",
#-- Subtitle
"CHANGELOG",
#-- Icon
"@update",
#-- Arg 4
resread("changelogs.txt")
);
###########################################################################
# rom Aroma Config #
###########################################################################
selectbox(
"Launchers",
"Select the desired Launcher you wish to use",
"launcher.prop",
"**Default is Xperia Launcher**", "", 2, #-- Group 1. key = "selected.1"
"Xperia Launcher", "Use Xperia Launcher as default in your rom", 1, #-- selected.1 = 1
"Holo Launcher", "Use Holo Launcher as default in your rom", 0, #-- selected.1 = 2
);
appendvar("installmsg","\n\nPlease Select Installation Type Below:");
install(
"Installing",
"<#999>Now flashing rom...\nPlease Wait...</#>",
"icons/install"
);
Click to expand...
Click to collapse
Don't put a "," after the 0 in the last line...
Code:
"Holo Launcher", "Use Holo Launcher as default in your rom", 0, #-- selected.1 = 2
zoot1 said:
Don't put a "," after the 0 in the last line...
Code:
"Holo Launcher", "Use Holo Launcher as default in your rom", 0, #-- selected.1 = 2
Click to expand...
Click to collapse
Okk.
I did that and now the package doesn't show errors in CWM.
The aroma works fine.
Is it ok, if there is no launcher in the \system\app but just in the Apps\launchers folder?
After "Installing Launcher"
it gives an error saying:
file_getprop: failed to stat
"/tmp/aroma/launcher.prop": No such file or directory..
Why is that problem occuring?
Plus the rom no longer boots.
Reboots automatically into recovery.
Logcat says:
- exec '/system/bin/sh' failed: Permission denied (13) -
Anyone?
It's okay to not have a launcher included in the rom.. However if the launcher flash fails.. Your system will show a black screen after booting..
Don't know what is causing the other problems.. Somehow the launcher.prop file is not getting created..
Send me the meta folder I will have a look and try to find out he problem.. Also the error log
sent from here, there, somewhere!!
zoot1 said:
It's okay to not have a launcher included in the rom.. However if the launcher flash fails.. Your system will show a black screen after booting..
Don't know what is causing the other problems.. Somehow the launcher.prop file is not getting created..
Send me the meta folder I will have a look and try to find out he problem.. Also the error log
sent from here, there, somewhere!!
Click to expand...
Click to collapse
I have sent a link of the meta-inf to your pm.
Thanks
masterex567 said:
I have sent a link of the meta-inf to your pm.
Thanks
Click to expand...
Click to collapse
Things which noticed at first glance are:
1.in
Code:
selectbox(
"Launchers",
"Select the desired Launcher you wish to use",
"launcher.prop",
The launcher.prop command is in the location of the icon file
try adding
Code:
"@icon",
above launcher.prop command
2. the comma "," is still there after the last zero (0)
3. Try adding the restart command in the end
modify these lines to suit your needs and add in the end
Code:
ini_set("text_next", "Finish");
checkviewbox(
"Installation Completed",
"<#selectbg_g><b>Congratulation...</b></#>\n\n"+
"<b>"+ini_get("rom_name")+"</b> has been installed into your device.\n\n"+
"Installer Status: "+getvar("retstatus")+"\n\n",
"@welcome",
"Reboot your device now.",
"1",
"reboot_it"
);
if
getvar("reboot_it")=="1"
then
reboot("onfinish");
endif;
zoot1 said:
Things which noticed at first glance are:
1.in
Code:
selectbox(
"Launchers",
"Select the desired Launcher you wish to use",
"launcher.prop",
The launcher.prop command is in the location of the icon file
try adding
Code:
"@icon",
above launcher.prop command
2. the comma "," is still there after the last zero (0)
3. Try adding the restart command in the end
modify these lines to suit your needs and add in the end
Code:
ini_set("text_next", "Finish");
checkviewbox(
"Installation Completed",
"<#selectbg_g><b>Congratulation...</b></#>\n\n"+
"<b>"+ini_get("rom_name")+"</b> has been installed into your device.\n\n"+
"Installer Status: "+getvar("retstatus")+"\n\n",
"@welcome",
"Reboot your device now.",
"1",
"reboot_it"
);
if
getvar("reboot_it")=="1"
then
reboot("onfinish");
endif;
Click to expand...
Click to collapse
I remove the comma, but leave the quotes? (" ") ??
masterex567 said:
I remove the comma, but leave the quotes? (" ") ??
Click to expand...
Click to collapse
no no..quotes were just to highlight the comma..it will be
0 #-- selected.1 = 2
zoot1 said:
no no..quotes were just to highlight the comma..it will be
0 #-- selected.1 = 2
Click to expand...
Click to collapse
Ok.
here's the whole aroma config:
Code:
##
#
# AROMA Installer - based on the Mod-installer by KamikaZeeFu
# (c) 2011 by Ahmad Amarullah
# amarullz - xda-developers
# http://www.amarullz.com/
theme("ics");
calibrate("0.9263","21","0.9944","1","yes");
viewbox(
"<#999>Welcome</#>",
"\n\n\n\n\n"+
" <#999>This is the Installation Procedure to Flash</#>\n"+
" <#999>rom</#>\n\n"+
"\n\n\n"+
"<#999>Press Next to continue the installation...</#>",
"icons/info"
);
textbox(
#-- Title
"rom",
#-- Subtitle
"CHANGELOG",
#-- Icon
"@update",
#-- Arg 4
resread("changelogs.txt")
);
###########################################################################
# rom Aroma Config #
###########################################################################
selectbox(
"Launchers",
"Select the desired Launcher you wish to use",
"@icon",
"launcher.prop",
"**Default is Xperia Launcher**", "", 2, #-- Group 1. key = "selected.1"
"Xperia Launcher", "Use Xperia Launcher as default in your rom", 1, #-- selected.1 = 1
"Holo Launcher", "Use Holo Launcher as default in your rom", 0, #-- selected.1 = 2
);
appendvar("installmsg","\n\nPlease Select Installation Type Below:");
install(
"Installing",
"<#999>Now flashing rom..\nPlease Wait...</#>",
"icons/install"
);
);
ini_set("text_next", "Finish");
checkviewbox(
"Installation Completed",
"<#selectbg_g><b>Congratulation...</b></#>\n\n"+
"<b>"this rom "</b> has been installed into your device.\n\n"+
"Installer Status: "+getvar("retstatus")+"\n\n",
"@welcome",
"Reboot your device now.",
"1",
"reboot_it"
);
if
getvar("reboot_it")=="1"
then
reboot("onfinish");
endif;
Code:
"Holo Launcher", "Use Holo Launcher as default in your rom", 0 #-- selected.1 = 2 );
That comma is still there..use the code from above..
zoot1 said:
Code:
"Holo Launcher", "Use Holo Launcher as default in your rom", 0 #-- selected.1 = 2 );
That comma is still there..use the code from above..
Click to expand...
Click to collapse
Ok. Hit the Thanks button once again.
I'll test soon, and post the results.
Thanks again.
Okk.
I tried it.
And
It says:
Code:
SYNTAX ERROR!!! aroma-config on line 52 col 2.
E:Error in /sdcard/rom.zip
(Status 1)
The log shows:
Code:
aroma/s: Starting Release
aroma/s: Font released
aroma/s: Input Released
aroma/s: Archive released
aroma/s: Closing Freetype
aroma/s: Graph Released
aroma/s: Cleanup Temporary
aroma/s: Check for Reboot
aroma/s: Closing Recovery Pipe
E: Error in /sdcard/rom.zip
This is what is at line 59 of the aroma config:
Code:
ini_set("text_next", "Finish");
masterex567 said:
Okk.
I tried it.
And
It says:
Code:
SYNTAX ERROR!!! aroma-config on line 52 col 2.
E:Error in /sdcard/rom.zip
(Status 1)
The log shows:
Code:
aroma/s: Starting Release
aroma/s: Font released
aroma/s: Input Released
aroma/s: Archive released
aroma/s: Closing Freetype
aroma/s: Graph Released
aroma/s: Cleanup Temporary
aroma/s: Check for Reboot
aroma/s: Closing Recovery Pipe
E: Error in /sdcard/rom.zip
This is what is at line 59 of the aroma config:
Code:
ini_set("text_next", "Finish");
Click to expand...
Click to collapse
there is an extra
Code:
);
before
Code:
ini_set("text_next", "Finish");
remove it and let me know how it goes.
zoot1 said:
there is an extra
Code:
);
before
Code:
ini_set("text_next", "Finish");
remove it and let me know how it goes.
Click to expand...
Click to collapse
I removed it.
Problem still persists.
This is what is above line 59:
Code:
install(
"Installing",
"<#999>Now flashing Droid ACE v2.1...\nPlease Wait...</#>",
"icons/install"
);
ini_set("text_next", "Finish");
checkviewbox(

Aroma installer 2.56

Please help me,
SYNTAX ERROR!!! aroma-config on line 8 col 1
aroma-config here:
pastebin.com/amQuVCWj
Click to expand...
Click to collapse
Try my method on aroma post and report and
http://forum.xda-developers.com/showthread.php?t=1770284
This is aroma support thread port there not here lil
Sent from my HTC Sensation Z710e using Tapatalk 2
please help me
Harbir said:
Try my method on aroma post and report and
http://forum.xda-developers.com/showthread.php?t=1770284
This is aroma support thread port there not here lil
Sent from my HTC Sensation Z710e using Tapatalk 2
Click to expand...
Click to collapse
Thanks & other problem :
Here in last line error ? why ?
################################INSTALL#################################
if prop("ch.prop","selected.1")== "1"
then
install(
"Walkman Xperia™ Installation",
getvar("rom_name") + "\n" +
"Please wait while installation completes" +
"",
"icons/install"
);
checkviewbox(
#-- Title
"Installation Completed",
#-- Text
"<#selectbg_g><b>Congratulations...</b></#>\n\n"+
"<b>"+ini_get("rom_name")+"</b> has been installed into your device.\n\n",
#-- Icon
"@welcome",
#-- Checkbox Text
"Reboot your device now.",
#-- Initial Checkbox value ( 0=unchecked, 1=checked ) - (Optional, default:0)
"1",
#-- Save checked value in variable "reboot_it" (Optional)
"reboot_it"
);
endif;
###
#
# Check if reboot checkbox was checked
if
getvar("reboot_it")=="1"
then
reboot("onfinish");
endif;
What is the error so I can look into
Sent from my HTC Sensation using Tapatalk 2
Harbir said:
What is the error so I can look into
Sent from my HTC Sensation using Tapatalk 2
Click to expand...
Click to collapse
(status 0) - line 257 col 7 :
257 : endif;
MicQo said:
(status 0) - line 257 col 7 :
257 : endif;
Click to expand...
Click to collapse
Try to delete end if whole line and make it again as it some time worked with me ...
Sent from my HTC Sensation using Tapatalk 2
please help me
Harbir said:
Try to delete end if whole line and make it again as it some time worked with me ...
Sent from my HTC Sensation using Tapatalk 2
Click to expand...
Click to collapse
Without endif Error in 277 col 17
with endif error in 280 line 7
sorry wrong post

[SOLVED] [Q] Help please for Aroma

Hi, i try to make a rom with aroma installer.
Since this morning I'm stuck on this problem : there's no error when I run, but during installation I propose a choice for system apps installation. or two of them a second choice is needed.
when i selected one (thememangager) the new selectbox comes.
but for second (livewallpaper) nothing happens, it goes to next. As if there's no choice. I've read and read again, but I can't find my problem.
Could someone help me please? (i've join the text in that show content)
Thanks in advance...
HTML:
checkbox(
"System Apps",
"Select the apps you want to install: ",
"@apps",
"systemapps.prop",
"Choose System Apps", "", 2,
"Email", "Exchanges services", 0, #-- item.1.1
"Bluetooth", "If you use Bluetooth, needed", 0, #-- item.1.2
"DSP Manager", "Manage the sound for headphones, speacker, and bluetooth", 0, #-- item.1.3
"GooManager", "Not a needed for MuSPaC but I you want...", 0, #-- item.1.4
"LockClock", "Time, weather, calendar in one widget customizable", 1, #-- item.1.5
"Performance Control", "More options to set perf of your Ace", 1, #-- item.1.6
"Theme Manager", "Choose between original or manage hdpi themes", 1, #-- item.1.7
"Torch", "It can help to use Pie's or statusbar's torch shotrcut, but...", 1, #-- item.1.8
"Voice Dialer", "Original voice recognition", 0, #-- item.1.9
"WallPaper picker", "To manage wallpaper in other way that the gallery", 0, #-- item.1.10
"LiveWallPaper Picker", "May not be installed"+
"To manage the LWP, but watch out for your battery", 0 #-- item.1.11
);
#ThemeManager
if
file_getprop("/tmp/aroma/systemapps.prop","item.1.7") == "1"
then
selectbox(
"Theme Manager",
"Wich Theme Manager do you want ?",
"@thememan",
"systemapps.prop",
"Choose", "", 2,
"Hdpi", "To enable Hdpi themes", 1,
"Normal", "Most of themes just need this one", 0
);
else
writetmpfile(
"systemapps.prop",
"selected.1=0\n"
);
endif;
#LiveWallpaper
if
file_getprop("/tmp/aroma/systemapps.prop","item.1.11") == "1"
then
checkbox(
"Live Wallpaper",
"Which Live Wallpaper(s) would you like?",
"@lwp",
"livewall.prop",
"Choose", "", 2,
"Deep Sea", "Translucent Jellyfish swim through the deep sea.", 0,
"Luminous Dots", "Glowing dots move smoothly across the screen as if alive.", 0,
"Noise Field", "Bubbles fade in and out of view as they swirl across the screen.", 0,
"Phase Beam", "Relaxing pulses of colour and light move serenely across the screen.", 0
);
else
writetmpfile(
"livewall.prop",
"item.1.1=0\n"+
"item.1.2=0\n"+
"item.1.3=0\n"+
"item.1.4=0\n"
);
endif;
I finally found my answer : stop to search solution will come alone.
if it can be useful to someone : 1 choice = 1 *.prop file.
so first choice is the sytem apps (systemapps.prop). Then if required you'll go to the 2nd or 3d choice. Here theme manager and LWP picker. So thememan.prop and lwp.prop.
If, like me, you put twice systemapps.prop, it will or rewrite the file erasing the the first time, or considering it is yet choosen. That's why it didn't work.
Re: [Q] Help please for Aroma
Better than aroma try dsixda kitchen.
"NEVER CALL YOURSELF NOOB BE A NEWBIE"
PM me if u need help
Sent from MOON......
Moonguy75 said:
Better than aroma try dsixda kitchen.
"NEVER CALL YOURSELF NOOB BE A NEWBIE"
PM me if u need help
Sent from MOON......
Click to expand...
Click to collapse
Thanks but why would I prefer? Have you tried? What in more?
I've read fastly, but thread is indicate as closed, so for any question it risk to be difficult!?
Aroma semmed to be easier... and I'd like to not read again some pages and pages to learn a new kind of program. (sure if i can't manage to work it, i'll think twice about!)
It's not that my rom don't run or stopped for error. It works before and after. Just the second menu doesn't appear.
Anyway thanks for your purpose (and for explaination for dsixda if you want to learn me).
Anybody else an idea?

Flashlight (LED) toggle for D2G via Python!

Here is a script written in Python that will allow the user to toggle the camera flash led on or off on the Droid 2 Global. I got the idea from a Google search and basically the script writes a "1" to a system file to enable the light or writes "0" to disable it.
import sys
import android
import os
droid = android.Android()
def cls():
os.system(['clear','cls'][os.name == 'nt'])
def turnon():
light = open('/sys/class/leds/torch-flash/flash_light', 'w')
light.write('1')
def turnoff():
light = open('/sys/class/leds/torch-flash/flash_light', 'w')
light.write('0')
#Initial Display Box
title = 'Flashlight Toggle'
message = 'By. Guitarman2010'
droid.dialogCreateAlert(title,message)
droid.dialogSetPositiveButtonText('Ok')
droid.dialogShow()
response = droid.dialogGetResponse().result
yep = response['which'] == 'positive'
#Turns it on
title = 'Flashlight Toggle'
droid.dialogCreateAlert(title)
droid.dialogSetPositiveButtonText('Shine')
droid.dialogShow()
response = droid.dialogGetResponse().result
light = response['which'] == 'positive'
if light:
turnon()
cls()
#Turns if off
title = 'Turn off'
droid.dialogCreateAlert(title)
droid.dialogSetPositiveButtonText('OFF')
droid.dialogShow()
response = droid.dialogGetResponse().result
dark = response['which'] == 'positive'
if dark:
turnoff()
cls()
Sorry for the indentation loss
Edit: I forgot to say I am running cm4d2g
Here is my make-shift video demonstrating this:
http://www.youtube.com/watch?v=Noq5ch8PIig

Question Windows 11 doesn't remember folder settings

Windows 11 how do I make all files and folders appear as General items and always sorted by date modified and detailed view?
I'm doing the usual ways through file options, but it doesn't work.
In all folders and for some reason it doesn't remember what settings I saved. Is there a way or reg file to make it sealed in the system and that can't be changed?
Chat gpt gave this yet to try ( didn't worked )
Spoiler: Windows Registry Editor Version 5.00
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell]
"FolderType"="NotSpecified"
[HKEY_CURRENT_USER/Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{5C4F28B5-F869-4E84-8E60-F11DB97C5CC7}
"LogicalViewMode"=dword:00000001
"Mode"=dword:00000004
"SortColumn"="prop:System.DateModified"
"SortOrder"="dword:00000001"
Also when win+e it opens home and there are a bunch of things and it slows down, there is a change button to open my computer but it also changes back
When I press saved shortcuts favorites on the left side of the Quick access toolbar, it finds the folder it is in and the view jumps down, and every time I have to scroll up again and again each time I press any favorite.
And when, for example, I need to select a file to upload somewhere, it also does not save the settings and every time hell need yi change the view manually
Please help to sort these problems
Thanks
chat gpt gave this script for PowerShell, not sure if it works
Spoiler: # Specify the view mode and sorting options $viewMode = 1
# Specify the view mode and sorting options
$viewMode = 1 # 1 for Details view
$sortColumn = "System.DateModified"
$sortOrder = 1 # 1 for ascending order, 0 for descending order
# Function to update the view settings for a folder
function UpdateFolderView($folderPath) {
# Path to the desktop.ini file
$desktopIniPath = Join-Path -Path $folderPath -ChildPath "desktop.ini"
# Check if the desktop.ini file exists
if (!(Test-Path -Path $desktopIniPath)) {
# Create the desktop.ini file
New-Item -Path $desktopIniPath -ItemType File | Out-Null
}
# Set the attributes of the desktop.ini file to be hidden and system
(Get-Item -Path $desktopIniPath).Attributes = 'Hidden', 'System'
# Update the content of the desktop.ini file
@"
[ViewState]
Mode=$viewMode
Vid=$sortColumn
Sort=$sortOrder
"@ | Out-File -FilePath $desktopIniPath -Encoding ASCII
}
# Specify the drive letters to target
$driveLetters = 'C', 'F'
# Loop through each drive
foreach ($driveLetter in $driveLetters) {
$drivePath = "$($driveLetter):\"
# Get all folders, including hidden ones, on the drive
$folders = Get-ChildItem -Path $drivePath -Directory -Recurse -Force -ErrorAction SilentlyContinue
# Loop through each folder and update the view settings
foreach ($folder in $folders) {
$folderPath = $folder.FullName
try {
UpdateFolderView -folderPath $folderPath
} catch [System.UnauthorizedAccessException] {
Write-Warning "Skipping folder: $folderPath. Access denied."
} catch {
Write-Warning "An error occurred while processing folder: $folderPath."
}
}
}
Best Windows 11 Folder Settings [Tips & Tricks]
If you wish to keep your PC folder organized, you must check out these Windows 11 folder settings tips and tricks.
windowsreport.com

Categories

Resources