Configuration Script and Home Basic performance

noumen arete

New member
Local time
2:59 PM
Messages
13
Hey guys this is my first post, I hope I can find the answers here, as this might be of general interest.

First the first, I have a desktop computer:
640 GB HDD
32 GB SSD
8800gt
4gb ram
Windows 7 x86 Ultimate
I clean installed windows to get rid of all preinstalled software, so I installed windows 7 ultimate, I realised that most (if not all) the advanced features were of no use for me. I checked wikipedia for the Windows editions, and the one best suited for me is HOME BASIC? Yes, I wanted the system to be as light as possible, now I know that by deleting the ei.cfg file I can install any version of windows, so the question is:

How much real wolrd improvement will there be by installing Home Basic instead of Ultimate?

The other question, it takes me years for me to completely configure windows once installed, things like these:

DISABLE
system restore
aero
windows update
all security and maintenance options
all that can be found in action center
user account control
windows firewall
language bar
etc

MODIFY
power options
taskbar options
add quicklaunch
performance settings
virtual memory location
and MAAAANY other things

Is there any way to make a script that I can run so these things are done automatically? I give maintenance to my friend's, family's computers, so sometimes I have 4 or 5 computers laying around, and configuring these settings is what takes most of the time. So double clicking a bat file would make my life easier.

Thanks in advance!;)
 

My Computer

Computer Manufacturer/Model Number
Custom Made
OS
Windows 7 x86 Home Basic*
CPU
AMD Phenom X4 9600
Motherboard
ASrock
Memory
4GB DDR2
Graphics Card(s)
8800GT
Sound Card
Integrated (Use SPDIF)
Monitor(s) Displays
22" KDS
Hard Drives
1x 32GiB SSD (OS)
2x 320GiB WD
PSU
500Watts
How much real wolrd improvement will there be by installing Home Basic instead of Ultimate?
Very, very little. Plus, you have to obtain a key for Windows 7 Home Basic...you cannot use your Ultimate key with it.

DISABLE
system restore
aero
windows update
all security and maintenance options
all that can be found in action center
user account control
windows firewall
language bar
etc
I would not disable system restore (just set to low %), I would not disable Windows updates. I would not turn of user access control or the Windows firewall. Seriously, test your tweaks with a stopwatch and I bet you will be surprised by how little a difference it actually makes.

What I would do if I were you, is get your machine installed, configured and set the way you want it. Then, use something like Macrium Reflect free edition and make an image of your hard drive. Then if you are in need of starting over, you can simply restore the image and you will be right back where you left off.
 

My Computer

Computer Manufacturer/Model Number
Self-Built in July 2009
OS
Windows 7 Ultimate x64
CPU
Intel Q9550 2.83Ghz OC'd to 3.40Ghz
Motherboard
Gigabyte GA-EP45-UD3R rev. 1.1, F12 BIOS
Memory
8GB G.Skill PI DDR2-800, 4-4-4-12 timings
Graphics Card(s)
EVGA 1280MB Nvidia GeForce GTX570
Sound Card
Realtek ALC899A 8 channel onboard audio
Monitor(s) Displays
23" Acer x233H
Screen Resolution
1920x1080
Hard Drives
Intel X25-M 80GB Gen 2 SSD
Western Digital 1TB Caviar Black, 32MB cache. WD1001FALS
PSU
Corsair 620HX modular
Case
Antec P182
Cooling
stock
Keyboard
ABS M1 Mechanical
Mouse
Logitech G9 Laser Mouse
Internet Speed
15/2 cable modem
Other Info
Windows and Linux enthusiast. Logitech G35 Headset.
You also do not want to turn off Aero. You can actually put a dent in performance that way.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Alienware Aurora ALX R4
OS
Windows 10 Pro (x64)
CPU
Intel Core i7-3930K (3.2GHz - 4.5GHz)
Motherboard
Alienware Aurora-R4 x79
Memory
4x Samsung 4GB PC3-12800 DDR3 (16GB 1600MHz)
Graphics Card(s)
Nvidia Geforce GTX 690
Sound Card
SteelSeries Siberia Elite
Monitor(s) Displays
Dell UltraSharp U3011
Screen Resolution
2560x1600
Hard Drives
Samsung 850 Pro 256 GB, Seagate 1TB Desktop Hybrid HDD, 2x Western Digital 4TB Green HDD
PSU
875W Some Dell PSU <.<
Case
Alienware Aurora ALX
Cooling
Custom Liquid Cooling (EK CPU & GPU blocks) dual EK 480RAD
Keyboard
Logitech G710+ Mechanical
Mouse
Logitech G700s
Internet Speed
Verizon Fios (50 mbps average)
Other Info
Server: Intel NUC D54250WYK: i5-4250U, 16GB, 256 GB mSATA, Windows Server 2012 R2
+1 on that - in Vista, the video data used to be stored both in system RAM and on the video card, but in Windows 7 it's all on the GPU and that perf bottleneck is gone. What people fail to realize when they disable Aero for perf in Win7 is that the GPU is much faster at rendering DirectX (which is what the Aero UI is using for almost 100% of it's display data) than your CPU is at rendering GDI (the old shell, which is what displays in classic). While classic is lighter and thus the CPU won't work as hard as if it was rendering Aero, Aero + DirectX on dedicated GPU hardware is fast enough that the difference should be imperceptable, thus you really don't gain anything with a decent video card in the system.

