search
Twitter Rss Feeds
MicrosoftArticlesForumsGroups
C# .NET
VB.NET
Visual Studio .NET
ADO.NET
Xml/Xslt
VB 6.0
.NET CF
GDI+
LINQ
Deployment
Security
FoxPro
Silverlight / WPF
Entity Framework
RIA Services

Web ProgrammingArticlesForumsGroups
JavaScript
ASP
ASP.NET
Web Services

Non-MicrosoftArticlesForumsGroups
NHibernate
Perl
PHP
Ruby
Java
Linux / Unix
Apple
Open Source

DatabasesArticlesForumsGroups
SQL Server
Access
Oracle
MySQL
Other Databases

OfficeArticlesForumsGroups
Microsoft Excel
Microsoft Word
Microsoft Powerpoint
Publisher
Money

Operating SystemsArticlesForumsGroups
Windows 7
Windows Server
Windows Vista
Windows XP
Windows Update
MAC
Linux / UNIX

Server PlatformsArticlesForumsGroups
Share Point
BizTalk
Site Server
Exhange Server
IIS
Transaction Server

Graphic DesignArticlesForumsGroups
Macromedia Flash
Adobe PhotoShop
Microsoft Expression

OtherArticlesForumsGroups
Subversion / CVS
Ask Dr. Dotnetsky
Active Directory
Networking
Uninstall Virus
Job Openings
Reviews
Search Engines
Resumes

 

Previous Thread:   Lock computer

6/20/2005 8:45:25 AM    How to pass parameters to vbscript
Hi,  
  
Does anybody know how to pass the parameter to vbscript file. For example  
  
CScript A.vbs <Paramater>  
  
Where can I find the sample vbs code.  
  
Thanks in advance

6/20/2005 10:55:55 AM    Re: How to pass parameters to vbscript
Sheila wrote:  
  
Hi,  
  
The VBScript (A.vbs) can access the parameters using the Arguments  
  
collection of the Wscript object. For example, in A.vbs:  
  
' Make sure there are at least 2 arguments.  
  
If (Wscript.Arguments.Count < 2) Then  
  
Wscript.Echo "Required Parameter missing"  
  
Wscript.Quit  
  
End If  
  
' Retrieve the first argument (index 0).  
  
strName = Wscript.Arguments(0)  
  
' Retrieve the second argument.  
  
strServer = Wscript.Arguments(1)  
  
--  
  
Richard  
  
Microsoft MVP Scripting and ADSI  
  
Hilltop Lab web site - http://www.rlmueller.net  
  
--


Pete's Blog   |    Pete's Resume   |    Robbe's Blog   |    Robbe's Resume   |    Archive #2   |    Archive #3   |    Dotnetslackers   |    XmlPitStop   |    Advertise   |   Contact Us   |   Privacy   |   Copyright (c) 2000 - 2009 eggheadcafe.com  All rights reserved.