Custom Inventory Problems
Has anyone else been able to inventory .log files it %programfiles% directory? I've removed the variable (%programfiles(x86)%) thinking this might have caused some issues. I've used the full path. When I move this same .log file to ProgramData it returns the values. I need to keep it in program files since this data will be changing.
I'm able to run the command from CMD and it returns the correct values when in Progam Files. I have tried this with both 5.3.47657 & 5.3.53177.
I've used both of these.
ShellCommandTextReturn(cmd.exe /c type "%ProgramFiles(x86)%\WinMagic\SecureDoc-NT\UserData\sdjob.log")
ShellCommandTextReturn(cmd.exe /c type "C:\Program Files (x86)\WinMagic\SecureDoc-NT\UserData\sdjob.log")
Answers (1)
ShellCommandTextReturn(cmd.exe /c type \"C:\Program Files (x86)\WinMagic\SecureDoc-NT\UserData\sdjob.log")
IIRC, it's a bug with the space in the argument. You should be able to add escape characters to get it to work properly.
Something like this (added "\" in front of "C:"):
ShellCommandTextReturn(cmd.exe /c type \"C:\Program Files (x86)\WinMagic\SecureDoc-NT\UserData\sdjob.log")
You could also change C:\Program Files (x86) to C:\PROGRA~2 and I believe it would solve that also.
Comments:
-
Thanks that worked. I was hoping it was something easy. - dugullett 12 years ago
ShellCommandTextReturn(cmd.exe /c type "C:\Program Files (x86)\WinMagic\SecureDoc-NT\UserData\sdjob.log" | FIND "Your Text Here")
http://ss64.com/nt/find.html - dugullett 7 years ago