The only reason someone would want to use a classic or a non-Aero theme is if they like that better - do not do it for perf, as it will give you no tangible benefit under Windows 7.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom
OS
Windows 10 Pro x64
CPU
Intel Core i7 4790K @ 4.5GHz
Motherboard
Asus Maximus Hero VII
Memory
32GB DDR3
Graphics Card(s)
Nvidia GeForce GTX970
Sound Card
Realtek HD Audio
Screen Resolution
1920x1200
Hard Drives
1x Samsung 250GB SSD
4x WD RE 2TB (RAIDZ)
PSU
Corsair AX760i
Case
Fractal Design Define R4
Cooling
Noctua NH-D15
I would not disable system restore (just set to low %), I would not disable Windows updates. I would not turn of user access control or the Windows firewall. Seriously, test your tweaks with a stopwatch and I bet you will be surprised by how little a difference it actually makes.

What I would do if I were you, is get your machine installed, configured and set the way you want it. Then, use something like Macrium Reflect free edition and make an image of your hard drive. Then if you are in need of starting over, you can simply restore the image and you will be right back where you left off.

[/QUOTE]

I don't use system restore because all of my data is on another drive, the 32gb ssd is only for windows and program files. I turned off User access control because I know what i'm doing, and I have installed another firewall. These settings are not for performance gains, but rather because I don't need those feaures or are covered with other software.

And yes, I thought about making an image of an already configured windows installation, but not all systems I install are the same, so instead of configuring each one, I rather have predefined scripts that I can easily run and edit.

Thank you all guys sorry for taking that long, so basic is not an option, BTW I disabled Aero because I thought there would be some performance gain and because I don't like it, I instead use the theme that looks like aero but it is not translucid.
 

My Computer

Computer Manufacturer/Model Number
Custom Made
OS
Windows 7 x86 Home Basic*
CPU
AMD Phenom X4 9600
Motherboard
ASrock
Memory
4GB DDR2
Graphics Card(s)
8800GT
Sound Card
Integrated (Use SPDIF)
Monitor(s) Displays
22" KDS
Hard Drives
1x 32GiB SSD (OS)
2x 320GiB WD
PSU
500Watts
Yes, it can be scripted. You can use either batch scripting, visual basic scripting, or Power Shell to accomplish all those things. If you are really interested, let me know and I'll whip up an example, but the best thing to do is go to technet and read up on the commands and read up on scripting. But to be clear, you can script absolutely anything.

Second, there are solutions out there, N-Lite is an example, that allows you to make add your scripts to your Disk Image. They are automatically ran once the installation has finished. But anyhow what are you interested in knowing about scripting.

Unless they've changed it, the command to turn off services in Windows 7 will be SC. And so, for a quick example, in a batch file you would write something like this:

