Jump to content

Combining string and varibale to run in CMD


TanjimReza
 Share

Recommended Posts

Hello, it's me struggling again. Here's what I want to do: 

I have a textbox named, I want to get the text that user inputed into that box and combine it with a string to run in CMD. 

I'm getting the text using 

$code = GUICtrlRead($Name_of_my_Variable)

Now I want to run in CMD something like 

Quote

slmgr /ipk $code

 

My expected output is

2032171791_Screenshot(11).png.c1747f777f2a850e7c08b4a28f4a1d29.png

Link to comment
Share on other sites

I tried with multiple echo messages and it doesn't show for me. I also can read the messages :

#include <Constants.au3>

Opt ("MustDeclareVars", 1)

Local $pid = Run(@ScriptDir & "\batchFile.cmd","", @SW_HIDE, $STDERR_MERGED)
ProcessWaitClose ($pid)
MsgBox ($MB_SYSTEMMODAL,"",StdoutRead ($pid))

 

Link to comment
Share on other sites

3 hours ago, Nine said:

I tried with multiple echo messages and it doesn't show for me. I also can read the messages :

#include <Constants.au3>

Opt ("MustDeclareVars", 1)

Local $pid = Run(@ScriptDir & "\batchFile.cmd","", @SW_HIDE, $STDERR_MERGED)
ProcessWaitClose ($pid)
MsgBox ($MB_SYSTEMMODAL,"",StdoutRead ($pid))

 

Don't know why this isn't working for me

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...