Solved

RunAs NT Authority interactive

Posted on 2007-11-13
7
1,768 Views
Last Modified: 2012-06-27
I have a batch file that I need to run every 10 minutes with Scheduled Tasks which is fine. I've done that. The problem is that because this runs every 10 minutes I want it run hidden so users don't see this black window popping up on screen all the time. However, a part of this calls out to a VBS file to display a message box should there be a problem. This message box I obviously want shown to the user. So how can I run the batch file hidden, but show the msgbox should it need to display?

Running the scheduled task as NT AUTHORITY\System doesn't work because the msg box also runs hidden and using the AT command to make the NT AUTHORITY\System account interactive doesn't work because then the batch file isn't hidden.
0
Comment
Question by:MDauphinais1
7 Comments
 
LVL 2

Expert Comment

by:Username01
ID: 20277859
is this the type of program your after?
http://www.commandline.co.uk/cmdow/
0
 
LVL 9

Expert Comment

by:dreamyguy
ID: 20278853
what u can do is set the task to run interactively, but while executing the commands in the batch file, add the -s switch to make it run silently. i don't know the contents of ur batch file that's why i can't say if it'll work for all of them.
0
 

Author Comment

by:MDauphinais1
ID: 20285539
I tried creating the task with the path to the batch file followed by a -s and it doesn't run silently.
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

Accepted Solution

by:
MDauphinais1 earned 0 total points
ID: 20285832
Ahhh.... I got it. Calling the batch file from this VBScript makes the batch file invisible but displays the msgbox if need be.

Const NORMAL_WINDOW = 0
Dim oShell
Set oShell = CreateObject("Shell.Application")
oShell.ShellExecute "status.bat", , , , NORMAL_WINDOW
Set oShell = Nothing

Let me know if you guys want points for trying though I ended up with my own solution.

Thanks for your help.
0
 
LVL 9

Expert Comment

by:dreamyguy
ID: 20287406
you can ask the moderators to refund this question since you've resolved it on ur own.
0
 
LVL 1

Expert Comment

by:Vee_Mod
ID: 20311897
Closed, 250 points refunded.
Vee_Mod
Community Support Moderator
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Are you unable to synchronize your OST (Offline Storage Table) file with Microsoft Exchange Server? Is your OST file exceeding 2 GB size limit? In Microsoft Outlook 2002 and earlier versions, there is a 2 GB size limit for the OST file. If the file …
Migration of Exchange mailbox can be done with the ExProfre.exe tool. But at times, when the ExProfre.exe tool migrates the Exchange Server user profile, it results in numerous synchronization problems. Synchronization error messages appear in the e…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now