WINDOWS>

HANDY COMMANDS
msconfig - allows you to configure startup programs easily, network test etc - very handy

 

Circumventing Group Policy Settings

Enabling Regedit

A quick way to enable regedit access when it's locked down by GP is, take the following code, paste it into notepad, and save it as enableregedit.inf

[Version]
Signature="$CHICAGO$"

[DefaultInstall]
DelReg=EnableRegTools

[EnableRegTools]
HKCU, "software\microsoft\windows\currentversion\policies\system","DisableRegistryTools"


If you then Right click on the file and choose "Install" it will fool the system into installing a registry key that it would normally refuse.

("Registry editing is not allowed, blah blah...") You have to be a local admin (or power user) to install though.

 

Preventing Group Policy from applying

> For those who want to know how to stop GP from reapplying.

To change the refresh interval for computers:
Registry key: HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\ System
Name: GroupPolicyRefreshTime
Type: REG_DWORD
Valid range for data (in minutes): 0 to 64800

To change the offset interval for computers:
Registry key: HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\ System
Name: GroupPolicyRefreshTimeOffset
Type: REG_DWORD
Valid range for data (in minutes): 0 to 1440

To change the refresh interval for users:
Registry key: HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\ System
Name: GroupPolicyRefreshTime
Type: REG_DWORD
Valid range for data (in minutes): 0 to 64800

To change the offset interval for users:
Registry key: HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\ System
Name: GroupPolicyRefreshTimeOffset
Type: REG_DWORD
Valid range for data (in minutes): 0 to 1440

0 == Never
 

Regain Control of Vista

A mates mate ran into some strife after lending out his machine to a "friend".  The machine came back in one piece, but after he logged into it he couldnt do anything.  He couldnt launch applications, he couldnt create anything on the Desktop and he had no access to the file system.

The way that we got out of this was like so:

Safe Mode with Command Prompt

Power ON the machine and press F8 as the machine starts Windows.
You should see a Text menu which lists a whole heap of options.
Select "Safe Mode with Command Prompt"


Create a new user and add them to the Administrators group

Now that you are at the Command Prompt you should now be able to create a new user and add them to the Administrators group.

net user ADMIN password /add /expires:never
net localgroup administrators ADMIN /add


Disable User Account Control (UAC)

This will ensure that once logged in everything you do is as an Administrator.  You no longer have to select 'Run As Administrator'.  It is wise to change this back after everything is back to normal.

reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableLUA /t REG_DWORD /d 0 /f


Take ownership and Grant access to files/directories in Vista

Enter the following commands in order (replacing %1 with desired path/filename or “.” for current directory):

takeown /f %1 /r /d y
icacls %1 /grant administrators:F /t

Note:
TaskOwn :: The optional switch "/a" transfers ownership to the administrators group. If omitted, the default is to transfer ownership to the present user account. The switch "/r" recurses subdirectories. Although this command assigns ownership, it does not give control rights.

Icacls :: Icacls.exe supersedes the "cacls" command of Windows XP. The older command is still available, however.) This command has a rather complex set of options. They can be displayed by entering "icacls /?" in a command prompt.

More Information:
Vistas ICACLS Command


Restart the machine

After restarting the machine and logging on as ADMIN you should now have full control of the system.