自动在Windows 7登录时运行一个脚本蝙蝠 [英] auto run a bat script in windows 7 at login

查看:226
本文介绍了自动在Windows 7登录时运行一个脚本蝙蝠的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近获得了Windows 7的笔记本电脑从我的祖母晚。
我一直在使用它的工作和其他事情。我决定创建使用VirtualBox虚拟机,现在我想,这样当我登录到该用户就自动运行一个.BAT脚本启动虚拟机创建的(Windows 7的主机)用户机器。要清楚,我只希望它运行只有在用户VM的日志,而不是我的普通用户,这将是超真棒,如果它会在全屏自动启动。我有我的桌面上的快捷方式执行该命令:

 C:\\ Program Files文件\\ ORACLE \\ VirtualBox的\\ VirtualBox.exe--commentVM--startvm12dada4d- 9cfd-4aa7-8353-20b4e455b3fa

但如何使一个autorun.bat,当我登录到用户VM?


解决方案

要运行该批处理文件时,在 VM 用户登录:

拖动快捷方式 - 一个最目前在桌面上 - (或批处理文件本身)开始 - 所有程序 - 启动。现在,当你登录的用户,将推出该批处理文件。

另一种方式做同样的事情是保存在%APPDATA%\\微软\\ WINDOWS \\开始菜单\\程序\\启动\\ 。<快捷方式或批处理文件/ p>

至于得到它全屏运行,这取决于一点你的意思。你可以把它推出通过编辑您的批处理文件这样的最大化:

 启动/ MAXC:\\ Program Files文件\\ ORACLE \\ VirtualBox的\\ VirtualBox.exe--commentVM--startvm12dada4d-9cfd-4aa7-8353- 20b4e455b3fa

但如果VirtualBox的有一个真正的全屏模式(它甚至隐藏任务栏),你必须寻找在VirtualBox.exe一个命令行参数。我不熟悉的产品。

I have recently acquired a windows 7 laptop from my late grandmother. I have been using it for work and other things. I decided to create a VM using VirtualBox And now I want to create a user on the (Windows 7 Host) machine so that when I log into that user it autoruns a .bat script to start the VM. To make it clear I only want to run it only if the user "VM" logs in and not my normal user and it would be super awesome if it would autostart in full screen. I have a shortcut on my desktop that executes the command:

"C:\Program Files\Oracle\VirtualBox\VirtualBox.exe" --comment "VM" --startvm "12dada4d-    9cfd-4aa7-8353-20b4e455b3fa"

but how do I make an autorun.bat when I log into the User "VM"?

解决方案

To run the batch file when the VM user logs in:

Drag the shortcut--the one that's currently on your desktop--(or the batch file itself) to Start - All Programs - Startup. Now when you login as that user, it will launch the batch file.

Another way to do the same thing is to save the shortcut or the batch file in %AppData%\Microsoft\Windows\Start Menu\Programs\Startup\.

As far as getting it to run full screen, it depends a bit what you mean. You can have it launch maximized by editing your batch file like this:

start "" /max "C:\Program Files\Oracle\VirtualBox\VirtualBox.exe" --comment "VM" --startvm "12dada4d-9cfd-4aa7-8353-20b4e455b3fa"

But if VirtualBox has a truly full-screen mode (where it hides even the taskbar), you'll have to look for a command-line parameter on VirtualBox.exe. I'm not familiar with that product.

这篇关于自动在Windows 7登录时运行一个脚本蝙蝠的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