@echo off
:: Turning off various services
sc stop NameofSomeService
sc stop NotherNameofSomeService
sc stop AndAnother
sc start SomeOtherService
However, SC offers more options than that. And you can also configure it to set those settings permenantly.

sc config NameOfService start=disabled
Here is a print out of the SC command to check out. Note that you can get to this yourself by launching a command prompt and typing SC /?

Code:
  DESCRIPTION:
        SC is a command line program used for communicating with the
        NT Service Controller and services.
USAGE:
        sc <server> [command] [service name] <option1> <option2>...

        The option <server> has the form "\\ServerName"
        Further help on commands can be obtained by typing: "sc [command]"
        Commands:
          query-----------Queries the status for a service, or
                          enumerates the status for types of services.
          queryex---------Queries the extended status for a service, or
                          enumerates the status for types of services.
          start-----------Starts a service.
          pause-----------Sends a PAUSE control request to a service.
          interrogate-----Sends an INTERROGATE control request to a service.
          continue--------Sends a CONTINUE control request to a service.
          stop------------Sends a STOP request to a service.
          config----------Changes the configuration of a service (persistant).
          description-----Changes the description of a service.
          failure---------Changes the actions taken by a service upon failure.
          sidtype---------Changes the service SID type of a service.
          qc--------------Queries the configuration information for a service.
          qdescription----Queries the description for a service.
          qfailure--------Queries the actions taken by a service upon failure.
          qsidtype--------Queries the service SID type of a service.
          delete----------Deletes a service (from the registry).
          create----------Creates a service. (adds it to the registry).
          control---------Sends a control to a service.
          sdshow----------Displays a service's security descriptor.
          sdset-----------Sets a service's security descriptor.
          showsid---------Displays the service SID string corresponding to an ar
bitrary name.
          GetDisplayName--Gets the DisplayName for a service.
          GetKeyName------Gets the ServiceKeyName for a service.
          EnumDepend------Enumerates Service Dependencies.

        The following commands don't require a service name:
        sc <server> <command> <option>
          boot------------(ok | bad) Indicates whether the last boot should
                          be saved as the last-known-good boot configuration
          Lock------------Locks the Service Database
          QueryLock-------Queries the LockStatus for the SCManager Database
EXAMPLE:
        sc start MyService

QUERY and QUERYEX OPTIONS :
        If the query command is followed by a service name, the status
        for that service is returned.  Further options do not apply in
        this case.  If the query command is followed by nothing or one of
        the options listed below, the services are enumerated.
    type=    Type of services to enumerate (driver, service, all)
             (default = service)
    state=   State of services to enumerate (inactive, all)
             (default = active)
    bufsize= The size (in bytes) of the enumeration buffer
             (default = 4096)
    ri=      The resume index number at which to begin the enumeration
             (default = 0)
    group=   Service group to enumerate
             (default = all groups)
SYNTAX EXAMPLES
sc query                - Enumerates status for active services & drivers
sc query messenger      - Displays status for the messenger service
sc queryex messenger    - Displays extended status for the messenger service
sc query type= driver   - Enumerates only active drivers
sc query type= service  - Enumerates only Win32 services
sc query state= all     - Enumerates all services & drivers
sc query bufsize= 50    - Enumerates with a 50 byte buffer.
sc query ri= 14         - Enumerates with resume index = 14
sc queryex group= ""    - Enumerates active services not in a group
sc query type= service type= interact - Enumerates all interactive services
sc query type= driver group= NDIS     - Enumerates all NDIS drivers
You can find the name of the service by opening up the Services "Snap In" (type services.msc at search bar). Then right click on a service, choose properties, and under the Service Name at the top of the dialog, that is the name you must use in the script.

You can write the script in notepad and save it with the .bat or .cmd extension. Now if you really want to get wild with scripting, there is a lot you can do. You could catch errors that happen and perform various tasks based on the result of error messages. You can log results to a file. You can query the system for its hardware and software, and make decisions how to proceed based on what you find. You can honestly do pretty much anything you imagine.

But most people who script are doing it to meet some business need, or they are doing it to solve a problem for themselves. So the likely hood that you would find the perfect script to customize your environment is kind of low.
 

My Computer

