Paul 365 Posted September 15, 2003 Share Posted September 15, 2003 Copy and pastes as a .vbs and click away Set sa = CreateObject ("Shell.Application")sa.TrayPropertiesset WshShell = WScript.CreateObject("WScript.Shell")WshShell.SendKeys "%q"Wscript.Sleep 000WshShell.SendKeys "{ENTER}"I left the sleep command there set to zero.Incase you are running it while the system is busy and it fails to work as expected increse by x100 till it works. Link to comment Share on other sites More sharing options...
webmedic Posted September 15, 2003 Share Posted September 15, 2003 ah much faster. I think i found a way to hide the cmd window also. Let me test it first but I think it will work. Link to comment Share on other sites More sharing options...
Paul 365 Posted September 15, 2003 Author Share Posted September 15, 2003 I triedHKLM,%RunOnce%setup,"Microsoft Windows Journal Viewer",0, "cmdow /run /hid CMD.EXE /c msiexec /qn /i c:\\install\\system\\Recomended\\MSJournal\\MSWJV.msi" But i found that handing it off to cmdow caused the .inf proccess to go straight to the next option rather than waiting for it to finish. But it does install it. Link to comment Share on other sites More sharing options...
webmedic Posted September 15, 2003 Share Posted September 15, 2003 well I found in some instances things did not install I could not track it down completetly so iremoved it from doing it htat way and now everything installs correctly the first time.I found something called econsole and it is jsut a wrapper for cmd.exe it allows my with an ini file to place the command propmpt off the viewable area of the screen I think I will use this instead. It also allows for transparent consoles and the like. I think it would look mighy good even if i did have to let it show. Link to comment Share on other sites More sharing options...
mikehall Posted December 8, 2003 Share Posted December 8, 2003 This may be more for vbs scripts in general but I'm trying to figure out how to run the vbs from a cmd file. If I double click your script, it works fine. However if I execute it from my install.cmd file then it opens the taskbar and start menu properties and says 'q' is not recognized. Link to comment Share on other sites More sharing options...
blinkdt Posted December 15, 2003 Share Posted December 15, 2003 I've only just begun to mess with this, but I think you need to preface any .vbs with "wscript.exe" within a .bat/.cmd file, like so:CLS@ECHO OFFTITLE Importing Registry Settings...COLOR 8fwscript.exe "yourpath\invis.vbs" "yourpath\RegTweaks.cmd"exitIn this example, invis.vbs holds the following:CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, FalseThe first batch is packaged as "launch.cmd," which flares briefly and disappears. RegTweaks.cmd runs in absolute invisible mode. I found this on another site and am in no position to comment (non-programmer), dunno if it's off the screen, or really not there, but it works like a charm. No more scrolling batch files, ever. Any VBSers out there care to interpret invis.vbs? 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