# [SOLVED] Batch - Open IE or Notepad Full Screen



## jcgriff2

I should know this by now, but. . .

I want to include in a batch script the command necessary to open Notepad or IE (or default browser) full screen (/max).

1. This works - Notepad & my test file - just fine:


Code:


[font=lucida console]start /max notepad "%userprofile%\documents\test1.txt"[/font]

2. This brings up a MAX CMD screen (no Notepad): 


Code:


[font=lucida console]start /max "%userprofile%\documents\test1.txt"[/font]

3. This just brings up Notepad with the specified file (text1.txt), but of course does not maximize Notepad:


Code:


[font=lucida console]start notepad "%userprofile%\documents\test1.txt"[/font]

4: This brings up a new regular (size-wise) CMD screen: (NO Notepad): 


Code:


s[font=lucida console]tart "%userprofile%\documents\test1.txt"[/font]

Why doesn't #4 bring up Notepad opened with the specified file? I've used similar code in various posts and believe (or thought...) that the file ext would/should cause Notepad to open...?

Same questions re: Internet Explorer (or user's default browser).

I want to open the user's default web browser with the specified HTML file, but can't get it to work correctly.

5. This works - brings up a maximized IE screen containing the specified file:


Code:


[font=lucida console]start /max "%programfiles%\internet explorer\iexplore" "%userprofile%\documents\test1.html"[/font]

6. This simply brings up a MAXimized CMD screen - no IE or other browser:


Code:


[font=lucida console]start /max "%userprofile%\documents\test1.html"[/font]

How can I code my batch script to open the HTML file using the user's default web browser app?

Thanks,

John


----------



## Squashman

*Re: Batch - Open IE or Notepad Full Screen*

The START command thinks the first set of quotes is the TITLE.
I always make a habit of using an empty quoted string with the START command.


Code:


start "" "ES DM Stand Name.xls"
start "" "foo.txt"
start "" /MAX "foo.txt"


----------



## jcgriff2

*Re: Batch - Open IE or Notepad Full Screen*



Squashman said:


> The START command thinks the first set of quotes is the TITLE.
> I always make a habit of using an empty quoted string with the START command.
> 
> 
> Code:
> 
> 
> start "" "ES DM Stand Name.xls"
> start "" "foo.txt"
> start "" /MAX "foo.txt"


You are a life-savor!!! :thumb:

I just tried:


Code:


[font=lucida console]start "" /max "%temp%\memorychip.html"[/font]

... and it worked perfectly by opening up the file in IE (my default web browser).


I could not understand in the least why this opened up a new & blank max CMD screen:


Code:


[font=lucida console]start /max %temp%\memorychip.html"[/font]

Believe it or not, I had actually resorted to:


Code:


[font=lucida console]start /max "%programfiles%\internet explorer\iexplore"[/font]

It was the only way I could get it to work. But that of course forced the use of IE v. the user's default web browser.


----------

