Which command would you use to show the contents no matter in which folder you are? the "dir" command Important: the parameter used with the find command must be under quotes Task: Using the find command, find the win.ini in the result of the command dir c:\windows komanda: dir c:\windows | find "win.ini" Which flag will ignore the case with the find command? /I flag will ignore cases set komanda se koristi za ispis svih environment varijabla komanda: set | find /I "computername" *ili* set computername komanda: set username What is the variable PATH used for? The PATH variable is used for locating executables in specific directories, this eliminates the need to search for executables manually. When a binary is ran, the PATH variable goes over the list and tries to find the mached executable name. komanda: set path *ili* path Path=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\Studenti\AppData\Local\Microsoft\WindowsApps; PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC komanda: set systemroot SystemRoot=C:\Windows What will happen if you type this command? cd %systemroot% you will use the dynamic value from the variable and change the directory inside C:\Windows What is the main difference between the windows program and the Windows service? Windows services are processes that run with elevated system privileges, windows programs run as the user that is in the current session. Services do not require a windows session to run, programs do. komanda: sc query wscsvc Try to find the wscsvc service. What is that service used for? komanda: sc qdescription wscsvc The WSCSVC (Windows Security Center) service monitors and reports security health settings on the computer. The health settings include firewall (on/off), antivirus (on/off/out of date), antispyware (on/off/out of date), Windows Update (automatically/manually download and install updates), User Account Control (on/off), and Internet settings (recommended/not recommended). The service provides COM APIs for independent software vendors to register and record the state of their products to the Security Center service. The Security and Maintenance UI uses the service to provide systray alerts and a graphical view of the security health states in the Security and Maintenance control panel. Network Access Protection (NAP) uses the service to report the security health states of clients to the NAP Network Policy Server to make network quarantine decisions. The service also has a public API that allows external consumers to programmatically retrieve the aggregated security health state of the system. Which command can be used to enumerate all the services and drivers? sc query state= all How can one check the status of the event log service on a computer? sc query eventlog How can one start the service with the sc command? sc start How can one stop the service with the sc command? sc stop Task: Create the FOR flop that will echo the even numbers between and including 10 to 100 without showing the command used to echo the result komanda: for /L %i in (10,2,100) do @echo %i Task: Create the infinite loop that will echo "Algebra" until you break it with the CTRL+C key combination komanda: for /L %i in (1,0,2) do @echo "Algebra" How can one identify the name registered with the 1.1.1.1 IP address with the nslookup command? nslookup 1.1.1.1 Create the FOR loop that will use the nslookup command to find the results for the IP Address range given by the professor (it will be something like this: 192.168.0.1 – 192.168.0.255). We will use the IP address range in the classroom we are in. Are there any results? Why yes (if there is), or why no (if there isn’t)? komanda: for /L %i in (1,1,255) do nslookup 192.168.0.%i What will happen if you type the net user command? we will get a list of user accounts inside windows. What will happen if you type the net localgroup command? It will show all of the local groups inside the system. net user command to create a new user is: net user [username] [password] /add net localgroup command to add a newly created user in the administrators group is: net localgroup Administrators [username] /add