Archive

Archive for the ‘Windows’ Category

resolved – Windows cannot access the specified device, path, or file. You may not have the appropriate permission to access the item

April 22nd, 2016 Comments off

I've been having this strange problem since this morning after starting office laptop from Hibernate. Restart is also not fixing it.

For any program, file, it just says that Windows cannot find the file ...etc . Simple search shows that it comes from anti virus. So, it is coming from Mcafee Host IPS. As soon as I turn that off from Mcaffee tray menu > Quick settings > Host IPS off, programs start working.

cannot_access

 

And here's a quick fix for this (Right click McAfee icon, then Quick settings, uncheck 'Host IPS - off'):

IPS_off

 

Categories: IT Architecture, Systems, Windows Tags:

Difference between Computer Configuration settings and User Configuration settings in Active Directory Policy Editor

November 22nd, 2013 Comments off
  • Computer Configuration settings are applied to computer accounts at startup and during the background refresh interval.
  • User Configuration settings are applied to the user accounts logon and during the background refresh interval.

use batch script to start up & shutdown Virtualbox VMs

October 28th, 2013 Comments off

I woke up before 8 every day on weekdays, and want to poweron two VMs in virtualbox named "xp" and "win2008". So I can write a script and put it in "startup" folder, then these two VMs will startup with system automatically:

@echo off
date /t | find "Mon" && goto 1
date /t | find "Tue" && goto 1
date /t | find "Wed" && goto 1
date /t | find "Thu" && goto 1
date /t | find "Fri" && goto 1
exit

:1
if %time:~0,2% leq 8 (
c:\VirtualBox\VBoxManage startvm win2008 --type gui
c:\VirtualBox\VBoxManage startvm xp --type gui
) else exit

And I also want to shutdown these two VMs in one run:

c:\VirtualBox\VBoxManage controlvm win2008 acpipowerbutton
c:\VirtualBox\VBoxManage controlvm xp acpipowerbutton

PS:

You may also consider group policy(gpedit.msc -> Computer Configuration -> Windows Settings -> Scripts -> Shutdown) in windows so that when you shutdown your pc, all VMs will turned off automatically if you have a GPO for shutdown.

windows tips

June 30th, 2013 Comments off

shutdown -r #reboot
at 22:00 Shutdown -s

ctrl+shift+n #create new folder
shutdown -t 0 #shutdown now
netstat -an|findstr :8080
ping /? #windows show help, or ping /h or ping -? or ping help
pathping
teamviewer, realvnc, mstsc(RDP), radmin #remote connection
mstsc /v:win20081 #Microsoft Terminal Services Connection
msra #remote assistant
ipconfig | clip
baretail #windows tail
Process Explorer #libraries and files accessed by an individual process
filemon.exe
procmon.exe
ALT+SPACE+N #minimize current window
netsh winsock reset #ping is ok but can not get on line

