MSFN Forum: VBscript in commandline - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

VBscript in commandline Rate Topic: -----

#1 User is offline   -Q- 

  • Group: Members
  • Posts: 4
  • Joined: 10-August 04

Posted 07 August 2007 - 08:19 AM

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-


#2 User is offline   boredazfcuk 

  • Newbie
  • Group: Members
  • Posts: 10
  • Joined: 21-August 07

Posted 21 August 2007 - 12:50 PM

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.

#3 User is offline   Henkes 

  • Newbie
  • Group: Members
  • Posts: 38
  • Joined: 06-August 07

Posted 28 August 2007 - 11:26 AM

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


#4 User is offline   meeuws 

  • Group: Members
  • Posts: 6
  • Joined: 13-January 06

Posted 29 August 2007 - 02:42 AM

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.

#5 User is offline   boredazfcuk 

  • Newbie
  • Group: Members
  • Posts: 10
  • Joined: 21-August 07

Posted 04 September 2007 - 12:54 PM

View PostHenkes, on Aug 28 2007, 06:26 PM, said:

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 topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy