Just a though, I'd be very happy if MS could have a way of simply checking Environmental Variables using a: EnvVarRead>NAME_OF_VARIABLE,VALUE_OF_VARIABLE,RESULT If no variable found the RESULT=1 else RESULT=0 And perhaps a write/append EnvVarWrite>NAME_OF_VARIABLE,VALUE_OF_VARIABLE,RESULT EnvVarAppe...
Yes it does make a difference. I have a PowerShell script that uses a library, this library is 64-bit only I just found out. In order to get this to run at 64-bit I cannot rely on the good'ol: Let>PS_SYNTAX=Get-Date <---- this is just an example to show how I'm doing the PS invoke from CMD Let>PS_PA...
Save this and run it using F8 (step by step): Let>OUTPUT_file=%SCRIPT_DIR%\env.txt Let>BATCH_file=%SCRIPT_DIR%\env.bat Let>BATCH_code=set > "%OUTPUT_file%" DeleteFile>BATCH_file DeleteFile>OUTPUT_file WriteLn>BATCH_file,,BATCH_code ExecuteFile>%BATCH_file% After running it, copy the contents of the ...
I have a script that is rolling on our company file server. I created it to be able to easily see which files that are open and by whom. The script update a database table with this information each 30 seconds. Anyhow, I use the Get-SmbOpenFile command in PowerShell. The command also give the user n...
I have done some benchmarking on the ReadLn vs reading the line using PS. For large files the ReadLn is noticeable slow and thus I needed to find another way to read large files (in my case a 22GB csv file). My results: test1: 24.267s test2: 3.951s Let>FILE_PATH=C:\path\to\huge\file\test.csv Let>ROW...
I recompiled a script that now get this error. I have no way of debugging where this happens since the error isn't caught by the ON_ERROR sub routine. According to Google it's happening because the program is trying to read memory which is out if its scoop. Extra information: the error only happens ...