/bundles/itninjaweb/img/Breadcrumb_cap_w.png

I want a bat script, which is required input message text as a parameter, append with other exe.

I have a exe. Client require launch this exe with dynamic parameter. This dynamic parameter should type end user (input message).

Please help me..

suppose: i have abcd.exe and parameter is "APACDBPRD1", It should launch "abcd.exe APACDBPRD1"

0 Comments   [ - ] Hide Comments

Comments

Please log in to comment

Community Chosen Answer


Answers

1

ok if I understand you. 

As an example I want people to enter a file name to open in notepad automatically via a batch file. 

I would use

@echo off
set /p xx="Enter file to run in notepad: " %=%
notepad %xx%

the windows pops up and asks me the question and I type in c:\test1.txt and hit enter

Answered 06/03/2014 by: SMal.tmcc
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity

Answers

0

I've used AutoIt to do this previously. (http://www.autoitscript.com/site/autoit/)

eg

............................................................................................................. 

Local $Arg1 = InputBox("Get Arguement for my exe", "Please enter the required arguement.", "APACDBPRD1")
if @Error=1 Then
   Exit
EndIf

ShellExecuteWait("ABCD.exe", $Arg1)

..............................................................

Answered 06/03/2014 by: Utterly
Yellow Belt

Please log in to comment
Admin Script Editor
Admin Script Editor is an integrated scripting environment available free here at ITNinja

Share