maclesb1
(Fresh Scripter)
2006-08-01 11:58 AM
Run or Shell

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)


Mart
(KiX Supporter)
2006-08-01 12:20 PM
Re: Run or Shell

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.


LonkeroAdministrator
(KiX Master Guru)
2006-08-01 12:36 PM
Re: Run or Shell

hmm...
I wonder how logonscript environment affects that.


maclesb1
(Fresh Scripter)
2006-08-01 12:49 PM
Re: Run or Shell

Thanks for your reply.

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

Regards


Arend_
(MM club member)
2006-08-01 01:05 PM
Re: Run or Shell

Correct me if im wrong but "Run" does not require you to specify CScript.exe, Run @Lserver + "\netlogon\logondiscoverer.vbs" would suffice.

maclesb1
(Fresh Scripter)
2006-08-01 01:12 PM
Re: Run or Shell

Cheers apronk, I will give that a try.

Mart
(KiX Supporter)
2006-08-01 01:46 PM
Re: Run or Shell

Quote:

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




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


maclesb1
(Fresh Scripter)
2006-08-01 01:48 PM
Re: Run or Shell

Daft question number 2 - what do you mean by "runs synced or not"?

Mart
(KiX Supporter)
2006-08-01 02:02 PM
Re: Run or Shell

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.


Les
(KiX Master)
2006-08-01 02:23 PM
Re: Run or Shell

Yes, you should specify CScript on the run line.

Gargoyle
(MM club member)
2006-08-01 02:29 PM
Re: Run or Shell

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




Sealeopard
(KiX Master)
2006-08-02 05:04 AM
Re: Run or Shell

This is all documented in the FAQ Forum.

maclesb1
(Fresh Scripter)
2006-08-02 04:22 PM
Re: Run or Shell

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.


LonkeroAdministrator
(KiX Master Guru)
2006-08-02 04:40 PM
Re: Run or Shell

just like I thought.
the logon process won't end until all processing is done.

you should consider using runonce-key