Get and execute command in HTA -


i'm new in scripting. need code receive arguments , execute in hidden cmd in hta.

the command execute netsh wlan set hosted mode=allow ssid="name" key="pwd"

here want "name" , "pwd" submit box , execute above command in hidden hta.

i made it, not working properly. see

 <script language="vbscript" type="text/vbscript"> set objshell = createobject("wscript.shell") strout=""  sub startprogram cmdarg="%comspec% /c netsh wlan set hosted mode=allow ssid=" & t1.value "key=" & t2.value  ireturn=objshell.run(cmdarg, 0, true) if ireturn = 0     msgbox "success" else      msgbox "cannot start"  end if traceout.innerhtml= strout end sub </script> 

i don't know if whole problem, @ least:

cmdarg="%comspec% /c netsh wlan set hosted mode=allow ssid=" & t1.value "key=" & t2.value 

should

cmdarg="%comspec% /c netsh wlan set hosted mode=allow ssid=" & t1.value & " key=" & t2.value 

in other words, left ampersand out after t1.value, , left space out before key=.


Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -