Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 



Sign in to follow this  
-Q-

VBscript in commandline

Recommended Posts

Gents,

I've gor a problem with my RIS installation. When my client is installed, the local administrator logs on for 1 time. In this session I want to installed my default applications by using a VB-script. But when the logon completes XP asks me to "OK" the vb-script. Is there a way to kick off the vb-script without any questions?

-Q-

Share this post


Link to post
Share on other sites

myscript.vbs will run another .vbs script without the prompt.

myscript.vbs:


Dim WSHShell, WshEnv
Set WSHShell = CreateObject("WScript.Shell")
Set WSHEnv = WSHShell.Environment("PROCESS")
WSHEnv("SEE_MASK_NOZONECHECKS") = 1
WSHShell.Run "\\MYDOMAIN\NETLOGON\scripts\login\calledvbs.vbs",1,True
WSHEnv.Remove("SEE_MASK_NOZONECHECKS")

call it from a batch file...


@echo off
setlocal extensionsenable
cscript \\server\netlogon\scripts\login\myscript.vbs //nologo
exit

you'll need to modify those files to suit your needs.

Share this post


Link to post
Share on other sites

How do you call the vbscript, by just using the vbscript.vbs?

or do you use a batch file which contains:

call cscript somescript.vbs //nologo
exit

Share this post


Link to post
Share on other sites

I always set the command shell as defaulf handler in for script via the 'cscript //H:cscript' command. In fact thats the first command in my own ris install script.

Share this post


Link to post
Share on other sites
How do you call the vbscript, by just using the vbscript.vbs?

or do you use a batch file which contains:

call cscript somescript.vbs //nologo
exit

yes

call cscript somescript.vbs //nologo

this way i don't get prompted to run somescript.vbs

somescript.vbs removes the zone checks that bring up the 'ok' prompt.

then it calls a bunch of other scripts that need wscript to run...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×