Quantcast
Channel: Silk Test - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 625

Does silk recognize console windows with a caption other than "C:Windows\system32\cmd.exe"?

$
0
0

Silk 18.5

I need Silk to open cmd as an Administrator and enter a command to disable a network connection. The easiest way I found to do this was to create a scheduled task to simply open cmd as admin to avoid the UAC prompt (Silk doesn't like it) and enter the command. The console window opens like I want it to and brings it to focus, but it doesn't type anything. Any suggestions?

 

CommLoss(STRING sAdapter)
  SYS_Execute("schtasks /Run /TN CMDAdmin")
  Console.TypeKeysInWindow("wmic path win32_networkadapter where NetConnectionID={sAdapter} call disable<Enter>", "Administrator: taskeng.exe")

 

I really appreciate the help!


Viewing all articles
Browse latest Browse all 625

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>