Windows XP and Windows Server 2000 / 2003 have a built-in utility called the System stand-alone Optional Component Manager (sysocmgr.exe) to programmatically add or remove Windows components. Running sysocmgr.exe with no parameters will display the usage. The most basic command line is:
%windir%\system32\sysocmgr.exe /i:%windir%\inf\sysoc.inf This parameter (/i:) is always required and specifies the location of the master inf (%windir%\inf\sysoc.inf). When run it simply displays the Windows Components Wizard. Therefore the above command can be used as a shortcut directly to the Windows Components Wizard.
The real power of sysocmgr is in unattended mode. Additional parameters control the user interface, handle restarting, and control which components are added or removed by way of a standard Windows unattended answer file. Sysocmgr only looks in the [Components] and [NetOptionalComponents] sections, so the answer file can be specifically for component management or reused from a Windows unattended installation. Some components have their own unattended answer file sections, which are also parsed.
The following example uses an answer file (/u:) named ocm.txt in the temporary directory (%temp%\ocm.txt), suppresses any necessary restart (/r), and displays no user interface (/q):
%windir%\system32\sysocmgr.exe /i:%windir%\inf\sysoc.inf /u:%temp%\ocm.txt /r /q
The following example answer file adds the Simple Network Management Protocol (SNMP) service and configures the agent settings:
SNMP = 1
Contact_Name = Michael Khanin
Location = Canada
Service = Physical, Applications, End-to-End
Community_Name = Public
Traps = server1.thesystemadministrator.com, server2.thesystemadministrator.com
Send_Authentication = Yes
Accept_CommunityName = Public:Read_Only
Any_Host = No
Limit_Host = server1.thesystemadministrator.com, server2.thesystemadministrator.com
runas /user:admin “%windir%\system32\sysocmgr.exe /i:%windir%\inf\sysoc.inf”
“Installation Sources”= … (REG_MULTI_SZ value)
Recently, I needed to find a free solution to creating a PDF file by using virtual network printer. The idea was send the job to the pdf virtual pdf-printer, then the user is prompted to ‘save as’, they select a location and the pdf is created.
After googleng and testing the solution was done.
I’ve used Bullzip to print pdf as a shared network printer. By doing few changes to the global. ini, Bullzip are then able to output pdf without any dialogue.
Here is a changes in the global.ini:
If for any reason, you need to know how many users are logged on to a server, It’s easy to check, at the server’s console (CMD.EXE) execute the following command:
NET SESSION | FIND /C “\\”
Windows 2000 or Windows XP can be configured to run a startup script that is a batch file, VB script or JScript by using Group Policies. As well we can use AutoExnt utility, from the Resource Kit.
The AutoExNT service permits an administrator to configure a Windows based computer to run a custom batch file when first starting the computer. Also, a user or administrator is not required to be logged on at the time this custom batch file runs.
To start using AutoExNTdo the following steps:
Installing the AutoExNT Service
You should then receive the following message:
CreateService AutoExNT SUCCESS with InterActive Flag turned OFF
To view the installation processes running on the desktop, you must install the AutoExNT service using the /interactive switch. For example, instead of typing instexnt install, you would type instexnt install /interactive at a command prompt, and then press ENTER.
Testing the AutoExNT Service
To test the AutoExNT service, log on to your computer with an account that has administrator credentials, type net start autoexnt at a command prompt, and then press ENTER. The Autoexnt.bat file should run in an MS-DOS window.
NOTE: The AutoExNT service includes a /interactive switch, analogous to the /interactive switch of the AT command. This switch permits you to view the status of processes as they run. Because no user environment variables have yet been declared when AutoExNT runs at system startup, you must use full path names.
Also, if you need a service to be running before you start running a dependent process, you may include a command to start this service at the beginning of your Autoexnt.bat file. For example, if your batch file has commands that require the Server service to be running, include a net start server command at the beginning of your Autoexnt.bat file.
Configuring the AutoExNT Service to Run at Startup
To configure the AutoExNT service to run at startup:
Video by Mike Nash
Windows Server 2008 R2 will include Hyper-V 2.0, it promises to deliver the final pieces for enterprise level OS virtualization and to really compete with VMware at that level.
The most anticipated is of course Live Migration: moving running VM’s from one host to another without interruption of services running inside the VM’s. To accomplish this technique a new Shared Filesytem is needed and so will also be introduced in Hyper-V 2.0: Clustered Shared Volumes.
The Live migration works best together with System Center Virtual Machine Manager 2008, it can provide additional Live Migration management and orchestration scenarios such as Live Migration via policy.
Cool thing is you only need to update to Hyper-V 2.0, none of the rest of the infrastructure needs updating.
Logical Processor Support
Hot add remove Storage
Second Level Translation (SLAT)
Boot from VHD
Allows any VHD to work on physical hardware, this is very interesting! Boot an OS VHD on your physical hardware.
You can find more information at the WinHEC session descriptions: http://www.microsoft.com/whdc/winhec/2008/sessions.aspx
It’s a lot of posts that explained how to detect HAL. Almost all of those solutions done in VB script. As well I’ve seen a lot of post about “problems’ running VB script under WinPE. So, one day I tried to create a batch file, that allows to detect a HAL under WinPE. I did all my tests under VistaPE 12 (I’ve used the VistaPE v.12 RC1).
Here is content of HAL_Detector.bat script:
REM . – Advanced Configuration and Power Interface (ACPI) PC: ACPIPIC_UP
REM . – ACPI Uniprocessor PC: ACPIAPIC_UP
REM . – ACPI Multiprocessor PC: ACPIAPIC_MP
REM . Advanced Configuration and Power Interface (ACPI) PC
REM . – halacpi.dll (renamed to hal.dll)
REM . – ntkrnlpa.exe
REM . – ntoskrnl.exe
REM . ACPI Uniprocessor PC
REM . – halaacpi.dll (renamed to hal.dll)
REM . – ntkrnlpa.exe
REM . – ntoskrnl.exe
REM . ACPI Multiprocessor PC
REM . – halmacpi.dll (renamed to hal.dll)
REM . – ntkrpamp.exe (renamed to ntkrnlpa.exe)
REM . – ntkrnlmp.exe (renamed to ntoskrnl.exe)
REM ……………….. Explanation About Diferent HAL Versions ………………… ……..
For /F “Tokens=3 Delims= ” %%a in (‘REG QUERY HKLM\SYSTEM\CurrentControlSet\Enum\Root\ACPI_HAL000 /v HardwareID’) DO Set PC-HAL=%%a
IF %PC-HAL% == acpipic Set New-HAL=ACPI_Uniprocessor_PC
IF %PC-HAL% == acpiapic (
For /F %%a in (‘@WMIC COMPUTERSYSTEM GET NumberOfLogicalProcessors /value^|find “NumberOfLogicalProcessors”‘) do Set %%a
IF %NumberOfLogicalProcessors% == Set New-HAL=HAL_NOT_DETECTED
IF %NumberOfLogicalProcessors% == 1 Set New-HAL=ACPI_Uniprocessor_PC
IF %NumberOfLogicalProcessors% == 2 Set New-HAL=ACPI_Multiprocessor_PC
IF %NumberOfLogicalProcessors% == 4 Set New-HAL=ACPI_Multiprocessor_PC
@echo Detected HAL: %New-HAL%
@echo Number of Logical Processors: %NumberOfLogicalProcessors%
If you need to change Time Zone for a lot XP computers, you can do this by simple command:
RunDLL32.exe shell32.dll,Control_RunDLL timedate.cpl,,/Z Central Standard Time
to change Time Zone to Jerusalem (GMT+02:00) run the following command:
RunDLL32.exe shell32.dll,Control_RunDLL timedate.cpl,,/Z (GMT+02:00) Jerusalem
If for what ever reason you need to repair installation of .NET 2. x, you can do this from command line by running the following command:
“C:\WINDOWS\microsoft.NET\Framework\v2.0.50727\Microsoft .NET Framework 2.0\install.exe” /qb! /norestart