Hi Folks
This code below works (in a .cmd file, by right-clicking the .cmd and selecting run as administrator):
for /F "usebackq tokens=1,2 delims==" %%i in (`wmic os get LocalDateTime /VALUE 2^>NUL`) do if '.%%i.'=='.LocalDateTime.' set ldt=%%j
set ldt=%ldt:~0,4%-%ldt:~4,2%-%ldt:~6,2%_%ldt:~8,2%:%ldt:~10,2%:%ldt:~12,6%
echo %ldt%
set log=%userprofile%\%ldt%_activitylog.xml
echo %log%
set dev="C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe /log %log%"
echo %dev%
pause
C:\Windows\System32\runas.exe /netonly /user:mydomain\myusername "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe /log"
REM C:\Windows\System32\runas.exe /netonly /user:mydomain\myusername"%dev%"
But I want the LAST line to work (the one that's commented with the "REM" and not the line before it).
This will give me a DATE STAMPED ActivityLog.xml file naming.
I'ved tried several variants and I'm not quite sure what VS2013 is choking on, nor does the err message make sense.
(please note that you need to change the "mydomain\myusername" portion)
Rob K