Solved

Available Parameters - objShell.Run /C? 1? True?

Posted on 2004-04-22
2
6,198 Views
Last Modified: 2013-12-03
Hi, I am using a WMI script to rename/IP machines per their mac address -- when that is done I am using the following to call a command that joins to the domain and performs some other things.  I just want to see if someone can clarify the syntax for me and provide other available options you can use.  Basically -  I want the script to run the command, wait while it executes, then close all windows.  Here is the code I am using.

set objWMIService = GetObject("winmgmts://" & Computer)
set objShell = WScript.CreateObject("WScript.Shell")
  objShell.Run"cmd.exe /C test.bat", 1, TRUE

I assume the /C will close the window -- but not sure
Note sure what ,1, TRUE do

Any clarification and extra info would be greatly appreciated!
0
Comment
Question by:jkrech17
2 Comments
 
LVL 13

Accepted Solution

by:
SteH earned 500 total points
ID: 10897080
Hi jkrech17,

with /c you are right: it stops the command processor when finished.

For the parameters to the Run method see
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/wsmthrun.asp
0
 

Author Comment

by:jkrech17
ID: 10897095
Thanks!
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Microsoft Query from QuickBooks 9 72
VBA Error Since Excel 2016 x64 5 123
Problem to packaging 1 99
What is MicroStrategy.NET? 2 73
This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question