OS
Windows 7
CPU
Quad Core
Memory
8GB
Hard Drives
1TB
Wait. Did you say you turned off UAC because you don't know what you are doing? If I read that correctly, turn it back on. I also noticed the "etc" in the original post. What does "ect" include? If it is things like Superfetch, then I'm willing to bet you turned off things that will increase performance. I know a lot of tweaking/optimizing guides say to turn it off, but after reading a post by eithe logic earth or pparks (i'm thinking logic earth) I decided to turn it back on. I noticed nothing at first but after two or three days, some serious improvement, especially at start-up, occurred.
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Toshiba P775-S7100
OS
Windows 7 Professional SP1 64-bit
CPU
Intel Core i5-2450M @2.5 GHz
Memory
6 GB DDR3 1333MHz
Graphics Card(s)
Intel HD 3000
Monitor(s) Displays
Built-in 17.3" LED; 22" Insignia NS-L22Q-10A
Screen Resolution
1600x900; 1360x768
Hard Drives
750 GB Hitachi
1TB Seagate FreeAgent External
Internet Speed
Verizon DSL Speed(Down/Up): 3360 Kbps / 800 Kbps
Antivirus
MSE and MBAM Pro
Browser
IE10
That is very helpful dranfu!! And pete7 haha I wrote "I KNOW" haha. So the things I'd like to add to the script are (which represent the "ETC")

DESKTOP
Show icons: Computer, documents, recycle bin.
Disable aero

TASKBAR:
Show all notifications and icons
Enable the old quicklaunch (not PIN TO...)

START MENU:
Show 8 programs
Show only DOCUMENTS, COMPUTER, CONTROL PANEL and RUN on the right side.

OTHER SETTINGS:
Disable system restore on all drives
Move page file from disk 1 to disk 2, or partition 2.
Disable some visual effects from system properties
Disable Allow remote assistance
Turn off user access control

CONTROL PANEL & ACTION CENTER
Disable ALL notifications (security, maintenance, etc)
Disable windows update
Edit some power config options

OTHER
Set D:\ (partition 2 or disk 2) as the default "documents" path

These are some of the things that I configure, because when I fix my aunt computer, I don't want her or their kids to be messing around with the computer settings, once she called to tell me that the antivirus updated . automatically.... So I want to keep it as simple as possible, of course settings depend on who the final user or users will be.

If these things can be added to the script, It would save me a lot of timee and make my life easier. I would appreciate if you could provide a link to read further information dranfu, because I searched and only found information on running scripts but only during windows installation.
 

My Computer

Computer Manufacturer/Model Number
Custom Made
OS
Windows 7 x86 Home Basic*
CPU
AMD Phenom X4 9600
Motherboard
ASrock
Memory
4GB DDR2
Graphics Card(s)
8800GT
Sound Card
Integrated (Use SPDIF)
Monitor(s) Displays
22" KDS
Hard Drives
1x 32GiB SSD (OS)
2x 320GiB WD
PSU
500Watts
Still, most of your changes will actually hurt performance, or cause other problems in the long run. For example, disabling updates and UAC leave you venerable to a lot of infections you would be immune to otherwise. A lot of virus makers study Windows updates to see what the fix and then unleash viruses meant to attack those vulnerabilities on unpatched systems. UAC can actually protect you from some malware as well. System restore can fix a large number of problems, such as those caused by bad installs/uninstalls, viruses, software changes, the list just goes on forever. As was mentioned before. If anything, disabling Aero will hurt performance more than anything. Also, it's best to adapt to changes. I don't expect MS to keep offering classic themes. What will you do when you have to use a set up more drastically changed than the one that is available now, and you don't have a classic option?
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Toshiba P775-S7100
OS
Windows 7 Professional SP1 64-bit
CPU
Intel Core i5-2450M @2.5 GHz
Memory
6 GB DDR3 1333MHz
Graphics Card(s)
Intel HD 3000
Monitor(s) Displays
Built-in 17.3" LED; 22" Insignia NS-L22Q-10A
Screen Resolution
1600x900; 1360x768
Hard Drives
750 GB Hitachi
1TB Seagate FreeAgent External
Internet Speed
Verizon DSL Speed(Down/Up): 3360 Kbps / 800 Kbps
Antivirus
MSE and MBAM Pro
Browser
IE10
Hi nevarezga,

I'm going to post an example script for you, and then let you tweak it to meet your needs. But I did want to second what Petey7 was saying, at least in terms of security. As far as performance and Aero are concerned, that's really up to you. There are different opinions on the matter, but I think a little experimentation is good, not only for experience but for the learning aspect.

However, disabling your windows updates is a bad idea. You will be vulnerable, and someone might launch an attack against you as a result. If you are using a third party firewall, that's cool, cause it will disable your windows firewall anyway. If you are thinking that you will gain a performance advantage by disabling all firewalls, then you really wont. Because it will take less than an hour than for some hacker to determine that you have no firewall protection, and to start going to work on you. Honestly, my rule of thumb in these situations are 1) If you find that you have to turn off security services to gain performance, then you need more memory but 2) If you find that you are disabling convenience or aesthetic features, then go ahead. It's your choice, but you should read up on it, because you may not always get better performance just because you are turning something off.

For an interesting read on this topic, however, check out this article by Microsoft Master Mark Russinovich Running Windows With No Services
 
Last edited:

My Computer

OS
Windows 7
CPU
Quad Core
Memory
8GB
Hard Drives
1TB
@nevarezga,

Are you wanting these scripts to be launched after a new install of Windows 7, or is the purpose to check settings and reset them to your custom values, on an os that has alreay been installed and is already in use?
 

My Computer

OS
Windows 7
CPU
Quad Core
Memory
8GB
Hard Drives
1TB
Both, because some new installs will "require" some but not all modifications, and the same for a system that is already in use. It depends mostly on the user.

About the security vulnerabilities, I actually use ESET SS, because I have a lot of control on what can or can't occur. And I think I didn't explain myself very well, I turn all notifications off to make things more simple for most people, I turn security features off because I believe software like ESET SS will provide enough protection for the regular user.

If you guys say some of these settings are better left untouched, I'll keep them turned on. I just like to get the most out of a system by turning off things that aren't really needed.
 

My Computer

Computer Manufacturer/Model Number
Custom Made
OS
Windows 7 x86 Home Basic*
CPU
AMD Phenom X4 9600
Motherboard
ASrock
Memory
4GB DDR2
Graphics Card(s)
8800GT
Sound Card
Integrated (Use SPDIF)
Monitor(s) Displays
22" KDS
Hard Drives
1x 32GiB SSD (OS)
2x 320GiB WD
PSU
500Watts
The thing is, Windows Updates are needed. Most users on the site use one realtime AV, one on-demand scanner, a firewall, image their computer regularly, install security updates as soon as they are available, and take other precautions to avoid infection. Still, some of us get viruses from time to time (hence the imaging), so, you can never be too safe. Unless you try to use two real-time AV's, which can cause all kinds of problems.
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Toshiba P775-S7100
OS
Windows 7 Professional SP1 64-bit
CPU
Intel Core i5-2450M @2.5 GHz
Memory
6 GB DDR3 1333MHz
Graphics Card(s)
Intel HD 3000
Monitor(s) Displays
Built-in 17.3" LED; 22" Insignia NS-L22Q-10A
Screen Resolution
1600x900; 1360x768
Hard Drives
750 GB Hitachi
1TB Seagate FreeAgent External
Internet Speed
Verizon DSL Speed(Down/Up): 3360 Kbps / 800 Kbps
Antivirus
MSE and MBAM Pro
Browser
IE10
Ok, I mean they are your systems, to a degree, and its really up to you. But you should check out this site here: Apni Tanhai Hacking! to get an idea of the kind of people, and the skill level these people have at coding, who are out to pawn your systems. Just having Eset really doesn't give you total protection.

Believe me, it is nothing for these guys to whip up some brand new code, that ESET has never seen, and release it on the world. It happens every single day. And the thing that they look for is errors in the way windows work. If you've never really examined something like that, you should check this out: Insecure Temp File Error in Wine DLL

This is an example of a system loading a file and insecurely creating a temporary file. It's insecure because the system is inadvertently dumping the contents of a protected file that stores your passwords in Windows. The funny thing is, we are tracking down a guy right now who uses this code in a 0-day malware outbreak that we saw at work.

Long story short is, when these sorts of errors are detected, Windows starts working on a fix, and when the fix is found, they patch it, and you are no longer vulnerable. But if you don't patch it, then someone is just going to load up MetaSploit (see here if you never heard of it ), scan your PC for known vulnerabilities and launch attacks at you.

In fact, and I say all this to encourage you to rethink your patching philosophy, do not put it past a reasonably smart hacker to search Google for phrases like "I don't patch" or "we didn't patch because." They might just find your post, and start trying to track you down and "footprint" you, to try some attacks.

So I encourage you to always patch your systems, that's how you lower your risk. I understand your point of view, I actually shared that POV some years ago, but time has shown me the light :p

Ok, let me finish up on your script tutorial now :thumbsup:
 
Last edited:

My Computer

OS
Windows 7
CPU
Quad Core
Memory
8GB
Hard Drives
1TB
I just wanted to add real quick, I don't recommend setting updates to automatic. I always set it for "Tell me when new updates are available, but do not download or install anything" or something to that degree. Sometimes non-security related updates cause problems, so you want to know what is being installed first.
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Toshiba P775-S7100
OS
Windows 7 Professional SP1 64-bit
CPU
Intel Core i5-2450M @2.5 GHz
Memory
6 GB DDR3 1333MHz
Graphics Card(s)
Intel HD 3000
Monitor(s) Displays
Built-in 17.3" LED; 22" Insignia NS-L22Q-10A
Screen Resolution
1600x900; 1360x768
Hard Drives
750 GB Hitachi
1TB Seagate FreeAgent External
Internet Speed
Verizon DSL Speed(Down/Up): 3360 Kbps / 800 Kbps
Antivirus
MSE and MBAM Pro
Browser
IE10
Yes, all those things can be automated. And I'm feeling extra techy today, so I'm going to go ahead and write this script with you and share some scripting love. The first thing you should know, if you don't already know it, is that a script is nothing but a bunch of command line commands saved with the .bat extension. However, to be effective, you do need to read the commands and learn them.
A complete list of XP commands, most if not all are still available in Win7 Microsoft Corporation Command Line Commands
A complete list of Windows 7 commands: Windows 7 Commands
Also, please note that the script you want to write is fairly complex, so I'm not going to write it for you. But I will assist you with it and will answer each question or problem, if you really want to put in the work.

I'll address each item you've listed in turn, but let's cover some foundational stuff first.

Since you already know that for your script to run you need to save it with the .bat extension, here are some other things to know.

1) For any command, type the command name and /? to get more info about it. Example IF /? is going to print out a big help file on how to use the if command.

