W2K-XP-Tips

HOME
UP
WinNT Provider
XP Service
AddPrinter

 
 

If You find useful Information saving Your time and Money, Donations are Welcome (Charity etc..)

 


Which Userprofiles exist on Your System (via Registry)
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
Windows Explorer Command Line Parameters
explorer.exe /n,<path> opens Explorer in "Open" View with selected <path>
explorer.exe  /e, /n ,<path> opens Explorer in "Explorer" View with selected <path>

 


Windows 2003 Server resize Partition

applies to:

  • Windows Server 2003 (Basic / Dynamic Disc)
  • Windows XP Professional (Basic Disc)
  • Windows Server 2000 (Basic Disc)
  • Windows 2000 Professional (Basic Disc)

to extend (resize) a Windows 2003 Server Parition You don't need 3'rd Party Tools
Ther is a built in Commandline Utility that does that job! (even if You don't have a "Dynamic Disk" like Windows 2000 or Windows XP that means: You can run this on a "Basic Disk").

Just run on the server: diskpart.exe

now You're in diskpart Command-Prompt ( DISKPART> )

You should verify Your Disk Info:( here is just one physical Disk available), Volume Info etc..

just change the desired Volume to Your needs ;-))

 

zacky's Windows 2003 Server Disk resize

c:\>diskpart.exe

 

DISKPART> list disk


  Disk ###  Status      Size     Free     Dyn  Gpt
 
--------  ----------  -------  -------  ---  ---
  Disk 0    Online        43 GB  7326 MB

DISKPART> select disk 0
'now we 've selected the desired Disk

DISKPART> list partition
  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Primary              8 GB    32 KB
  Partition 2    Extended            35 GB     8 GB
  Partition 3    Logical             27 GB     8 GB
 

DISKPART> list volume
  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
  Volume 0     X                       CD-ROM          0 B  Healthy
  Volume 1     Y                       DVD-ROM         0 B  Healthy
  Volume 2     C   fscit001_C   NTFS   Partition      8 GB  Healthy    System
  Volume 3     D   fscit001_D   NTFS   Partition     27 GB  Healthy
 

DISKPART> select volume 3
Volume 3 is the selected volume.
'now we 've selected the desired Volume to resize -let's do the Job now!

DISKPART> extend
DiskPart successfully extended the volume.
DISKPART> ex
it

'that's all  If I save You time and Money Donations are welcome to support more tipps - contact me !

 

 

 

avail.DISKPART.EXE Commands: (Win2k3 Server)

ADD        

 Add a mirror to a simple volume.

ACTIVE     

 Marks the current basic partition as active.

ASSIGN     

 Assign a drive letter or mount point to the selected volume.

AUTOMOUNT  

 Enables and disables automatic mounting of basic volumes.

BREAK      

 Break a mirror set.

CLEAN      

 Clear the configuration information, or all information, off the disk.

CONVERT    

 Converts between different disk formats.

CREATE     

 Create a volume or partition.

DELETE     

 Delete an object.

DETAIL      

 Provide details about an object.

EXIT       

 Exit DiskPart

EXTEND     

 Extend a volume.

GPT        

 Assigns attributes to the selected GPT partition.

HELP       

 Prints a list of commands.

IMPORT     

 Imports a disk group.

INACTIVE   

 Marks the current basic partition as inactive.

LIST       

 Prints out a list of objects.

ONLINE     

 Online a disk that is currently marked as offline.

REM        

 Does nothing. Used to comment scripts.

REMOVE     

 Remove a drive letter or mount point assignment.

REPAIR     

 Repairs a RAID 5 volume with a failed member.

RESCAN     

 Rescan the computer looking for disks and volumes.

RETAIN     

 Place a retained partition under a simple volume.

SELECT     

 Move the focus to an object.

 


Win2003 Server Shutdown without tracking

To change the "tracking" behavior when Shutting Down a W2003 Server do the following:

