Solved

RunAs NT Authority interactive

Posted on 2007-11-13
7
1,784 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
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

There are 2 things you must have in order to connect to the internet behind a router, The "Gateway IP" of the router, which is usually something like 192.168.xxx.1, I've seen routers with default values of: 192.168.0.1, 192.168.1.1, 192.168.11.1, …
It is only natural that we all want our PCs to be in good working order, improved system performance, so that is exactly how programs are advertised to entice. They say things like:            •      PC crashes? Get registry cleaner to repair it!    …
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…

623 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