2) User either REM (with at least one space character after that word) at the beginning of a line, or use the double colon :: at the beginning of a line to mark a line as a comment. A comment is simply like a note to yourself. It won't be parsed by the command interpreter and won't be executed when the script runs. It's just a way for you to organize your content, or remind yourself what a certain section of code is doing.

Code:
:: Navigate to the System32 drive, list all files and print files that start with vtt
cd "C:\Windows\System32
Dir /B /S C:\vtt*
:: This code features the [B]DIR[/B] command which tells Windows to list all the files in
:: The current directory. It also features the [B]CD [/B]command, which is how you 
:: [B]C[/B]hange [B]D[/B]irectories
:: The [B]/B [/B]and [B]/S[/B] are called switches, also known as options, and they allow you
:: to perform other actions with the command. The [B]/B [/B]switch tells windows to print 
:: the full path of the file, not just the name of the file. The [B]/S [/B]switch tells windows 
:: to also search inside any folders it finds within the System32 folder.
2) You should download NotePad++. This is like notepad on steroids, and it will automatically color code your batch file commands for you. For instance, it will place comments in green, labels in in RED, etc. This make it a lot easier to spot a mistake.
It also has a billion other useful commands when working with text of any kind.

3) When you are writing out a path with spaces in it, such as C:\Windows\All My Files, you need to remember to wrap that Path name in quotes, otherwise windows will tell you that it can't find the folder.

