Page 1 of 1 1
Topic Options
#152151 - 2005-11-23 09:15 PM Silly Question, but you guys will know
Aaron Perrault Offline
Fresh Scripter

Registered: 2003-08-29
Posts: 27
Loc: Emeryville, CA
OK guys,
I know that you will be able to help me in a heart beat. What is the equivelant command to DOS's old ECHO OFF command? In the login script that we were working on the other day, (the one with shell 'net stop "Automatic Updates"', since I am displaying a pretty box with login info etc, that line and a couple others are displaying in the box, and making it look less pretty (my users like pretty). I want those lines of code to run, but I dont need to see the results on the screen. Any ideas?

This is what I have, but I KNOW that it doesnt work.


ECHO OFF
If Exist ("%wiwndir%\system32\pskill.exe")
Display ("File Exists")
Else Copy @ldrive+\files\pskill.exe ("%windir%\system32")
;
Run ("%windir%\system32\pskill.exe wauclt")

Shell 'net stop "Automatic Updates"'
Shell 'net start "Automatic Updates"'
Run ("%windir%\system32\wuauclt.exe /resetauthorization /detectnow")

SetTime "@lserver"

Thanks guys,

app

Top
#152152 - 2005-11-23 09:39 PM Re: Silly Question, but you guys will know
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
You cannot always stop commands outputting to the console.

Sometimes you can bin the output by redirecting it to the bit-bucket:
Code:
Shell '"'+%COMSPEC%+'" /C net stop "Automatic Updates" >NUL: 2>NUL:'


Top
#152153 - 2005-11-23 10:56 PM Re: Silly Question, but you guys will know
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
you are still using the pskill even though you had a whole thread discussing that it's not the right way to do it?
_________________________
!

download KiXnet

Top
#152154 - 2005-11-23 11:08 PM Re: Silly Question, but you guys will know
Aaron Perrault Offline
Fresh Scripter

Registered: 2003-08-29
Posts: 27
Loc: Emeryville, CA
I am using the PSKill in case the process is running. I probably dont really need it, but I would prefer to be safe, since I will then be starting it again.

app

Top
#152155 - 2005-11-23 11:17 PM Re: Silly Question, but you guys will know
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I already said that the process is wUauclt and not wauclt.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#152156 - 2005-11-23 11:33 PM Re: Silly Question, but you guys will know
Aaron Perrault Offline
Fresh Scripter

Registered: 2003-08-29
Posts: 27
Loc: Emeryville, CA
my mistake, I missed that typo.

thanks

aaron

Top
#152157 - 2005-11-24 06:15 AM Re: Silly Question, but you guys will know
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
doh, the service stop function does stop the process automatically.
killing the process manually is asking for nose bleed.
_________________________
!

download KiXnet

Top
#152158 - 2005-11-24 02:53 PM Re: Silly Question, but you guys will know
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Jooel,
It is not a service, just a process.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#152159 - 2005-11-24 04:52 PM Re: Silly Question, but you guys will know
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Service = Automatic Updates (name = wuauserv)
Process = wuauclt

When the Automatic Updates service is stopped wuauclt is also stopped. When the service is started again the wuauclt process shows up when the first detection is starting, not directly when starting the service.


Edited by Mart (2005-11-24 04:53 PM)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#152160 - 2005-11-24 04:59 PM Re: Silly Question, but you guys will know
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Thus, it is sufficient (and actually a clean approach) to just stop the service and not forcing the kill of the process.
_________________________
There are two types of vessels, submarines and targets.

Top
#152161 - 2005-11-24 05:18 PM Re: Silly Question, but you guys will know
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Yep.
When the process is killed it will just spawn again when a detection is needed. When you stop the service the process is stopped and detections are also stopped so the process will not restart when you do not want it to.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#152162 - 2005-11-28 05:23 PM Re: Silly Question, but you guys will know
Aaron Perrault Offline
Fresh Scripter

Registered: 2003-08-29
Posts: 27
Loc: Emeryville, CA
Hey guys,
thanks for all the info. I knew that the two were connected, but not that directly. I will definetly remove the PSKill from the script, and just use the net stop command.

I hope everyone had a good weekend.

Now on to the Christmas Holidays, yippee, yippee!! (Dripping with sarcasm if it didnt come across!!)

thanks again

app

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 525 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.178 seconds in which 0.151 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org