Solved

RunAs NT Authority interactive

Posted on 2007-11-13
7
1,780 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Disclosure: Use this tutorial only when no other options helps to get Windows XP running without any problems and you don't want to format the drive. The back up of the data is the responsible of the user, however there is a description of how t…
We have adopted the strategy to use Computers in Student Labs as the bulletin boards. The same target can be achieved by using a Login Notice feature in Group policy but it’s not as attractive as graphical wallpapers with message which grabs the att…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

728 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