Jump to content

Windows 7 - Launch Bat after installation (SetupComplete?)


ieuagn321980hr

Recommended Posts

Hello guys!
I'm wondering about a script I made after the installation of my Windows 7 x64 ISO is done. The script (bat) contains this:


@echo off


cd C:\Users\
RD /S /Q "C:\Users\Public\"

cd C:\Users\Unknown\
ATTRIB +H "C:\Users\Unknown\Desktop"
RD /S /Q "C:\Users\Unknown\Searches"
RD /S /Q "C:\Users\Unknown\Saved Games"
RD /S /Q "C:\Users\Unknown\Videos"
RD /S /Q "C:\Users\Unknown\Links"
RD /S /Q "C:\Users\Unknown\Favorites"
RD /S /Q "C:\Users\Unknown\Contacts"

cd C:\
RD /S /Q "C:\PerfLogs\"
RD /S /Q "C:\Program Files\Uninstall Information"
RD /S /Q "C:\Program Files\Windows Media Player"
ATTRIB +H "C:\Program Files\Common Files" /S /D
ATTRIB +H "C:\Program Files\DVD Maker" /S /D
ATTRIB +H "C:\Program Files\Internet Explorer" /S /D
ATTRIB +H "C:\Program Files\MSBuild" /S /D
ATTRIB +H "C:\Program Files\Reference Assemblies" /S /D
ATTRIB +H "C:\Program Files\Windows Defender" /S /D
ATTRIB +H "C:\Program Files\Windows Mail" /S /D
ATTRIB +H "C:\Program Files\Windows NT" /S /D
ATTRIB +H "C:\Program Files\Windows Photo Viewer" /S /D

cd C:\Program Files (x86)\
RD /S /Q "C:\Program Files (x86)\Uninstall Information"
ATTRIB +H "C:\Program Files (x86)\Common Files" /S /D
ATTRIB +H "C:\Program Files (x86)\Internet Explorer" /S /D
ATTRIB +H "C:\Program Files (x86)\MSBuild" /S /D
ATTRIB +H "C:\Program Files (x86)\Reference Assemblies" /S /D
ATTRIB +H "C:\Program Files (x86)\Windows Defender" /S /D
ATTRIB +H "C:\Program Files (x86)\Windows Mail" /S /D
ATTRIB +H "C:\Program Files (x86)\Windows NT" /S /D
ATTRIB +H "C:\Program Files (x86)\Windows Photo Viewer" /S /D




cd C:\ProgramData\Microsoft\Windows\Start Menu\
RD /S /Q "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup"
RD /S /Q "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Maintenance"
RD /S /Q "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Games"
RD /S /Q "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\Windows PowerShell"
RD /S /Q "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\System Tools"
RD /S /Q "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\Accessibility"
DEL /F /S /Q /A "C:\ProgramData\Microsoft\Windows\Start Menu\Default Programs.lnk"
DEL /F /S /Q /A "C:\ProgramData\Microsoft\Windows\Start Menu\Windows Update.lnk"
DEL /F /S /Q /A "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\Sync Center.lnk"
DEL /F /S /Q /A "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\Sound Recorder.lnk"
DEL /F /S /Q /A "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\Remote Desktop Connection.lnk"
DEL /F /S /Q /A "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\Paint.lnk"
DEL /F /S /Q /A "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\displayswitch.lnk"
DEL /F /S /Q /A "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\Calculator.lnk"
DEL /F /S /Q /A "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\Welcome Center.lnk"

cd C:\Users\Unknown\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\
RD /S /Q "C:\Users\Unknown\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\"
RD /S /Q "C:\Users\Unknown\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Maintenance\"
RD /S /Q "C:\Users\Unknown\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Administrative Tools\"
RD /S /Q "C:\Users\Unknown\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Accessories\Accessibility"
RD /S /Q "C:\Users\Unknown\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Accessories\System Tools"
DEL /F /S /Q /A "C:\Users\Unknown\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Accessories\Windows Explorer.lnk"
DEL /F /S /Q /A "C:\Users\Unknown\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Accessories\Run.lnk"
DEL /F /S /Q /A "C:\Users\Unknown\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Accessories\Command Prompt.lnk"