Run "gpedit.msc"

Select
--> Computer Configuration
        Administrative Templates
            System

Change the Key
 "Display Shutdown Event Tracker" --> "Disabled".


 

Shutdown a Server without having to log on

Select
--> Computer Configuration
        Windows Settings
            Security Settings
                Local Policies
                    Security Options

 Change the Key
"Shutdown: Allow system to be shut down without having to log on" --> "Enabled


 

Cloning Windows Disk / Partitions

When Cloning Windows 2000 / Windows 2000 Server / Windows XP Partitions with Ghost or other Products it is important to remove before cloning (and do not Restart Windows!) the following Registry Key

HKEY_LOCAL_MACHINE\System\MountedDevices

see also Microsoft's Knowledgebase

223188 - HOW TO Change the System-Boot Drive Letter in Windows


 

Slipstreaming Windows XP Service Pack 1a and Create Bootable CD

Slipstreaming a Service Pack, is the process to integrate the Service Pack into the installation so that with every new installation the Operating System and Service Pack are installed at the same time.

Slipstreaming is usually done on network shares on corporate systems. But with the advent of CD burners, it does actually make some sense for the home user or small business user to do the same.

Microsoft added the ability to Slipstream a Service Pack to Windows 2000 and Windows XP. It not only has the advantage that when you (re)install your OS, you don't have to apply the Service Pack later, also if you update any Windows component later, you'll be sure that you get the correct installation files if Windows needs any.


 

Slipstream Windows XP Service Pack 1a

 

Download the (full) "Network Install" of the Service Pack (English version [125 MB]), and save it to a directory (folder) on your hard drive (in my case D:\XP-SP1). Other languages can be downloaded from the Windows XP Web site.

Microsoft recently released Windows XP SP1a. The only difference is that this Service Pack does no longer include Microsoft's dated Java version. If you have already installed Windows XP SP1, there is no reason to install SP1a, but the "older" SP1 (with MS Java) is no longer available for download.

Next copy your Windows XP CD to your hard drive. Just create a folder (I used \XP-CD), and copy all the contents of your Windows XP CD in that folder.

Now create a folder to hold the Service Pack 1a (SP1a) files you are about to extract. I named it \XP-SP1. Next, open a Command Prompt (Start > Run > cmd), and go to the folder where you downloaded SP1a (cd \foldername). Type the command: servicepack filename -x. A small window will appear, and you need to point it to the folder where you want to extract the SP1 files. Click Ok to start extracting the SP1a files.

 

Once the SP1a files are extracted, change to the update folder of the SP1a files (cd update), and type the following command:
update /s:<path to WinXP CD files
>
In my example the command is update /s:D:\XP-CD).

 

Windows XP Update will show a Message "Updating Your Windows Share"

Ready ;-)

 

 

Adding Windows XP Rollup 1 Hotfix

After downloading the Standard version of the Rollup 1 Update, create a new folder on your hard drive and copy the WindowsXP-KB826939-x86-ENU.exe file there (I named the folder \q826939). Next, open a Command Prompt (Start > Run > cmd), and go to the folder where you copied the rollup package (cd \foldername). Type the command: WindowsXP-KB826939-x86-ENU.exe -x. A small window will appear, and you need to point it to the folder where you want to extract the files (I suggest you leave the default, which will be the current folder). Click OK to start extracting the files.

 

update.bat @echo off
setlocal
mkdir D:\XP-CD\I386\svcpack
set PATHTOFIXES=D:\q826939
set PATHTOI386=D:\XP-CD\I386\
set PATHTOSVCPACK=D:\XP-CD\I386\svcpack

del %PATHTOI386%\ntdll.dll

copy %PATHTOFIXES%\sp2\*.* %PATHTOI386%
copy %PATHTOFIXES%\sp2\update\*.cat %PATHTOSVCPACK%
copy %PATHTOFIXES%\WindowsXP-KB826939-x86-ENU.exe %PATHTOSVCPACK%\q826939.exe

