Wilders Security Forums  

Go Back   Wilders Security Forums > Software, Hardware and General Services > other software & services
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread
  #1  
Old March 27th, 2009, 08:48 PM
philby's Avatar
philby philby is offline
Frequent Poster
 
Join Date: Jan 2008
Posts: 922
Default (Very Basic) Vista Batch Files

Hello there

Just tinkering with making .bat files and would be interested in knowing if I'm doing something wrong here -

This works:
echo off
start /d "C: \Program files\ccleaner (M)" ccleaner

But this doesn't work:

echo off
start /d "C: \Program files\opera 10 preview" opera

(makes no difference if I kill the spaces between opera-10-preview, or add .exe to opera)

Grateful for any help - thanks in advance.

philby
__________________
Sandboxie + Macrium on Windows 8 Pro 64
  #2  
Old March 27th, 2009, 11:05 PM
pandlouk's Avatar
pandlouk pandlouk is offline
Very Frequent Poster
 
Join Date: Jul 2007
Posts: 1,860
Default Re: (Very Basic) Vista Batch Files

Quote:
Originally Posted by philby
Hello there

Just tinkering with making .bat files and would be interested in knowing if I'm doing something wrong here -

This works:
echo off
start /d "C: \Program files\ccleaner (M)" ccleaner

But this doesn't work:

echo off
start /d "C: \Program files\opera 10 preview" opera

(makes no difference if I kill the spaces between opera-10-preview, or add .exe to opera)

Grateful for any help - thanks in advance.

philby
Why you don't use the following:
start /d "C: \Program files\opera 10 preview\opera.exe"

Panagiotis
  #3  
Old March 28th, 2009, 03:23 AM
philby's Avatar
philby philby is offline
Frequent Poster
 
Join Date: Jan 2008
Posts: 922
Default Re: (Very Basic) Vista Batch Files

start /d "C: \Program files\opera 10 preview\opera.exe"

This doesn't work either - I just get a quick flash of the command window.

Plus, the ccleaner .bat works without the .exe extension...

Thanks for response.

philby
__________________
Sandboxie + Macrium on Windows 8 Pro 64
  #4  
Old March 28th, 2009, 04:38 AM
Brian K Brian K is offline
Imaging Specialist
 
Join Date: Jan 2005
Location: NSW, Australia
Posts: 5,366
Default Re: (Very Basic) Vista Batch Files

philby,

Try these lines without start....

Quote:
@echo off
"C:\Program files\opera 10 preview\opera.exe"

Did you mean to put a space after C:

Last edited by Brian K : March 28th, 2009 at 04:47 AM.
  #5  
Old March 28th, 2009, 05:04 AM
philby's Avatar
philby philby is offline
Frequent Poster
 
Join Date: Jan 2008
Posts: 922
Default Re: (Very Basic) Vista Batch Files

Yes, thank you, that was it - no space after C: and it works.

Now I don't understand why the ccleaner .bat works with the space after c:

What's that about? I would have imagined either there must be a space or there must not be.

Also, is there a way of preventing the command window from flashing up when the bat shortcut is hit (without TP s/w)?

Thanks again in advance

philby
__________________
Sandboxie + Macrium on Windows 8 Pro 64
  #6  
Old March 28th, 2009, 06:18 AM
Brian K Brian K is offline
Imaging Specialist
 
Join Date: Jan 2005
Location: NSW, Australia
Posts: 5,366
Default Re: (Very Basic) Vista Batch Files

Try this...

Quote:
@echo off
if not defined RunphilbyTask set RunphilbyTask=1 & start "philby" /min %SystemRoot%\system32\cmd.exe /c "%0" & goto :EOF
"C:\Program files\opera 10 preview\opera.exe"

The second line has wrapped. There are only 3 lines here. The second line starts with "if" and finishes with "EOF"



Try this for ccleaner

Quote:
@echo off
"C:\Program Files\CCleaner\ccleaner.exe" /auto
You won't see anything lasting more than a second. It's finished.
 

Wilders Security Forums > Software, Hardware and General Services > other software & services « Previous Thread | Next Thread »

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Settings
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 02:33 AM.


Powered by vBulletin® Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright ©2002 - 2013, Wilders Security Forums