PC启动后启动VBS脚本 [英] launch VBS script after PC startup
问题描述
我想在 PC 启动 (Win XP) 后启动我的简单 VBS 脚本.我不想把这个脚本放在 C:\Documents and Settings\%UserName%\Start Menu\Programs\Startup
I want launch my simple VBS script after PC startup (Win XP). I don't want put this script in C:\Documents and Settings\%UserName%\Start Menu\Programs\Startup
我想用脚本来做,可以吗?
I want do it in script, it is possible?
Script:<br>
Dim oShell<br>
Set oShell = WScript.CreateObject ("WScript.Shell")<br>
oShell.run "notepad.exe c:\text.txt"
推荐答案
您要么必须将它放在启动文件夹中,要么从注册表中运行它.
You will either have to put it in the Startup folder or run it from the registry.
对于所有用户,使用注册表项 HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
.
For all users, use registry key HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
.
对于当前用户,使用注册表项HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
For the current user, use registry key HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
这篇关于PC启动后启动VBS脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!