Aug 11, 2010 07:30 PM
(This post was last modified: Jan 3, 2011 04:56 PM by iGnite.)
Hiding the command prompt isn't that difficult to do...and below I've created a simple script that can be used to do just that...The prompt will display momentarily...Then your batch code will run hidden...👹...I hope this is useful for those of you who are tired of that old dried up black prompt getting in your way...
As usual leave comments & criticisms 😅
Code @echo off & @break off & title _
if not [%1]==[] goto :%1
call %0 root e i a o u s t c
exit
:root
%3f %2x%3%7%8 %1.vb%7 %7%8%4r%8 "" "%1.vb%7"
%2%9h%5 %7%2%8 %5 = %9r%2%4%8%2%5bj%2%9%8("w%7%9r%3p%8.%7h%2ll") > %1.vb%7
%2%9h%5 %5.r%6n "%~0 %7%9r%3p%8", vbh%3d%2, %8r%6%2 >> %1.vb%7
%7%8%4r%8 "" "%1.vb%7"
%2x%3%8
:script
REM Type your script below here
Aug 11, 2010 08:08 PM
(This post was last modified: Aug 11, 2010 08:11 PM by White Light.)
I'm to lazy to decode your script's simple cypher, so I will just give this really short code in VBS to hide any window (including the command prompt).
Code Set wshShell=wscript.CreateObject("WScript.Shell")
wshshell.run "BATCHFILEHERE", 0
Edit: You sure you tested that script? Because it looks like it creates a .vb t file...that's just a quick glance.
e i a o u s t c
e=%1
i=%2
a=%3
o=%4
u=%5
s=%6
t=%7
c=%8
(Aug 11, 2010 08:08 PM)White Light Wrote: I'm to lazy to decode your script's simple cypher, so I will just give this really short code in VBS to hide any window (including the command prompt).
Code Set wshShell=wscript.CreateObject("WScript.Shell")
wshshell.run "BATCHFILEHERE", 0
The VBScript code I used is below...Are you trying to correct me?...Or just posting your thoughts on the code I used?...❓...
Code set o = createobject("wscript.shell")
o.run _Batch file here_, vbhide, true
(Aug 11, 2010 08:08 PM)White Light Wrote: Edit: You sure you tested that script? Because it looks like it creates a .vbt file...that's just a quick glance.
e i a o u s t c
e=%1
i=%2
a=%3
o=%4
u=%5
s=%6
t=%7
c=%8
No I tested it...lol...I test everything I post...and you obviously know how the parameters work...You just forgot the 1st one...[ root e i a o u s t c ]
hm... when I want to hide tha black window in batch script I simply use batch to exe converter that has "run hidden" option... no1 can see what the program does and its hidden... great to bind with somet...
Aug 12, 2010 02:34 PM
(This post was last modified: Aug 12, 2010 02:34 PM by White Light.)
(Aug 11, 2010 08:19 PM)iGnite Wrote: The VBScript code I used is below...Are you trying to correct me?...Or just posting your thoughts on the code I used?...❓...
(Aug 11, 2010 08:08 PM)White Light Wrote: Edit: You sure you tested that script? Because it looks like it creates a .vbt file...that's just a quick glance.
e i a o u s t c
e=%1
i=%2
a=%3
o=%4
u=%5
s=%6
t=%7
c=%8
No I tested it...lol...I test everything I post...and you obviously know how the parameters work...You just forgot the 1st one...[ root e i a o u s t c ]
#1 I posted a different code which works.
#2 I am just not used to seeing batch being used so inefficiently (no offence). Why not just call :root?
#3 And yes, I guess I do know about parameters...I did do a tut on it.
Aug 12, 2010 05:40 PM
(This post was last modified: Aug 12, 2010 05:42 PM by iGnite.)
(Aug 12, 2010 06:44 AM)1llusion Wrote: hm... when I want to hide tha black window in batch script I simply use batch to exe converter that has "run hidden" option... no1 can see what the program does and its hidden... great to bind with somet...
Yeah...I understand what your saying...I just decided to share a method of hiding the prompt using native MSW programs...
(Aug 12, 2010 02:34 PM)White Light Wrote: #1 I posted a different code which works.
#2 I am just not used to seeing batch being used so inefficiently (no offence). Why not just call :root?
#3 And yes, I guess I do know about parameters...I did do a tut on it.
#1 I never said your code didn't work?
#2 My batch script allows people to append they're own code directly to it...and hide the command prompt being shown to issue they're code...So how is that inefficient?..."No offense" is just a way of saying I'm about to offend you...In which case you didn't because your mistaken...I could have just called the :root parameter...but I didn't...and I'm sure adding more parameters doesn't make the script any less/or more efficient...To me an efficient program is practical and/or helpful to the system or user...In which case this is...{sigh}...I understand your perspective...I could have just called ":root" and called it a day...but I just didn't bro...
Sorry if I seem a little aggressive...It's just that I created the script...It may not be the most fully optimized piece of code or anything...but It works...and It's got a little bit of my own personal touch...In the end it's merely a script...If you want to optimize the code...Then by all means go for it...
#3 It was a compliment...I know you've written a tutorial on parameters...
Lastly...I will edit this thread to meet the requirements of a tutorial...and I suppose what I've supplied you is nothing close to that...So for that I apologize HF'ers...To forum_reader...Thanks again for the constructive criticism...
(Aug 12, 2010 05:40 PM)iGnite Wrote: Lastly...I will edit this thread to meet the requirements of a tutorial...and I suppose what I've supplied you is nothing close to that... Hey, I'm sorry, ok? It was just one of those days where things just don't seem to work out and you need someone to take it out on (really sorry it had to be you and not one of those mindless skids).
(Aug 12, 2010 05:40 PM)iGnite Wrote: Sorry if I seem a little aggressive...It's just that I created the script...It may not be the most fully optimized piece of code or anything...but It works...and It's got a little bit of my own personal touch...In the end it's merely a script...If you want to optimize the code...Then by all means go for it... Hey, I totally understand. You put a bit of soul into each thing you do...wow, that sounds really cheesy...
Like I said, just one of those days...
(Aug 12, 2010 05:40 PM)iGnite Wrote: #2 My batch script allows people to append they're own code directly to it...and hide the command prompt being shown to issue they're code...So how is that inefficient?..."No offense" is just a way of saying I'm about to offend you...In which case you didn't because your mistaken...I could have just called the :root parameter...but I didn't...and I'm sure adding more parameters doesn't make the script any less/or more efficient...To me an efficient program is practical and/or helpful to the system or user...In which case this is...{sigh}...I understand your perspective...I could have just called ":root" and called it a day...but I just didn't bro... Now that I've read my post again, it did seem like a total dickwad thing to say...
(Aug 12, 2010 05:40 PM)iGnite Wrote: #1 I never said your code didn't work? Should have added "as well" or "also".
(Aug 12, 2010 05:40 PM)iGnite Wrote: #3 It was a compliment...I know you've written a tutorial on parameters... Once again, a dickwad thing to say.
Well, I hope you accept my apology. I really wasn't thinking straight.
Aug 12, 2010 06:04 PM
(This post was last modified: Aug 12, 2010 06:05 PM by iGnite.)
No prob...and no need to apologize...You're cool with me...I appreciate your posts...They keep me on my toes...I needed to change up this thread anyway...because it truly isn't a tutorial...Again it's no prob bro...You're definitely cool with me...
Aug 12, 2010 06:08 PM
(This post was last modified: Aug 12, 2010 09:34 PM by White Light.)
(Aug 12, 2010 06:04 PM)iGnite Wrote: You're definitely cool with me... That makes me feel better now...😎
You know Pith, you're probably my favourite member here.
i definately like this script, its different from just plain text and a lil more challenging...hopefully people will learn from this! =D
(Aug 13, 2010 09:43 AM)Soviet Alliance Wrote: i definately like this script, its different from just plain text and a lil more challenging...hopefully people will learn from this! =D
Then you come along and destroy the love.
Using the windows script host method is probably a much better and easier solution. This has already been posted by Poison, though. So, yeah.
(Aug 2, 2012 03:16 PM)THUG x WRECK Wrote: Using the windows script host method is probably a much better and easier solution. This has already been posted by Poison, though. So, yeah.
Did I really post that? I must admit, I don't remember that :/
Well all of the scripts on this page didn't seem to work for me but I found one that does. Save this as a .js file.
PHP Code
<?php var WindowStyle_Hidden = 0 var objShell = WScript.CreateObject("WScript.Shell") var result = objShell.Run("cmd.exe /c YOUR_BATCH_FILE.bat", WindowStyle_Hidden)
Aug 4, 2012 02:34 PM
(This post was last modified: Aug 4, 2012 02:35 PM by White Light.)
Why the heck are we bümping this ancient thread. Greenpoison, I blame your shit for this shit.
|