-
(Note: I'm using Win10XPE.exe 82.0.0.15 with Win 10 Pro v10.0.19041.508 x64 source on my Win 7 x64 host machine)
I've been re-configuring my build so that it has the apps I want / need and eliminates those I don't want. In addition i've added, renamed and / or removed Start Menu folders so that it makes more sense to me. In figuring out how to do this I read the Readme in \Custom\x64\AdditionalFiles\Program Files which suggested adding files there and then, as it said: "To create them (shortcuts), you can add LINK %Desktop%\xxx|%Programs%\xxx in pecmd.ini" . I found that that didn't work for me as, i'm guessing, my path in my shortcuts wasn't correct but then I don't know what the correct path should be as I don't know what goes on "behind the curtain" when the ISO is built. So the 1st thing I tried was to put my new, fully portable app directly in the H:\...\W10XPE\ISO_x64\Programs\ folder with all the other existing apps and then my shortcuts like: LINK %Programs%\System Tools\Speccy,Y:\Programs\Speccy\Speccy64.exe worked because the path worked.
But I also discovered that there are actually (5), count 'em, 5 different versions of pecmd.ini ! Two of them are x86 so I ignored those and started examining the other 3:
The one in W10XPE\Custom\Pecmdini\ has mostly Win utilities in it
The one in W10XPE\Target_x64\Windows\System32\ has mostly 3rd party apps in it and
The one in W10XPE\Projects\Include\x64\AdditionalFiles\Windows\System32\ has a mix of both
All 3 files are different. I think, but am not 100% sure, that all 3 are used during the build process. In any event I found that modifying these files gave me more control over what showed up or didn't show in the Programs Menu or on the Desktop / Taskbar. This may not be the recommended way to built with this program and it was a lot of tedious work but it got me 98% of what i'm shooting for.
(Now my question ;-) I have 2 folders under Programs in the Start Menu that I can't get rid of: Accessibility > Narrator and Startup which is empty. How can I remove these 2 folders?
-
I use this in pecmd.ini
EXEC !%WinDir%\System32\attrib.exe +s +h "X:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup"
EXEC !%WinDir%\System32\attrib.exe +s +h "X:\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
EXEC !%WinDir%\System32\attrib.exe +s +h "X:\ProgramData\Microsoft\Windows\Start Menu\Programs\Administrative Tools"
EXEC !%WinDir%\System32\attrib.exe +s +h "X:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows Administrative Tools"
EXEC !%WinDir%\System32\attrib.exe +s +h "X:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
EXEC !%WinDir%\System32\attrib.exe +s +h "X:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Accessories"
EXEC !%WinDir%\System32\attrib.exe +s +h "X:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Accessibility"
EXEC !%WinDir%\System32\attrib.exe +s +h "X:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Administrative Tools"
EXEC !%WinDir%\System32\attrib.exe +s +h "X:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Windows Administrative Tools"
-
@Bigbadmoshe:
Thank You !!!
-
@Bigbadmoshe: Ok, per your advice, I did two things:
(1) I searched through the entire Win10_PEX\ folder structure for any files or folders that called out either Accessibility or Startup. I found several and either deleted them or "remmed" them out.
(2) Then, using your example I added these to \W10XPE\Custom\Pecmdini\pecmd.ini:
EXEC !%WinDir%\System32\attrib.exe +s +h "X:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup"
EXEC !%WinDir%\System32\attrib.exe +s +h "X:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessibility"
EXEC !%WinDir%\System32\attrib.exe +s +h "X:\Users\Admin\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Accessibility"
EXEC !%WinDir%\System32\attrib.exe +s +h "X:\Users\Admin\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
EXEC !%WinDir%\System32\attrib.exe +s +h "X:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Accessibility"
EXEC !%WinDir%\System32\attrib.exe +s +h "X:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
EXEC !%WinDir%\System32\attrib.exe +s +h "X:\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Accessibility"
EXEC !%WinDir%\System32\attrib.exe +s +h "X:\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
(my administrator act is renamed Admin but I used both names for "insurance")
After building the ISO and booting up the Accessibility folder was (finally) gone but the unkillable Startup folder was still there. I think i'm ready to call it "good enough" and move on to more important things.
-
Hi,
Please correct me if I'm mistaken but with attrib method you just make these folders hidden, so they become invisible. But they are still there.
Once I tried to remove these unneccessary folders and programs but I failed. If anyone find a way, I would be glad.
-
pecmd IFEX "X:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup",FILE "X:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup"
pecmd IFEX "X:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup",FILE "X:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
"Remove the pecmd if you put this in pecmd.ini"
Regards
RoyM
-
@RoyM: Thank you
Unfortunately that didn't (completely ?) work. I copied & pasted your code to: W10XPE\Custom\Pecmdini\pecmd.ini but when I boot up into PE in my Admin act Startup is still there. BUT if I don't accept Admin at bootup and accept a regular account then the Startup folder is gone! Does that give you any clues?
-
Start the XPE, start .cmd and run:
dir /s x:\users\*startup /A H
Whatever the .cmd returns, use that.
Regards
RoyM
-
@RoyM: Thanks for that tip!
That gave me 2 paths so I added this:
// Get rid of Programs/Startup folder
IFEX "X:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup",FILE "X:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup"
IFEX "X:\Users\Admin\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup",FILE "X:\Users\Admin\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
IFEX "X:\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup",FILE "X:\Users\Admin\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
to this file: \W10XPE\Custom\Pecmdini\pecmd.ini
But that Startup folder is one tough hombre - it's still there - thumbing it's nose at me.
-
You cannot delete either of the two Startup groups, the settings for both must exist, and the paths for both must exist.
-
Hey Malok, Great to hear from 'ya.
Please 'do tell', some more specifics about Startup groups.
I am going to assume it has something to do with the DEFAULT folder.
Regards
RoyM
-
Always lurking around...
Not much to tell except that these emplacements: Startup, Desktop and a few others have a special relation between Accounts and they cant be removed, Tho I found a way to move and hide them, they still cant be removed and will be automatically created upon bootup if not existing and if existing everything located in them will run automatically...
Edit: I remember in Bart PE i used to hack the location of those to enable an interactive desktop that would "Remember" newly added icon to desktop upon reboot... I think the relation is between the user account and the "all users" account