execute command from windows batch file

cmd.exe /K ""C:\Program Files\exeNameHere.exe" paramsHere"

/C Carries out the command specified by string and then terminates
/K Carries out the command specified by string but remains

Use: cmd /? to see cmd help command

Advertisements

Alterar DNS no DOS

1 – Abra o prompt de comando DOS como Administrador

2 – Veja o nome das interfaces de rede

netsh interface show interface

3 – Defina o DNS primário e secundário(opcional)

netsh interface ip add dns name="interface-name-here" addr=8.8.8.8 index=1
netsh interface ip add dns name="interface-name-here" addr=8.8.4.4 index=2

4 – Atualize as configurações de DNS das interfaces de rede

ipconfig /flushdns

Criar Máquina Virtual com VirtualBox + Instalação RDP

Instale o VirtualBox e o VirtualBox Extension Pack em: http://virtualbox.org

VBoxManage createvm --name "Windows XP" --ostype WindowsXP --register
VBoxManage createhd --filename "Windows_XP.vdi" --size 5000
VBoxManage storagectl "Windows XP" --name "IDE Controller" --add ide --controller PIIX4
VBoxManage storageattach "Windows XP" --storagectl "IDE Controller" --port 0 --device 0 --type hdd --medium "Windows_XP.vdi"
VBoxManage storageattach "Windows XP" --storagectl "IDE Controller" --port 0 --device 1 --type dvddrive --medium  /full/path/to/iso.iso
VBoxHeadless --startvm "Windows XP" &
rdesktop -g 90% IP

fonte: http://www.virtualbox.org/manual/ch07.html