Solved

RunAs NT Authority interactive

Posted on 2007-11-13
7
1,775 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
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.

 

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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

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, …
Step by step guide to Clean and Sort your windows registry! Introduction: Always remember: A Clean registry = Better performance = Save your invaluable time In this article we're going to clear our registry manually! Yes, manually! The e…
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…

730 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