del %PATHTOI386%\accwiz.ex_
del %PATHTOI386%\crypt32.dl_
del %PATHTOI386%\cryptsvc.dl_
del %PATHTOI386%\hh.ex_
del %PATHTOI386%\hhctrl.oc_
del %PATHTOI386%\hhsetup.dl_
del %PATHTOI386%\html32.cn_
del %PATHTOI386%\itircl.dl_
del %PATHTOI386%\itss.dl_
del %PATHTOI386%\locator.ex_
del %PATHTOI386%\magnify.ex_
del %PATHTOI386%\migwiz.ex_
del %PATHTOI386%\mrxsmb.sy_
del %PATHTOI386%\msconv97.dl_
del %PATHTOI386%\narrator.ex_
del %PATHTOI386%\newdev.dl_
del %PATHTOI386%\ntkrnlmp.ex_
del %PATHTOI386%\ntoskrnl.ex_
del %PATHTOI386%\ole32.dl_
del %PATHTOI386%\osk.ex_
del %PATHTOI386%\pchshell.dl_
del %PATHTOI386%\raspptp.sy_
del %PATHTOI386%\rpcrt4.dl_
del %PATHTOI386%\rpcss.dl_
del %PATHTOI386%\shdocvw.dl_
del %PATHTOI386%\shell32.dl_
del %PATHTOI386%\shmedia.dl_
del %PATHTOI386%\srrstr.dl_
del %PATHTOI386%\srv.sy_
del %PATHTOI386%\SVCPACK.IN_
del %PATHTOI386%\sysmain.sd_
del %PATHTOI386%\urlmon.dl_
del %PATHTOI386%\user32.dl_
del %PATHTOI386%\win32k.sy_
del %PATHTOI386%\winsrv.dl_
del %PATHTOI386%\zipfldr.dl_

 

Create the above update.bat, and copy it to the root of the hard drive where you have all the files (XP-CD & Roolup 1 Update). Note: you will have to edit the file if you have your files on a different drive then drive D (or use different folder names). Right-click the file update.bat, and from the menu choose Edit. Change these lines to your hard drive letters and/or folder names:


mkdir D:\XP-CD\I386\svcpack
set PATHTOFIXES=D:\q826939
set PATHTOI386=D:\XP-CD\I386\
set PATHTOSVCPACK=D:\XP-CD\I386\svcpack

Double-click the update.bat file to execute it.

Next we need to edit the file \I386\DOSNET.INF. You can double-click the file, it should open in Notepad. Just above the entry [Miscellaneous], add:


[OptionalSrcDirs]
svcpack

At the bottom of the file, you will see an entry [ForceCopyDriverCabFiles], which lists a number of files. Leave the existing entries in place, and add these:


ntkrnlpa.exe
ntkrpamp.exe

Close the file, and save the changes.

Create a new Svcpack.inf file (using Notepad) at \I386\Svcpack.inf, using the following content:

 


[Version]
Signature="$Windows NT$"MajorVersion=5
MinorVersion=1
BuildNumber=2600
[SetupData]
CatalogSubDir="\i386\svcpack"
[ProductCatalogsToInstall]
KB826939.cat
[SetupHotfixesToRun]
q826939.exe /quiet /norestart /n

 

 

Creating a Bootable CD With integrated Service Pack

Use ISO Buster and Nero (make sure you have the latest version, but al least 5.5.9.0).

Extract the boot loader from the original Windows XP CD.
Using ISO Buster, select the "folder" Bootable CD, and right-click Microsoft Corporation.img. From the menu choose Extract Microsoft Corporation.img, and extract it to the folder on your hard drive where you have your Windows XP files

 

