#117139 - 2004-04-01 01:46 AM
COMSPEC Question
|
ktodi
Getting the hang of it
Registered: 2002-03-29
Posts: 60
|
I run the following line of code in a script and it always reports back to kixtart after it runs "The command completed succesfully". Is there a way for to add an @Echo off or somethihng to keep this message from popping up in my kixtart script?
SHELL '%ComSpec% /c net localGroup Administrators "CORP\Desktop Admins" /Add'
|
Top
|
|
|
|
#117141 - 2004-04-01 02:47 AM
Re: COMSPEC Question
|
Chris S.
MM club member
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
There is also a swell FAQ in the FAQ forum entitled "All you ever wanted to know about Shell" (or something like that). Check it out!
|
Top
|
|
|
|
#117142 - 2004-04-01 07:18 PM
Re: COMSPEC Question
|
ktodi
Getting the hang of it
Registered: 2002-03-29
Posts: 60
|
I searched the FAQ section for SHELL and that did not come up. Could you possible supply a link or a little more direction as to where to look/search
|
Top
|
|
|
|
#117143 - 2004-04-01 07:54 PM
Re: COMSPEC Question
|
Chris S.
MM club member
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
Sure... Not quite everything you wanted to know about RUN and SHELL
About the search, its possible you didn't change the Date Range or some other search property to get the correct results. It trips people up all the time.
|
Top
|
|
|
|
#117144 - 2004-04-01 08:11 PM
Re: COMSPEC Question
|
ktodi
Getting the hang of it
Registered: 2002-03-29
Posts: 60
|
I adjusted the date and found it. Thanks.
|
Top
|
|
|
|
#117145 - 2004-04-01 09:03 PM
Re: COMSPEC Question
|
ktodi
Getting the hang of it
Registered: 2002-03-29
Posts: 60
|
Why do I nned to use >NUL 2>NUL what about 1>NUL. I do not understand the idea of redirecting to an output file when one does not exist.
|
Top
|
|
|
|
#117147 - 2004-04-02 01:53 AM
Re: COMSPEC Question
|
ktodi
Getting the hang of it
Registered: 2002-03-29
Posts: 60
|
Thanks for everyones help.
|
Top
|
|
|
|
#117148 - 2004-04-02 02:14 AM
Re: COMSPEC Question
|
NTDOC
Administrator
Registered: 2000-07-28
Posts: 11624
Loc: CA
|
|
Top
|
|
|
|
#117149 - 2004-04-02 05:35 PM
Re: COMSPEC Question - Help On Line Expression
|
JeremyP
Fresh Scripter
Registered: 2001-11-06
Posts: 5
Loc: USA
|
Using the SHELL Command, I am having serious trouble in getting this "Command Line" to work from within my script, A simple MENU type script asking for particular information then sends the info to the command line.
It creates a LOOP process at the command prompt, and the Token is added to from the information in the '(workstations.txt)' file until it reaches the end of the file. It calls the particular program to RUN each time it finished the previous item in the file. This works PERFECTLY on the command line, but I NEED to get to run from an option on a menu style script I am writing. I either get:
"Not recognized internal/file error" or It does nothing.
*** ACTUAL COMMAND LINE USAGE *** for /F "tokens=1" %i in (workstations.txt) do call vnc7 %i /user username password /log /ultra
**********************************
ANY Help would be greatly appreciated, This Site and Kixtart is the BEST application I use in my Organization for LOCKING down my Computers!
TIA!
Jeremy Peeler
|
Top
|
|
|
|
#117151 - 2004-04-02 11:29 PM
Re: COMSPEC Question - Help On Line Expression
|
JeremyP
Fresh Scripter
Registered: 2001-11-06
Posts: 5
Loc: USA
|
I have looked and searched, but have had NO luck in getting that line to work with either using the CHR(34), Triple Quotes, anything I can think of.. The Shell Command Line is in the above post.
This is the results I get from this code: Code giving the error below:
Shell $CMD + "c:\fastpush\for /F " + "tokens=1" + " %i in ($WSListing) do call vnc7 %i /user $AdminUser $AdminPW /log /ultra"
ERROR MESSAGE: 'c:\fastpush\for' is no t recognized as an internal or external command, operable program or batch file.
This is an Advanced CMD Command "for" in the CMD Compspec. It runs a Batch file as well. The "TOKENS=1" Must be in Quotes inside the command line as well, while the other instructions are VARs from Kixtart and command line switches.
I have gone and read the FAQs, but I am sure I am not doing something right. Any help would be greatly appreciated.
|
Top
|
|
|
|
#117154 - 2004-04-06 03:47 AM
Re: COMSPEC Question - Help On Line Expression
|
JeremyP
Fresh Scripter
Registered: 2001-11-06
Posts: 5
Loc: USA
|
Well excuse me for "Hijaking" someone's topic. That was NOT my intension. It has ALL to do with the COMSPEC topic, and I was needing some help. I guess I was wrong to ask the best place for answers for "KixTart", etc. Please Accept my apology and I will not bother anyone with my efforts on trying to finish a project for my organization.
PLease delete my repsonses if needed, so I will not be in "Violation" or anything, as it was not my intension.
Thank You.
|
Top
|
|
|
|
#117155 - 2004-04-06 04:43 PM
Re: COMSPEC Question - Help On Line Expression
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
JeremyP, please repost your repost the content of your post as a new thread in the Starter's Forum. You caused no great problem but adding to the end of someone else's thread does cause confusion and possibly a lot of email to the originator of the thread if they enable email notification for any responses to the thread. Starting your own thread would assist in getting the proper answerd to your specific question/problem.
|
Top
|
|
|
|
#117156 - 2004-04-09 02:57 AM
Re: COMSPEC Question - Help On Line Expression
|
JeremyP
Fresh Scripter
Registered: 2001-11-06
Posts: 5
Loc: USA
|
Thank You Howard. I appreciate your repsonse. I in no way meant to "Hijak" anyone's thread, as it was put. I will try to repost in another thread.
JeremyP
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 369 anonymous users online.
|
|
|