I have the following AHK script in my startup folder, there's also a few shortcuts before this, they work but this bit doesn't, any idea why I can't startup my dev environment on windows startup?
; if conemu's not running, start vagrant & cmder (conemu) on startup (or script re-start)
Process,Exist,ConEmu.exe
{
If !errorlevel
{
RunWait "%comspec% /C vagrant up", C:\vagrant\ubuntu, Hide,
Run "C:\cmder\Cmder.exe", "", Max
return
} else {
return
}
}
According to what I've read elsewhere, this is how it's done & I'm not sure why it doesn't work
EDIT: I've moved my code as suggested by @user3419297 below, it works better now, but it still doesn't work as expected. I get the following error:
Error: Failed attempt to launch program or document:
Action: <C:\WINDOWS\system32\cmd.exe /C vagrant up>
Params: <>
Specifically: The system cannot find the file specified
which is referencing RunWait "%comspec% /C vagrant up", C:\vagrant\ubuntu, Hide,
How would I run the vagrant up
command in the correct folder using cmd.exe
?