2

Each day when I get to work I have to start a bunch of programs and this can take ten minutes or more to do so I was wanting to automate the process by writing a batch file to open everything for me.

So far I've got IE & Outlook to launch fine using:

start /d "C:\Program Files (x86)\Internet Explorer\iexplore.exe" iexplore.exe
start /d "C:\Program Files (x86)\Microsoft Office\Office14\OUTLOOK.EXE" Outlook

However I also need to launch an instance of IE in my admin account & trying:

start runas /profile /savecred /user:!ofnn "C:\Program Files (x86)\Internet Explorer\iexplore.exe" 

iexplore.exe which I found on another question here does nothing. IE doesn't open & I don't see the UAC prompt that I'm expecting so I can enter my password.

Also regarding IE & bearing in mind I can't change the default home page settings due to corporate restrictions is it possible to specify a list of urls in the batch script for IE to open? I would have 7 in the regular IE & another 6 in the admin instance.

ProGM
  • 6,949
  • 4
  • 33
  • 52
Nathaniel
  • 307
  • 2
  • 9

1 Answers1

0

Why using a batch file to just start applications on Windows start?

It is much easier to put shortcuts (*.lnk) files into the Startup folder of the Windows start menu. Every user account has its own Startup folder in its start menu folder.

Create a shortcut to outlook.exe in your Startup folder and Windows will start Outlook after you logged in, except you hold SHIFT after login which Windows recognizes and interprets as ignoring the shortcuts in the Startup folder.

IE Command-Line Options documents the command line options of Internet Explorer. See How to open multiple tabs in IE8 from the command prompt? containing the solution to open multiple URLs tabbed in Internet Explorer using a Visual Basic script. The shortcut in the Startup folder is a link to wscript.exe with the script file as parameter.

Community
  • 1
  • 1
Mofi
  • 46,139
  • 17
  • 80
  • 143
  • We move between machines semi regularly but our personal network drive always stays the same. So having a bat file means I can link to that from the startup folder which will take 5 seconds and everything will work the same on the new machine. Also I have 4 (at least) programs that require admin rights to start. I believe with a bat file I can simple enter the details once and they will all start whereas I'm guessing it would require credentials for each shortcut in windows startup folder – Nathaniel Jun 23 '14 at 07:06