Next, start Nero Burning ROM, and choose CD-ROM (Boot) in the New Compilation window.
On the Boot tab, select Image file under Source of boot image data, and browse to the location of the Microsoft Corporation.img file.
Also enable Expert Settings, choosing No Emulation, and changing the Number of loaded sectors to 4 (otherwise it won't boot!)

 

The ISO tab should be configured as shown below:

Press New, and drag & drop the files and folders from your Windows XP hard drive location into Nero.

burn your new CD.

That's It!


 

Fix Winsock Problems

Sometimes You'll have some Problems with Your Netcard, esp. when not properly Uninstalling some Firewall-Software.

You can try to "reset" the TCP IP stack with

Import the Winsock Registry Keys from a Working System

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Winsock
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Winsock2


then Run:

"netsh int ip reset c:\ipreset.txt"

if this doesn't work You can try tools like Winsockfix, this works fine!


 

Useful troubleshooting Commands

 

  • arp.exe -a
  • ipconfig.exe /all
  • ipconfig.exe /displaydns
  • route.exe print
  • net.exe start
  • netstat.exe -e
  • netstat.exe -o
  • netstat.exe -s
  • netstat.exe -n
  • nbtstat.exe -c
  • nbtstat.exe -n
  • nbtstat.exe -r
  • nbtstat.exe -S
  • netsh.exe dump

 

Switch between different Networkconfigurations /Reset TCP IP

If you use Your PC in different networks (Home, Work, Customer, etc.), then You can use NetShell to backup each of the network configurations and restore them again.

To backup a configuration :

netsh -c interface dump > c:\configs\myoffice.txt

To restore a configuration :

netsh -f c:\configs\myoffice.txt

When using NetShell to change network settings it doesn't require a reboot.
You can also use hardware profiles to save the network configuration, but it will require a reboot to change from one hardware profile to another.

To reset the TCPIP protocol if it has gone bad (Useful as WinXP cannot uninstall the TCPIP stack)

netsh int ip reset <PATH>\resetlog.txt


Uninstall / View Hidden Devices

You got an error message when you move the NIC from one PCI slot to another or remove it completely from the system without first removing it from the device manager.

To eliminate the error message you must delete the old NIC from Windows 2000Device Manager. Open a command-prompt and enter the following commands:

 

  • set devmgr_show_nonpresent_devices=1
  • start devmgmt.msc

The first command allows Device Manager to show phantom devices. The second command launches Device Manager. From the Device Manager's menu, select View, Show hidden devices. Expand the Network Adapter tree, and delete the old adapter.


Windows 98 Source Code

read carefully:

Windows 98 C Source Code #include <microsoft/stdio.h>

#include "win31.h"
#include "win95.h"
#include "evenmore.h"
#include "oldstuff.h"
#include "billrulz.h"
#define INSTALL  HARD

char make_prog_look_big[1600000];

void read_partition_table(void)
{      
        write_new_partition_table();
        write_W98_boot_loader(EXTREME_PREJUDICE);
}

void set_time(void)
{
        read_BIOS_clock();

        if (test_cpu_temperature() > 80)
                set_BIOS_clock_to_summertime();
        else
                set_BIOS_clock_to_GMT(); /* Gates Microsoft Time */

        /* Since windows assumes the BIOS clock isn't universal
        time  ...
        */
        windows_clock = ((bios_clock + rand(24)) % 24) * PI;

        if (user_complains())
        {
                remind_user_that_bugs_arent_going_to_be_fixed();
                popup_and_recommend_user_buys_windows_y2k_defiant();
        }
}

void check_mail(void)
{
        int i;

        for (i = 0; i < num_mail_messages_unread; i++)
                if (strstr(UnreadMail[i].Subject, "GOOD TIMES") ||
                        strstr(UnreadMail[i].Subject, "JOIN THE CREW"))
                start_microsoft_frontpage_97(REMOVE_WEB_SITE, "C:\")
}

void if_modem(void)
{
        if (default_browser() != IE40)
        {
                dump_netscape();
                set_invalid_host("www.netscape.com", ALWAYS);
                download_latest_patch(IE40);
                install_ie40();
                associate_file_type(".BMP", IE40);
                associate_file_type(".JPG", IE40);
                ....
                ....
                associate_file_type(".EXE", IE40);
                default_mail_reader = WORD97;
        }
 
        mail_system_registry_to_microsoft();
 
        remove_current_isp();
        set_current_isp("WWW.MSN.COM", CHARGE_BAND_PREMIUM_RATE);

        if (sun_microsystems_java())
        {
                remove_sun_microsystems_java();
                install_microsoft_hacked_java_instead();
        }

        check_mail();
}

void hex_dump(void)
{
        for (y=0; y< 32; y++)
        {
                for (x=0; x<20; x++)
                {
                        printf("Ox00%c%c", hex(rand(16)),
                                        hex(rand(16)));
                }
                printf("\n");
        }
}

void blue_screen_of_death(void)
{
        set_screen_color(BLUE);
        hex_dump();
}

void create_general_protection_fault(void)
{
        switch (rand(4))
        {
                case 1:
                        display_general_protection_fault(WORD97);
                        break;
                case 2:
                        display_general_protection_fault(EXCELL);
                        break;
                case 3:
                        display_general_protection_fault(IE40);
                        break;
                default:
                        blue_screen_of_death();
                        break;
        }
}

void main()
{
    read_partition_table();
    if_modem();

    while(!CRASHED)
    {
        display_copyright_message();
        display_bill_rules_message();
        do_nothing_loop();
        if (first_time_installation)
        {
            make_50_megabyte_swapfile();
            do_nothing_loop();
            totally_screw_up_HPFS_file_system();
            search_and_destroy_the_rest_of_OS/2();
            hang_system();
        }
        write_something(anything);
        display_copyright_message();
        do_nothing_loop();
        do_some_stuff();
        if (still_not_crashed)
        {
            display_copyright_message();
            do_nothing_loop();
            basically_run_windows_3.1();
            do_nothing_loop();
            do_nothing_loop();
        }
    }

    if (detect_cache())
        disable_cache();

    if (fast_cpu())
    {
        set_wait_states(lots);
        set_mouse(speed, very_slow);
        set_mouse(action, jumpy);
        set_mouse(reaction, sometimes);
    }

    /* printf("Welcome to Windows 3.11"); */
    /* printf("Welcome to Windows 95"); */
    printf("Welcome to Windows 98");
    if (system_ok())
         crash(to_dos_prompt);
    else
        system_memory = open("a:\swp0001.swp", O_CREATE);

    while(something)
    {
        sleep(5);
        get_user_input();
        sleep(5);
        act_on_user_input();
        sleep(5);
    }
    create_general_protection_fault();
}

How to run a classID from Explorer / InternetExplorer

eg. Publishing on Windows Terminal Server / Citrix

Commandline to run ClassID iexplore.exe ::{ClassGUID}
explorer.exe ::{ClassGUID}

 

Use Secedit.exe to manipulate Permissions

mySecedit.inf [Unicode]
Unicode=yes
[Version]
signature="$CHICAGO$"
Revision=1
[Registry Keys]
"MACHINE\SOFTWARE\Skype\Phone",0,"D:AR(A;CI;CCDCLCSWRPWPSDRC;;;AU)"
[File Security]
"%ProgramFiles%\Skype",0,"D:AR(A;OICI;0x1301bf;;;AU)"

this sample Edit the local Authenticated Users to give Change Permissions to Registry and Filesystem

Move ClientSideCache (CSC)

when You use Offline Files sometimes it isn't a good idea to leave this files on Your SystemDrive (e.g. C:\WINDOWS\CSC ). A better solution will be to move this cache Location to another Drive.

You can use cachemov.exe from Windows 2000 Resource Kit.

or edit the Registry - with an REG_SZ (maybe a RegExpandSZ will also work to use Environment Variables;-)

Key: HKLM\Software\Microsoft\Windows\CurrentVersion\NetCache
Value: DatabaseLocation
Data:REG_SZ <newCSCDir>
Value: DefCacheSize
Data:REG_DWORD <CacheSize>
Value Enabled
Data:REG_DWORD 1

Windows Shortcuts

WIN => Opens the Start menu
WIN + E => Opens My Computer in Windows Explorer
WIN + Pause/Break => Opens the System Properties dialog box
WIN + U => Opens the Utility Manager
WIN + R => Opens the Run… prompt
WIN + F => Opens the Search for Files and Folder window
WIN + Ctrl + F => Opens the search for computers on the network
WIN + M => Minimize all windows
WIN + Shift + M => Maximize all windows (after minimizing them)
WIN + D => Minimize all windows to the desktop, and then restore all Windows
WIN + L => Lock Computer
WIN + Tab => Cycle through the open programs on the Taskbar
WIN + B => "Selects the first item in the System Tray; use the arrow keys to cycle through the items and use the Enter key to open a selected item in the SysTray"
Alt + Tab => Switch between open programs
Alt + F4 (in a program) => Closes the active window
Alt + F4 (from desktop) => Opens the Windows Shutdown/Restart dialog box
Alt + Enter => Opens the Properties page of a selected item
Alt + Esc => Cycle between open programs in the order that they were opened
Alt + Spacebar => "In the active window, this brings up the corner dialog box for Move, Size, Minimize, Maximize, or Close"
Shift + Insert CD/DVD => Inserts a CD/DVD without triggering Autoplay or Autorun
Shift + Delete => Permanently deletes an item (rather than sending it to the Recycle Bin)
Ctrl + Shift + Esc => Opens the Windows Task Manager
Ctrl + drag an icon => Copies that item
Ctrl + Shift WIN + drag icon => Creates a shortcut for the item
Right-click + drag a file => Brings up a menu to copy, move, or create a shortcut
PrtScn => "Takes a screen shot of the entire screen; go into a photo program (the Windows program ""Paint"" will also work) and hit Paste to edit and save the
screen shot"
Alt + PrtScn => "Takes a screen shot of only the active Window; hit Paste in a photo program to edit and save the screen shot"
F1 => Opens the Windows XP Help
F2 => Rename selected item
F3 => Opens Windows search for files and folders
F5 => Refresh Internet Explorer page, or refresh any other window
F6 => "Cycle through the different types of elements that can be selection on a screen
or window"
F10 => "Selects the menu bar in the active program (usually ""File"") so that you can use
the arrow keys to navigate through the menus and the Enter key to select"
Shift + F10 => For a selected item, this does the same thing as a right-click with the mouse
Tab => Move through the different elements on a page or the fields in a form
Shift + Tab => Move backward through the different elements on a page or the fields in a form
Ctrl + A => Select All
Ctrl + C => Copy
Ctrl + X => Cut
Ctrl + V => Paste
Ctrl + Z => Undo
Ctrl + Y => Redo
Ctrl + P => Print
Ctrl + O => Open
Ctrl + Esc => Opens the Start menu
Ctrl + Backspace => Deletes the entire word to the left
Ctrl + Delete => Deletes the entire word to the right
Ctrl + Right arrow => Moves the cursor to the beginning of the next word
Ctrl + Left arrow => Moves the cursor to the beginning of the previous word
Ctrl + Down arrow => Moves the cursor to the beginning of the next paragraph
Ctrl + Up arrow => Moves the cursor to the beginning of the previous paragraph
Ctrl + Shift + Arrow keys => Highlight a block of text
Click Shift 5 times => Turns StickyKeys on or off
"Hold down the right Shift key for 8 seconds" => Turns FilterKeys on or off
Hold down Num Lock for 5sec => Turns ToggleKeys on or off

 

Adaptec ASPI Package

Adaptec - Windows ASPI Package

 

(c) by Wolfgang Zerzawy 07-Mai-08 12:11   

XING