Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Script to auto run newsid

Posted on 2009-04-14
1
Medium Priority
?
1,892 Views
Last Modified: 2012-05-06
We want to use script to autorun newsid for XP /2000 clients.
After i try "newsid /a", there is an agreement need to click yes/agree.
How can i make it auto answer yes to auto run newsid?
Many thanks.
0
Comment
Question by:dickchan
1 Comment
 
LVL 7

Accepted Solution

by:
garethh86 earned 2000 total points
ID: 24136852
I think you have to specify the computer name after the command like so:

newsid /a <computername>

without the <>, otherwise it will ask you before you continue, see below a vb script that will make it automatically for you:

Also see: http://www.msfn.org/board/Assigning-newsid-compute-t114386.html for ideas on naming convention of the machines, you can use the serial number and the date of the machine.
Dim strMachineName = "SomeSortofNamingConvention"
Set objShell = CreateObject("WScript.Shell")
Set objScriptExec = objShell.Exec("newsid /a " & strMachineName)

Open in new window

0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

This article will show, step by step, how to integrate R code into a R Sweave document
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

971 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