C:\Windows\
RD /S /Q "C:\Windows\Downloaded Program Files"
RD /S /Q "C:\Windows\LiveKernelReports"
RD /S /Q "C:\Windows\Logs"
RD /S /Q "C:\Windows\ModemLogs"
RD /S /Q "C:\Windows\Offline Web Pages"
RD /S /Q "C:\Windows\Temp"
RD /S /Q "C:\Windows\WinToolkit"





cd C:\ProgramData\Microsoft\User Account Pictures\
REN "C:\ProgramData\Microsoft\User Account Pictures\user.bmp" "user.x"
REN "C:\ProgramData\Microsoft\User Account Pictures\guest.bmp" "guest.x"






How should I implant this script after the Win7 installation is done. Tried with SetupComplete (see spolier):


\sources\$OEM$\$$\Setup\Scripts




@ECHO OFF
%~dp0"Windows Loader.exe" /silent /preactivate
cd %~dp0
attrib -R -A -S -H *.*
SHUTDOWN /R /T 5
RMDIR /S /Q "%WINDIR%\Setup\Scripts"

@echo off
cd C:\Users\
RD /S /Q "C:\Users\Public\"

cd C:\Users\Unknown\
ATTRIB +H "C:\Users\Unknown\Desktop"
RD /S /Q "C:\Users\Unknown\Searches"
RD /S /Q "C:\Users\Unknown\Saved Games"
RD /S /Q "C:\Users\Unknown\Videos"
RD /S /Q "C:\Users\Unknown\Links"
RD /S /Q "C:\Users\Unknown\Favorites"
RD /S /Q "C:\Users\Unknown\Contacts"

cd C:\
RD /S /Q "C:\PerfLogs\"
RD /S /Q "C:\Program Files\Uninstall Information"
RD /S /Q "C:\Program Files\Windows Media Player"
ATTRIB +H "C:\Program Files\Common Files" /S /D
ATTRIB +H "C:\Program Files\DVD Maker" /S /D
ATTRIB +H "C:\Program Files\Internet Explorer" /S /D
ATTRIB +H "C:\Program Files\MSBuild" /S /D
ATTRIB +H "C:\Program Files\Reference Assemblies" /S /D
ATTRIB +H "C:\Program Files\Windows Defender" /S /D
ATTRIB +H "C:\Program Files\Windows Mail" /S /D
ATTRIB +H "C:\Program Files\Windows NT" /S /D
ATTRIB +H "C:\Program Files\Windows Photo Viewer" /S /D

cd C:\Program Files (x86)\
RD /S /Q "C:\Program Files (x86)\Uninstall Information"
ATTRIB +H "C:\Program Files (x86)\Common Files" /S /D
ATTRIB +H "C:\Program Files (x86)\Internet Explorer" /S /D
ATTRIB +H "C:\Program Files (x86)\MSBuild" /S /D
ATTRIB +H "C:\Program Files (x86)\Reference Assemblies" /S /D
ATTRIB +H "C:\Program Files (x86)\Windows Defender" /S /D
ATTRIB +H "C:\Program Files (x86)\Windows Mail" /S /D
ATTRIB +H "C:\Program Files (x86)\Windows NT" /S /D
ATTRIB +H "C:\Program Files (x86)\Windows Photo Viewer" /S /D




cd C:\ProgramData\Microsoft\Windows\Start Menu\
RD /S /Q "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup"
RD /S /Q "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Maintenance"
RD /S /Q "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Games"
RD /S /Q "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\Windows PowerShell"
RD /S /Q "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\System Tools"
RD /S /Q "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\Accessibility"
DEL /F /S /Q /A "C:\ProgramData\Microsoft\Windows\Start Menu\Default Programs.lnk"
DEL /F /S /Q /A "C:\ProgramData\Microsoft\Windows\Start Menu\Windows Update.lnk"
DEL /F /S /Q /A "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\Sync Center.lnk"
DEL /F /S /Q /A "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\Sound Recorder.lnk"
DEL /F /S /Q /A "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\Remote Desktop Connection.lnk"
DEL /F /S /Q /A "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\Paint.lnk"
DEL /F /S /Q /A "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\displayswitch.lnk"
DEL /F /S /Q /A "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\Calculator.lnk"
DEL /F /S /Q /A "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\Welcome Center.lnk"

