brnn Posted April 9, 2006 Share Posted April 9, 2006 Can I run my .bat files through RunOnceEx.cmd and do I have to add any switch after them to work correct?(In the .batch are included all the switches needed to install the program, and there is @cmdow /hid in the top because I don't want the cmd window to be shown) Link to comment Share on other sites More sharing options...
Plamdi Posted April 10, 2006 Share Posted April 10, 2006 Yes you can, and if you don't want the batch file shown at all use VBS to launch it - or even better use VBS to perform the tasks of your batch file. Example VBS code to run a custom program hidden:Option ExplicitOn Error Resume NextIf Wscript.Arguments.Count<>1 Then WScript.Quit(0)Dim WshShell,pp=Left(WScript.ScriptFullName,Len(WScript.ScriptFullName)-_ Len(WScript.ScriptName))Set WshShell=WScript.CreateObject("WScript.Shell")WshShell.Run p&Wscript.Arguments(0),0Set WshShell=NothingWScript.Quit(1)Usage: WSCRIPT SCRIPTNAME.VBS BATCHFILE.CMDRequirements: Batch file in same directory as script.But yes, you can use .BAT/.CMD in the same way as .EXE or .COM from RunOnceEx.cmd. Link to comment Share on other sites More sharing options...
TjobzzZ Posted April 11, 2006 Share Posted April 11, 2006 One thing to do is rename the .bat to .cmd, it has the same but extended capabilities. If you don't want to see the command window, use CMDOW. Just run a search fo it or look on the MSFN unattended site. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now