\\<hostname>\c$ #show drive C, ensure there's WINS running in the network
slmgr -rearm #extend by thirty days. reboot needed
servermanagercmd.exe -query # report on what roles, role services, and features are installed
#to use powershell to install roles/role services
import-module Servermanager
get-WindowsFeature
add-windowsfeature File-Services,FS-Resource-Manager -whatif
add-windowsfeature File-Services,FS-Resource-Manager -concurrent
get-executionpolicy
set-executionpolicy unrestricted $then you can use powershell.exe <script.ps1> to add roles/role services
ctrl+shift+esc #start up Task Manager
C:\Windows\System32>cscript scregedit.wsf /cli #edit registry in windows core. cscript is VB interpreter. or just use regedit to open GUI
cscript scregedit /au 4 #enable automatic updates
cscript scregedit /au /v #view current setting
control timedate.cpl #set timezone(using GUI)
netdom renamecomputer WIN-AG6PVO7DM2A /NewName:Bfsc1 /reboot:5 #rename computer
netdom join bfsc1 /domain:Bigfirm.com /userd:Administrator /passwordd:P@ssw0rd /reboot:5 #join a domain
sc query dhcpserver #check service status
Net Share Drive_D=D:
net share #all shares
WMIC QFE List Full #installed service packs and patches
echo %prompt% #Command Prompt Personalization Values, prompt=$D$P$G
dir #internal command, help to check all
dir name.* /S #find file recursively
findstr /m /c /i "andy test" *.* # /m show only filename, /i case insensitive
findstr /m /c:"andy here" *.* #/c: for searching items with space
tasklist /? #help message
TaskList /FI "Status eq Not Responding"
SystemInfo #system info, include patch, NIC
SystemInfo /S Main /U Joe /P #a machine named Main with Joe’s account
TaskList /FI "ImageName eq Notepad.EXE"
taskkill /pid 7936
ChkNTFS C:
getmac /v
ipconfig /all
net localgroup #Manages a complex array of network information, including accounts, groups, computers,services,and ?les
netstat -a -b #-b to get which program opens the connection
whoami /all #user info
@Echo Hello #@ prohibits the output of "Echo hello",but put "hello"
@Pause Press AnyKey...
network logins don’t lead to user pro?les, interactive logins do #regedit, under HKEY_USERS
HKLM #HKEY_LOCAL_MACHINE
HKCU or HCU #HKEY_CURRENT_USER
reg query "hkcu\control panel\desktop" /v ScreenSaverIsSecure
reg query HKLM /f "Organization" /t REG_SZ /s
reg add "HKCU\Software\Microsoft\Notepad" /v fWrap /d 1 /f
reg export "HKCU\Software\Microsoft\Notepad" notepadback.reg #and then type notepadback.reg to see the contents
net user nopower Panda12 /add #normal user nopower with password Panda12
net user administrator * #change password
shutdown -l #log out
gpedit.msc #group policy object, LGPO. Or run mmc and then add the snap-in for Group Policy Object editor(you can select Administrators or Non-Administrators or User Specific LGPO from here)
diskpart.exe #disk management CLI
list disk
rescan
select disk 1
convert mbr #or convert gpt
convert dynamic #convert disk from basic to dynamic which has volumes that can across multiple physical disks(simple, spanned, striped, mirrored, raid5)
list partition
select partition 2
active #mark a partition as active which will be bootable
diskmgmt.msc #disk management
format e: /fs:ntfs
convert p: /fs:ntfs
NetSH Interface IP Set Address "Local Area Connection" Static 192.168.0.2 255.255.255.0 192.168.0.1 1
NetSH Interface IP SetDNSServer "Local Area Connection" Static 192.168.0.1
nbtstat -n #get NetBIOS name of workstation
net view \\ANDY-PC
net use Z: \\bf1\temp #net use Z: /del to remove the mapped drive
servermanager.msc #server management
compmgmt.msc #computer management
ncpa.cpl #view network connections
dnscmd /info #config of dns server
nslookup #set q=ptr; set q=soa; set q=ns; set q=srv;
dcdiag /test:RegisterInDNS /DnsDomain:bigfirm.com /f:documents\ dcdiagRegisterInDNS.txt #test whether a domain controller can perform DDNS to register the SRV records
download remote Server Administration Tools to manager server from win7
test@bigfirm.com Te$t225223
dsquery user -upn liandy@bigfirm.com #get DN of user
dsquery user -samid liandy
dsmod user "CN=JoeBloggs,OU=Users,OU=BigFirm,DC=bigfirm,DC=com"-mgr"CN=AlexandraGarcia,OU=Users,OU=BigFirm,DC=bigfirm,DC=com"
gpedit.msc #group policy editor for local machine GPO.
gpmc.msc #group policy management console for AD. right click one GPO and "edit", will open GPME for that GPO
gpme.msc #group policy management editor
gpupdate /force #refresh Group Policy
perfmon.msc #performance monitor
secpol.msc #local security policy
ipsecmon #identify systems that are using IPSec and the level of security they are using

MMC - Microsoft Management Console, mmc.exe
MSC - Microsoftsavedconsole, like compmgmt.msc
(most of them in C:\Windows\System32)
winword.exe
eventvwr.msc #event viewer
services.msc
azman.msc authorizationmanager
certmgr.msc certmgr(certi?cates–currentuser)
comexp.msc componentservices
compmgmtlauncher.exe servermanager
devmgmt.msc devicemanager
eventvwr.msc eventviewer
fsmgmt.msc sharedfolders

iscsicpl.exe iscsiinitiator
lusrmgr.msc lusrmgr(localusersandgroups)
mdsched.exe memorydiagnosticstool
msconfig.exe systemcon?guration
napclcfg.msc napclcfg(napclientcon?guration)
odbcad32.exe datasources(odbc)
rsop.msc resultantsetofpolicy
scw.exe securitycon?gurationwizard

services.msc services
storagemgmt.msc shareandstoragemanagement
storexpl.msc storageexplorer
tapimgmt.msc telephony
taskschd.msc taskscheduler
tpm.msc trustedplatformmodule
tsadmin.msc terminalservicesmanager
tsconfig.msc terminalservicescon?guration
tsmmc.msc remotedesktops
wbadmin.msc windowsserverbackup
wf.msc windowsfirewallwithadvancedsecurity
wmimgmt.msc wmimgmt(consoleroot\wmicontrol)

 

Categories: IT Architecture, Systems, Windows Tags:

resolved – resolv.conf windows equivalent

November 12th, 2012 8 comments

This is an interesting topic. As the filesystem is totally different between linux and windows, so there's no /etc/resolve.conf in windows. But there's a way to meet your requirement(no software required). Follow the steps below to resolve resolve.conf in windows issue:

1.Go to "Network Connections":

2.Double click the connection you want to set DNS resolution against(usually Local Area Connections if you're using the wire to get online):

3.Click "Properties", later double click "Internet Protocal Version 4(TCP/IPv4)":

4.Then in the prompted window, click "Advanced", later switch to "DNS" tab of that window:

5.Check box "Append these DNS suffixes(in order)", and click "Add". And then enter the suffix in want to add, for example, "us.doxer.org":

 

After this, click Add, then "OK" and close all other opened ones.

Now you can test again using ping/browser etc, you'll find it's just playing the same as /etc/resolve.conf in linux.

PS:

For linux /etc/resolv.conf, you should pay attention to below:

  1. The algorithm used is to try a name server, and if the query times out, try the next, until out of name servers, then repeat trying all the name servers until a maximum number of retries are made.
  2. options <option ...>, below are of most importance - timeout:n(default 5, the value for this option is silently capped to 30), attempts:n(2, capped to 5), rotate.
Categories: IT Architecture, Systems, Windows Tags: