How to pass username and password?

November 19, 2015 at 21:32:44
Specs: Windows 7
There is a batch script placed at a windows box at a specified location. Control M contains the location of the batch script and triggers the script which runs three schedulers.

Totally 3 different schedulers + 2 receiver are running in the triggered job in Control M:

1)Give up scheduler
2)Price scheduler + Receivers
3)TM Trade scheduler

Currently in this process while running through control M, the price scheduler is correctly running and the price is flowing correctly into database from time to time(as checked the change in price in database). The Give up scheduler and TM trade scheduler is started correctly and I have checked all the starts logs that are updated into database correctly on the triggered time too(please refer enclosed below screenshot). As checked, when scheduler is running through Control M we are unable to find if it is getting updated properly on the ‘notis’ system path and through SQL loader the files are not imported to database. This is why the data are not being reflected into front end. Whereas, when we run it manually the data are correctly imported through SQL loader into database and in front end the data are correctly flowed.

So, now we have to identify why the files are not indentified in ‘notis’ system path and also why it is not imported through SQL loader to database while running Control M.

Notis system is a file exchange server.

Whenever we trigger the job from Control M, the give up scheduler redirects for the credentails to connect to the 'notis' system.

Can somebody please advice where do we place the username and password for the Notis exchange system in the script so that the give up scheduler does not redirect us for the credentials and the process can be automated through Control M.

Please find the script below:

@echo OFF
echo "Starting Dolphin schedulers and price feed running"

START "SCHEDULERS" /B "C:\DolphinRMS2\Automation\GiveupTAP\GiveupTAPScheduler.exe"

START "RECEIVER" /B "C:\DolphinRMS2\Automation\IRF Executer\CM\NB Receiver.exe"

START "RECEIVER" /B "C:\DolphinRMS2\Automation\IRF Executer\FNO\NB Receiver.exe"

START "PRICEFEED" /B "C:\DolphinRMS2\Automation\Price-Scheduler\Price Feed Capture.exe"

START "SCHEDULERS" /B "C:\DolphinRMS2\Automation\TMTradeTAPScheduler\TMTradeTAPScheduler.exe"

EXIT


See More: How to pass username and password?

Report •


#1
November 20, 2015 at 09:29:06
This will depend on the program, but usernames/passwords in batch scripts are usually put in as attributes (i.e. -password mypassword). If this program is well known, I would look up silent installs for that program, they usually give all the attributes you can use if you were to execute the program via batch.

20 years in IT and counting, baby
\m/ > < \m/


Report •

#2
November 23, 2015 at 19:56:20
Hi gestohlenseele.

Thanks for your reply. Can you please advice how can we encrypt the password field in the batch script and where do place the username and password parameters in the batch file.

Please find the script below:
@echo OFF
echo "Starting Dolphin schedulers and price feed running"
START "SCHEDULERS" /B "C:\DolphinRMS2\Automation\GiveupTAP\GiveupTAPScheduler.exe"
START "RECEIVER" /B "C:\DolphinRMS2\Automation\IRF Executer\CM\NB Receiver.exe"
START "RECEIVER" /B "C:\DolphinRMS2\Automation\IRF Executer\FNO\NB Receiver.exe"
START "PRICEFEED" /B "C:\DolphinRMS2\Automation\Price-Scheduler\Price Feed Capture.exe"
START "SCHEDULERS" /B "C:\DolphinRMS2\Automation\TMTradeTAPScheduler\TMTradeTAPScheduler.exe"
EXIT



Report •

#3
November 24, 2015 at 08:54:52
I would do some research on that Dolphin program to see if running attributes via command line are possible. Not all programs are fond of having that kind of access. Just Google "Dolphin command lines" and it should give you the information you need. However, if I had to take a guess, it would be something like below. If it doesn't work, these command lines/silent installs/runs may not apply to that program. Also, running the lines below plus /? might give you some help.

@echo OFF
echo "Starting Dolphin schedulers and price feed running"
START "SCHEDULERS" /B "C:\DolphinRMS2\Automation\GiveupTAP\GiveupTAPScheduler.exe" -username myuser -password mypassword
START "RECEIVER" /B "C:\DolphinRMS2\Automation\IRF Executer\CM\NB Receiver.exe" -username myuser -password mypassword
START "RECEIVER" /B "C:\DolphinRMS2\Automation\IRF Executer\FNO\NB Receiver.exe" -username myuser -password mypassword
START "PRICEFEED" /B "C:\DolphinRMS2\Automation\Price-Scheduler\Price Feed Capture.exe" -username myuser -password mypassword
START "SCHEDULERS" /B "C:\DolphinRMS2\Automation\TMTradeTAPScheduler\TMTradeTAPScheduler.exe" -username myuser -password mypassword
EXIT

20 years in IT and counting, baby
\m/ > < \m/


Report •

Related Solutions

#4
November 26, 2015 at 21:18:33
Hey,

This ain't working, can you please help me with some other workaround :( !


Report •

#5
November 27, 2015 at 19:22:36
You might have to use sendkeys, but that would be a 'last resort" method and may not work. ("Sendkeys" is a vbscript/visbasic function, combined with "appactivate" to send keystrokes into a visible window. If the window is hidden or nonexistent, then it won't work.)

Report •

#6
December 2, 2015 at 19:35:32
I am not exactly sure how these send keys would work. Can you suggest something around passing username and password within the script or some way so that the prompt for username and password does not appears after the giveupscheduler.exe is executed?

Report •


Ask Question