batch start programs and hit enter in windows 7

batch-file, uac, vbscript, windows-7-x64

Solution

- You don't need to send enter key. Start the Tunnelier specifying `-profile` and `-loginOnStartup`, this also means you don't need VBScript script anymore.

C:\Program Files (x86)\Bitvise Tunnelier\Tunnelier.exe -profile=profile_file.path -loginOnStartup

Also check out : http://www.bitvise.com/files/tunnelier-params.txt

- To get rid of UAC for wampmanager, you can use Runas. It prompts password for every call but not with /savecred parameter, however you have to enter the password for once.

Finally, your script could be something like that:

start /d "C:\eclipse" eclipse.exe
start /d "C:\Program Files (x86)\Pidgin" pidgin.exe
start runas /profile /savecred /user:Administrator "c:\wamp\wampmanager.exe"
start /d "C:\Program Files (x86)\Bitvise Tunnelier" Tunnelier.exe -profile=profile_file.path -loginOnStartup

Problem

I have 4 programs I frequently open when I'm doing development. I didn't feel like actually doing some development one evening so I wrote this script: test.bat ``` start /d "C:\eclipse" eclipse.exe start /d "C:\Program Files (x86)\Pidgin" pidgin.exe start /d "C:\wamp" wampmanager.exe start /wait /d "E:\websites\scripts" tunnelier.vbs ``` tunnelier.vbs ``` Set WshShell = WScript.CreateObject("WScript.Shell") WshShell.Run """C:\Program Files (x86)\Bitvise Tunnelier\Tunnelier.exe""" WshShell.AppActivate "Tunnelier" WshShell.SendKeys "{ENTER}" ``` and I'm finding that it successfully opens all of the programs, but there are two problems. - The enter key is not being sent while tunnelier is the active window (it doesn't login.) If I just run tunnelier.vbs it works fine, but in the batch file it doesn't work. - wampmanager.exe must have an odd manifest file because windows is giving me that annoying and long-winded "do you want to allow the following program from an unknown publisher to make changes to your computer" prompt. So my question is twofold; - How can I make the enter key register in the proper window? - How can I get rid of the unknown publisher UAC prompt? I've tried to research both topics and have failed, so any help is very appreciated!

Original source

Related problems