Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBscript to accep input

Status
Not open for further replies.

ameyUK

IS-IT--Management
Dec 20, 2006
76
GB
hi all,

below is my script i want engineer's to change asset name of pc's using a system utility. i having problem using user input and passing as a parameter when running the program.. would really appreciate your help.. many thanks ameyuk


assetno = UserInput( "Enter Asset Number:" )
WScript.Echo "You entered: " & assetno
Set wshShell = WScript.CreateObject ("WSCript.shell")
wshshell.run "C:\CCTK\X86\cctk.exe --asset= " & assetno
set wshshell = nothing
Function UserInput( myPrompt )
If UCase( Right( WScript.FullName, 12 ) ) = "\CSCRIPT.EXE" Then
WScript.StdOut.Write myPrompt & " "
UserInput = WScript.StdIn.ReadLine
Else
UserInput = InputBox( myPrompt )
End If
End Function
 
i having problem
Which problem ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
the problem :

can't pass input from user assetno to C:\CCTK\X86\cctk.exe --asset=

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top