|
server
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
run a script that cant be closed
Is it possible to run a .bat script (from the machines local c:\ drive) that
users can not close? Or is hidden? I use the 'start /min' command but students tend to close the window? thanks "Fabrussio" <Fabrus***@discussions.microsoft.com> wrote in message Try my freeware tool ShellExecute.exe, it will allow you to launch a hidden news:2F5EC803-9C8A-4497-8E1C-BE1025611123@microsoft.com... > Is it possible to run a .bat script (from the machines local c:\ drive) > that > users can not close? > Or is hidden? > > I use the 'start /min' command but students tend to close the window? > > thanks window. ShellExecute.exe /f:C:\MyFolder\MyBatch.cmd /r:hidden http://www.optimumx.com/download/ Fabrussio wrote:
> Is it possible to run a .bat script (from the machines local c:\ drive) that You can use a VBScript (.vbs) to launch a hidden batch file:> users can not close? > Or is hidden? > > I use the 'start /min' command but students tend to close the window? > > thanks Hi, LaunchHiddenBatch.vbs '--------------------8<---------------------- sTitle = "Batch launch" Set oArgs = WScript.Arguments Set oFSO = CreateObject("Scripting.FileSystemObject") Set oShell = CreateObject("WScript.Shell") If oArgs.Count <> 1 Then MsgBox "Error: You need to supply a file path " _ & "as input parameter!", vbCritical + vbSystemModal, sTitle Wscript.Quit 1 End If sFilePath = oArgs(0) If Not oFSO.FileExists(sFilePath) Then MsgBox "Error: Batch file not found", vbCritical + vbSystemModal, sTitle Wscript.Quit 1 End If ' add quotes around the path in case of spaces oShell.Run """" & sFilePath & """", 0, False '--------------------8<---------------------- -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: http://www.microsoft.com/technet/scriptcenter/default.mspx |
|||||||||||||||||||||||