cd C:\Users\Unknown\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\
RD /S /Q "C:\Users\Unknown\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\"
RD /S /Q "C:\Users\Unknown\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Maintenance\"
RD /S /Q "C:\Users\Unknown\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Administrative Tools\"
RD /S /Q "C:\Users\Unknown\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Accessories\Accessibility"
RD /S /Q "C:\Users\Unknown\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Accessories\System Tools"
DEL /F /S /Q /A "C:\Users\Unknown\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Accessories\Windows Explorer.lnk"
DEL /F /S /Q /A "C:\Users\Unknown\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Accessories\Run.lnk"
DEL /F /S /Q /A "C:\Users\Unknown\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Accessories\Command Prompt.lnk"

C:\Windows\
RD /S /Q "C:\Windows\Downloaded Program Files"
RD /S /Q "C:\Windows\LiveKernelReports"
RD /S /Q "C:\Windows\Logs"
RD /S /Q "C:\Windows\ModemLogs"
RD /S /Q "C:\Windows\Offline Web Pages"
RD /S /Q "C:\Windows\Temp"
RD /S /Q "C:\Windows\WinToolkit"


cd C:\ProgramData\Microsoft\User Account Pictures\
REN "C:\ProgramData\Microsoft\User Account Pictures\user.bmp" "user.x"
REN "C:\ProgramData\Microsoft\User Account Pictures\guest.bmp" "guest.x"





Problem is, I cant use GPO either because I do prefer Home Premium. Many thanks guys and love yaaaa <3

Link to comment
Share on other sites

Windows loader is warez and illegal you'll find no help here.

 

I'm not asking for Warez help either, I have a program called Windows Loader in SetupComplete correct!

 

 

All due I do not want help with Warez nor anything else just to launch a .bat to remove folders/hide and hide the user folder picture. May I ask you if you do know know about every new user who make a thread if they have a real Win7 with activation key? No, you do not so don't judge me...

Link to comment
Share on other sites

Windows loader is a illegal program and your open admission of using it is grounds for being banned. You were given a verbal warning instead of being immediately banned. We have a very strong stance against warez, activators, loaders and cracks. It doesn't matter if you have a legal key or not. Using a loader perpetuates the problem of illegal software practices.

Clarification of why windows loader is illegal;

It comes distributed with a couple of dozen windows keys and primary purpose is bypassing microsoft activation requirements.

P.S. I'm not judging you as a person. You could very well be a nice guy. However I have a job to do here protecting the forum. We cannot be viewed as a forum that condones illegal practices. That would get us shut down.

Link to comment
Share on other sites

We do not go around requiring any user to prove they have a legitimate ISO and key.  Rather we assume everything is kosher and we try to give any user and question the benefit of the doubt.  However, if the user posts an image, code list, or question that proves things are not right then we have no choice but to withhold any further help.

 

Cheers and Regards

Link to comment
Share on other sites

  • 4 weeks later...

I am a bit new to windows, being a  UNIX SA and all.. Please be gentle.. I have a very similar question, but no loader ...

 

I <think> I have to do several reboots for my Windows 7 build.  after installl,ing the runtimes, after installing drivers that I have been unable to install via dism, after Office, and a couple of other that elude me right now.

 

I don't think that I can have a reboot in my batch file and have it continue on when the system comes back up

 

The only way that I can think of doing this is via runonce... and changing it on the fly.

 

Is there an easier way too do this?

 

Thank you all in advance !

 

Oh and if anyone knows why my attempts to make a "live" version of windowss7 bluescreens no matter what I do at disk.sys.

 

I have a 1TB ssd and this is one of the drivers I have not been able to integrate via dism.

Googling this makes me think that the SSD is not the problem..

 

My first post, so rip away ;).

 

michael

 

 

Link to comment
Share on other sites

  • 1 month later...
don't see how your question is anything like the one who started the thread. but for your question:

 

all this CAN be achieved with some simple batching. the softwares you describe does not NEED to restart the computer before continuing with the next install.

try finding silent installs and no reboot switches for your installers. if there is no such options, look into autohotkey to automate it for you.

 

i use a 7 part batch that is executed after first login and does all this. at the end of each batch a new batch is typed to the startup folder and then the computer is restarted.

the batches in startup folder self deletes right after the shutdown command so that there is only one batch there at the time.

 

piece of cake. you can do it

Edited by Profess0r1011000
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...