Page 1 of 1 1
Topic Options
#165239 - 2006-08-01 11:58 AM Run or Shell
maclesb1 Offline
Fresh Scripter

Registered: 2006-08-01
Posts: 5
Hi

New to this forum, and as such sorry if I am asking a REALLY stupid question.

Basically, I am trying to run a VBS script from a kix script - but I need it to run indepenadantly of all other scripts (the reason being that the VBS does a trawl of the w\s and collates info. and then writes back to an array. To avoid network congestion, the VBS waits for anything from 1-2 hours before it starts - that is why I would like to be able to install on to w\s without affecting the rest of login script)

Top
#165240 - 2006-08-01 12:20 PM Re: Run or Shell
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4672
Loc: The Netherlands
Hi and welcome to the board.

Shell halts the script it is called from until shell is done.
Run does not halt the script it is called from.

So if you want the vbs code to run and the original script should continue running you should use run.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#165241 - 2006-08-01 12:36 PM Re: Run or Shell
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
hmm...
I wonder how logonscript environment affects that.

Top
#165242 - 2006-08-01 12:49 PM Re: Run or Shell
maclesb1 Offline
Fresh Scripter

Registered: 2006-08-01
Posts: 5
Thanks for your reply.

I have tried using run as described below, but does not work:
run "cscript" + @Lserver + "\netlogon\logondiscoverer.vbs"

Regards

Top
#165243 - 2006-08-01 01:05 PM Re: Run or Shell
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1894
Loc: Hilversum, The Netherlands
Correct me if im wrong but "Run" does not require you to specify CScript.exe, Run @Lserver + "\netlogon\logondiscoverer.vbs" would suffice.
Top
#165244 - 2006-08-01 01:12 PM Re: Run or Shell
maclesb1 Offline
Fresh Scripter

Registered: 2006-08-01
Posts: 5
Cheers apronk, I will give that a try.
Top
#165245 - 2006-08-01 01:46 PM Re: Run or Shell
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4672
Loc: The Netherlands
Quote:

hmm...
I wonder how logon script environment affects that.




It all depends on if the logon script runs synced or not.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#165246 - 2006-08-01 01:48 PM Re: Run or Shell
maclesb1 Offline
Fresh Scripter

Registered: 2006-08-01
Posts: 5
Daft question number 2 - what do you mean by "runs synced or not"?
Top
#165247 - 2006-08-01 02:02 PM Re: Run or Shell
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4672
Loc: The Netherlands
You can run the logon script synchronised or not.

If they run synced the script has to end before Windows resumes loading the users desktop, start menu, etc...
If they do not run synched Windows continues to load the users desktop and stuff when the script is running.

So if your scripts run synched and you run the VBS code then the user will have to wait until all scripts are done.


Edited by Mart (2006-08-01 02:02 PM)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#165248 - 2006-08-01 02:23 PM Re: Run or Shell
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Yes, you should specify CScript on the run line.
Top
#165249 - 2006-08-01 02:29 PM Re: Run or Shell
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Quote:

run "cscript" + @Lserver + "\netlogon\logondiscoverer.vbs"




Should be
Code:

run "cscript " + @Lserver + "\netlogon\logondiscoverer.vbs"



There was a missing space after Cscript... In essence you were getting this passed to the cmd line
Quote:

cscript\\someservername\netlogon\logondiscoverer.vbs



Top
#165250 - 2006-08-02 05:04 AM Re: Run or Shell
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
This is all documented in the FAQ Forum.
_________________________
There are two types of vessels, submarines and targets.

Top
#165251 - 2006-08-02 04:22 PM Re: Run or Shell
maclesb1 Offline
Fresh Scripter

Registered: 2006-08-01
Posts: 5
The script runs, but unfortunatley the Dos window does not exit until all the called scripts have completed.

What I need is for the afore mentioned script to be called but to complete independantly of all the other scripts called during login.

Regards.

Top
#165252 - 2006-08-02 04:40 PM Re: Run or Shell
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
just like I thought.
the logon process won't end until all processing is done.

you should consider using runonce-key

Top
Page 1 of 1 1


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

Who's Online
0 registered and 259 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.085 seconds in which 0.034 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