Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

Run SqlCmd in Hidden form

$
0
0

Hello

I have following Batch file named batch.bat

d:
cd "Task Scheduler"
sqlcmd -i backup.sql

In backup.sql script content is as follows:

use NorthwindLicenceNew
IF EXISTS( SELECT * FROM SystemLoginUser
WHERE DATEDIFF(MINUTE,LastUpdateTime,CURRENT_TIMESTAMP) > 1)
BEGIN
DELETE FROM SystemLoginUser
WHERE DATEDIFF(MINUTE,LastUpdateTime,CURRENT_TIMESTAMP) > 1
END
ELSE
BEGIN
PRINT ' No Rows qualified for delete'
END

it is working fine. But my issue is when Ever batch Starts it open COmmand Prompt & close it. Meanse on screen we can see Flickering Command Prompt. Like Open & close it.

I want to make Command Prompt Completely Hidden. So How can I make it Hidden?

I have googled a lot & found some of solution like creating VbScript & Wscript & all . Tried all but not working.. As I am new in creating this batch can you please guide me in detail for this ?

Can anybody help me to solve this issue?

Thanking you in advance..

Regards

Vipul



Viewing all articles
Browse latest Browse all 12583

Trending Articles



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