The difference between the ‘Local System’ account and the ‘Network Service’ account?

Since there is so much confusion about functionality of standard service accounts, I’ll try to give a quick run down. First the actual accounts: LocalService account (preferred) A limited service account that is very similar to Network Service and meant to run standard least-privileged services. However, unlike Network Service it accesses the network as an … Read more

Create Windows service from executable

To create a Windows Service from an executable, you can use sc.exe: sc.exe create <new_service_name> binPath= “<path_to_the_service_executable>” You must have quotation marks around the actual exe path, and a space after the binPath=. More information on the sc command can be found in Microsoft KB251192. Note that it will not work for just any executable: … Read more

Why does the 260 character path length limit exist in Windows?

Quoting this article https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file#maximum-path-length-limitation Maximum Path Length Limitation In the Windows API (with some exceptions discussed in the following paragraphs), the maximum length for a path is MAX_PATH, which is defined as 260 characters. A local path is structured in the following order: drive letter, colon, backslash, name components separated by backslashes, and a terminating … Read more

Is there a /dev/null on Windows?

I think you want NUL, at least within a command prompt or batch files. For example: type c:\autoexec.bat > NUL doesn’t create a file. (I believe the same is true if you try to create a file programmatically, but I haven’t tried it.) In PowerShell, you want $null: echo 1 > $null

How to get list of arguments?

dancavallaro has it right, %* for all command line parameters (excluding the script name itself). You might also find these useful: %0 – the command used to call the batch file (could be foo, ..\foo, c:\bats\foo.bat, etc.) %1 is the first command line parameter, %2 is the second command line parameter, and so on till … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)