Code:
:: Proper way to write path 
"C:\Windows\Sysmtem32\What A Lot Of Spaces In A Folder\Hereismyfile.txt"
::Bad way to write path
C:\Windows\Sysmtem32\What A Lot Of Spaces In A Folder\Hereismyfile.txt
Disclaimer: I've been writing scripts and working with windows for a long time, but I just migrated to windows 7, and so I'm still catching up on some of the changes. Keep in mind that I may refer to a path like My Documents, which I know is now just called Documents in Windows 7, but old habits are hard to break.

Ok, so let's start to look at your requirements and how we can accomplish them in a batch script.

1) Desktop Items

There are really two things to note when it comes to configuring the desktop.

1. Use vLite, which is the Vista / Windows 7 version of nLite to configure your environment. nLite /vLite software will let you set up everything you want about your system, including what items you want on the desktop, what services you want to uninstall, what updates, service packs, or hotfixes you want to include, etc. When you're done you can burn an unattended install DVD or CD-ROM and have a ready to go image for deployment. You can also add scripts to be ran after the install, and it will sign you into whatever account and run the scripts for you.

What they don't do, sadly, is let you simply place certain shortcuts on the desktop. But they do let you run scripts. So, long story short, what you want to do write a script to either detect if a shortcut exist, and if not place it on the desktop.

