Solved

RunAs NT Authority interactive

Posted on 2007-11-13
7
1,774 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
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Which version of visual studio is best to modify a winform application for windows 7 3 181
XP won't boot 27 155
Upgrade or retire 8 96
Windows 10 -- Home to Pro upgrade ? 4 106
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, …
Issue: Unstable cursor in Windows XP and Windows runs extremely slow in that any click will bring up the Hour glass (sometimes for several seconds before giving you what you want) . Troubleshooting Process and the FINAL FIX: This issue see…
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…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

839 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