Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

run script maximized and "frozen"

Status
Not open for further replies.

endear

Programmer
Oct 18, 2012
3
BE
Hi,

at the moment we are running this code:
Code:
Dim shell
Set shell=createobject("wscript.shell")
...
shell.run  "file://C:\file.bat"

How is it possible to run this bat file that is maximized and where the user can't close the window?
is it something like this?
Code:
shell.run("file://C:\file.bat" & WScript.Arguments(0), 3, False)
 
What about this ?
shell.Run "C:\file.bat " & WScript.Arguments(0), 3, True

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Hi!
I Think that can be done only under Windows XP after modifying the registry, so i think on VISTA or SEVEN it's very difficult to achieve your aim [ponder]
 
shell.Run "C:\file.bat " & WScript.Arguments(0), 3, True" is not a solution, the user can still close the window...
 
If you are under Windows XP , So this code will work with you [2thumbsup]
Code:
Dim Ws
Set Ws=createobject("wscript.Shell")
Ws.regWrite "HKEY_CURRENT_USER\Console\Fullscreen", "1", "REG_DWORD"
Ws.Run "cmd /c C:\file.bat",3, True
 
Fullscreen is not the problem, it's closing the window... We don't want that the user can close the window.
We have windows 7
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top