Note that when you copy your shortcuts to the vLite folder of your choice, you want to use environment variable paths, and not explicit path names. In other words, I can use the environment variable for a user's directory like this %USERPROFILE% and that refers to the PATH C:\Users\{username}. So I don't need to know the name of the user, I just need to use the variable called %USERPROFILE% with a \Desktop to reach their desktop. Code example below:

Code:
:: Creating a shortcut on the user's desktop, only if it is not there already. 
CD "%USERPROFILE%\Desktop"
IF Exist Shortcut1.lnk ( echo The file Shortcut 1 already exist ) Else ( xcopy "E:\I386\CustomFiles\Shortcuts\Shortcut1.lnk" "%USERPROFILE%\Desktop\Shortcut1.lnk )
::Creating shortcut 2
CD "%USERPROFILE%\Desktop"
IF Exist Shortcut2.lnk ( echo The file Shortcut 2 already exist ) Else (  xcopy "E:\I386\CustomFiles\Shortcuts\Shortcut1.lnk"  "%USERPROFILE%\Desktop\Shortcut1.lnk )
::The [B]IF [/B]and [I]optional [B]Else [/B][/I]command is used to test if a condition is true or not. It can also compare ::the relationship between something, as in one number be greater or less than 
::another. It has a lot of functions, so definitely read up on it.
:The [B]echo [/B]command is used to print strings (or text) to the standard output
::And the standard output in this case is the command line window.
::The [B]xcopy [/B]command is used to copy files from a source to a destination
::The basic format of the command is [B]xcopy [/B]source destination 
::Where the source is the path of the file/ directory you are copying and the
::Destination is where you are copying it to.
Configuring the task bar and notifications can be done through vLite and disabling Aero can also. If you want to configure services, you need to use the SC command, which stands for Service Controller.

START MENU:
Show 8 programs
Show only DOCUMENTS, COMPUTER, CONTROL PANEL and RUN on the right side.


All of that can be done in vLite.

In scripting, things always come down to three ways of changing settings. Either you need to run some commands, Edit the registry, or copy a custom file to a certain folder. Now, I don't have enough energy to list where all these things in the registry would be, but I'll provide one example and then afterward you just need to start Googling for things like "Where are the task bar settings located in the registry?"

Windows 7 Task Bar Settings In Registry: Have a look at this article here

Now, I know some people are worried about editing the registry. You don't strike me as that type, but if you are, then you might as well stop reading right now. But if you want to really learn Windows, and how to automate everything, then you'll need to become familiar and comfortable with it. But you'll love the fact that you did.

It is important to do a backup of your registry, but you don't need to backup the whole thing. Each time you edit a key (any folder) just right click it and do a backup, if something goes wrong (which it almost never does) then do an import and it will overwrite whatever you did.

Ok, so there is a command line tool for editing the registry. It's called Reg. Some example commands would be: To query for the existence of a key REG QUERY "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer"

or to add a key to the registry

REG ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer

There are many switches that you can use with the REG command, so definitely read the article first.

The thing about the reg command, and others like it, is that to really be effective, you need to be able to parse (look through) the output of a command and then do something with that data. If you run ipconfig in the command line, for instance, you will get your IP address, but you would get a bunch of other data too.

If you needed to write a script that used ipconfig to get the user's IP address only, how would you do that? You'd have to parse through that output, find the ip address, and place it a container of sorts. And you can do all this with the command line.

Getting back to the REG command for a moment, If you run the reg query command above, the command line would spit out something like this

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
NoDriveTypeAutoRun REG_DWORD 0x91
NoViewContextMenu REG_DWORD 0x0
NoSetTaskbar REG_DWORD 0x0
NoSaveSettings REG_DWORD 0x0

Just like with ipconfig, we need to be able to grab just one piece of data, in this case a particular key, like the NoViewContextMenu item, and determine if it is set to 0x0 or 0x1. Now how could you do that? You'd have to use the FOR command.

It's not hard to use, but it does require that you read about it carefully.

I suggest you read up on it, and then respond to this thread with questions, and I'll get you up to speed on it. Once you know the REG command and once you know how to use the FOR command to find any value within the registry (or within anything else for that matter) , you can go crazy editing the hell out of windows, and custom scripting basically whatever you want. But again, vLite is going to take a lot of that work and do it for you, so if the option is in vLite, I would just do it there.

OTHER SETTINGS:
Disable system restore on all drives
Move page file from disk 1 to disk 2, or partition 2.
Disable some visual effects from system properties
Disable Allow remote assistance
Turn off user access control


Again, all through vLite, and some through the registry. Pagefileconfig is a command line tool, so you don't need to edit the registry.

CONTROL PANEL & ACTION CENTER
Disable ALL notifications (security, maintenance, etc)
Disable windows update
Edit some power config options


Notifications and Windows Update are definately in vLite. Power Config actually has to be done in the registry.

OTHER
Set D:\ (partition 2 or disk 2) as the default "documents" path


You can use the SET command to explicitly declare the default documents path for any environment variable, including the documents path.

Okay, so at this point, its all up to you. You should start working on a script, and whenever you get stuck or have a question, just update this thread with your question and I'll answer it for you. If were lucky then some other scripters might join in and increase both our knowledge :D
 
Last edited:

My Computer

OS
Windows 7
CPU
Quad Core
Memory
8GB
Hard Drives
1TB
Wow dranfu that's a lot of information, I read all the links and found them very interesting, but as you said, there might be other ways to do it more easily, for example I realized that many of Windows settings contained in the registry didn't contain the users name, so they could be exported as reg files and imported in a different machine.

So I tried it, I made a new user account (which has loaded the default settings) then I added the other account's reg files and it kind of worked, while most taskbar options worked, not all visual effects did, it is just a matter of investigating where are all settings stored.

With the information you provided, I believe I'm not yet ready to mess with some kind of scripts, but I'll give those regarding killing and disabling services a try. For the moment, that, and comparing registry files (modified vs modified) to find out where the settings are stored, is what will keep me busy some time.

Thanks agan for the info dranfu.

Petey, sure that's the main reason I don't like windows update, besause it installs things other than really critical fixes, anyway, I'll set it to download, install later.

I'll keep you informed
 

My Computer

Computer Manufacturer/Model Number
Custom Made
OS
Windows 7 x86 Home Basic*
CPU
AMD Phenom X4 9600
Motherboard
ASrock
Memory
4GB DDR2
Graphics Card(s)
8800GT
Sound Card
Integrated (Use SPDIF)
Monitor(s) Displays
22" KDS
Hard Drives
1x 32GiB SSD (OS)
2x 320GiB WD
PSU
500Watts
I believe I'm not yet ready to mess with some kind of scripts, but I'll give those regarding killing and disabling services a try

Once you pop, you can't stop. Enjoy your journey ;)
 

My Computer

OS
Windows 7
CPU
Quad Core
Memory
8GB
Hard Drives
1TB
Back
Top