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