Jump to content

Recommended Posts

Posted

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

Posted (edited)
39 minutes ago, Nine said:

Read the help file, it tells you how to do it.  It truly helps reading it ;)

run (@ComSpec & ' /c slmgr /ipk ' & $code, "", @SW_HIDE, $STDERR_MERGED)

Merry xmas...

Merry xmas, you guys are great!

Edited by TanjimReza
Posted (edited)

Even though I'm using the right code (as I know) the command window still shows. 

Run(@ScriptDir & "\batchFile.cmd","", @SW_HIDE, $STDERR_MERGED)

Is there anything I'm missing? Tried to do the same with ShellExecute. Tried Searching in Documentation. 
 

Edited by TanjimReza
Posted
2 minutes ago, Nine said:

Depends what inside this batch file...

There's echo usage, but even if I remove all 'echo' still DOS window appears. Can't figure what to do. 

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
  • Recently Browsing   0 members

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