[[https://www.revelation.com/|Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community]]
==== Using DOS echo command (OpenInsight Specific) ====
=== At 25 FEB 1999 03:07:22PM S. Berger wrote: ===
{{tag>"OpenInsight Specific"}}
Running OI 3.7 on an NT 4.0 machine, I am issuing the following command line in a stored procedure.
"UTILITY('RUNWIN','COMMAND /c echo %username% ] ': dos_file_in)"
it is supposed to return the username of the logged in user. If I issue the command at the command line, it works fine . However, when run from the SP, it returns "%username".
Help
S. Berger
----
=== At 26 FEB 1999 05:18AM Oystein Reigem wrote: ===
S,
[i]Running OI 3.7 on an NT 4.0 machine, I am issuing the following command line in a stored procedure.
"UTILITY('RUNWIN','COMMAND /c echo %username% ] ': dos_file_in)"
it is supposed to return the username of the logged in user. If I issue the command at the command line, it works fine .[/i]
(You mean Windows' Start | Run, right, not the Sys Ed Exec Line?)
[i]However, when run from the SP, it returns "%username".[/i]
Just a thought: It could almost look as if (1) something (in Utility???) removes or "substitutes away" the final "%", and (2) NT thinks "%username" is a literal string and not an environment variable (my Win95 seems to interpret both "%username%" and "%username" as an environment variable name, but perhaps it's different on NT and you need both percentage symbols).
So if my theory is right why isn't the first "%" removed as well? Perhaps it's got something to do with the space after the final "%". Try to remove that space. It's still valid syntax.
- Oystein -
----
=== At 26 FEB 1999 12:04PM S. Berger wrote: ===
Good Idea, but no. As clarification, when I said that it worked from the command line, I meant that I open up a DOS window. It does not run from the start | run menu. I get incorrect DOS version that way.
----
=== At 27 FEB 1999 02:36AM Steve Smith wrote: ===
Sounds like you have multiple versions of command.com on your drive.
Start-Run-C:\COMMAND.COM
DIR \ /S / P COMMAND.COM
check the duplicates for size. Delete any that aren't Win 95.
Steve
----
=== At 01 MAR 1999 01:42PM S. Berger wrote: ===
This looks like it's on the right path. I DID have multiple COMMAND.COM's on my drive I removed them and now I see what is causing the problem. If I open a command window 'start | run | cmd' and I type in 'ver' i get 'Windows NT version 4.0' and I receive the correct response when I type in the command 'echo %username%'. However, if I run utility runwin with the command 'command ver' it is running 'MS-DOS Version 5.00.500'. I have modified the autoexec and the config files so that compspec and everything shell point to 'WINNT\system32\command.com'.
S
[[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=NONWORKS_READ&SUMMARY=1&KEY=64EB25D061999C4985256723006E8A09|View this thread on the forum...]]