• 0

Batch File to run .VBS on startup


Question

I want to run a xxx.vbs script on startup. How do i make a batch file which will run the .vbs file on startup ( every time i boot into windows)

I just cant add the shortcut to .VBS to startup because I want to run the xx.vbs and give a certain value after it ...

example in the run command i would type

c:\xxx.vbs 1234567890

If i just run the .VBS i will get an error saying cant run without the argument. So i need a batch file which will run

c:\xxx.vbs 1234567890

Link to comment
https://www.neowin.net/forum/topic/438621-batch-file-to-run-vbs-on-startup/
Share on other sites

8 answers to this question

Recommended Posts

  • 0

You could do this:

Create batch file:

startit.bat

@echo off
start c:\xxx.vbs 1234567890

Then create .reg file and merge it to your registry:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
"My VBS Script"="C:\\my scripts\\startit.bat"

Quick'n'dirty. :)

  • 0
  Wilhelmus said:

You could do this:

Create batch file:

startit.bat

@echo off
start c:\xxx.vbs 1234567890

Then create .reg file and merge it to your registry:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
"My VBS Script"="C:\\my scripts\\startit.bat"

Quick'n'dirty. :)

Lose the batch file. It's not needed. (Besides, you get a black window as a result of using it)

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]

"My VBS Script"="C:\\myscript.vbs"

or

"My VBS Script"="wscript.exe C:\\myscript.vbs"

or place a shortcut to your VBS file in the Startup folder.

  • 0
  On 03/03/2006 at 13:39, Wilhelmus said:

You could do this:

Create batch file:

startit.bat

@echo off
start c:\xxx.vbs 1234567890

Then create .reg file and merge it to your registry:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
"My VBS Script"="C:\\my scripts\\startit.bat"

Quick'n'dirty?. smile.gif

This was the last key to my puzzle, in which I was trying to use a vbs script to set a default login on a Windows 7 machine on a domain. My script wasn't working via a local GPO but your solution nailed it.

Thanks!

Tom

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Jony Ive is reportedly working on multiple AI devices for OpenAI, including a mobile gadget by Hamid Ganji Last month, OpenAI announced acquiring Jony Ive's startup, io, in a $6.5 billion deal. Ive, who served as Apple's design chief for over two decades, moved to OpenAI to work on the company's AI hardware projects. While the details of these projects have remained relatively untold, Mark Gurman's Power On newsletter revealed some exciting insights about Jony Ive's work at OpenAI. According to Gurman, Apple's former design chief is now spearheading a series of groundbreaking AI hardware products for OpenAI. One of these under-development devices is described as a "mobile gadget" that takes the form of a "pendant" and can be worn around the neck. This device could allegedly allow users to access ChatGPT with voice commands. Another of Ive's works at OpenAI is a home device that functions similarly to a smart speaker. Users can put the device on a table and perform various tasks using OpenAI's ChatGPT. Interestingly, OpenAI also has a robot device under development. As Gurman says, this robot "will likely be a machine that develops a relationship with a human using AI." However, OpenAI's robot is still far from being made available on the market. After acquiring Jony Ive's startup, OpenAI CEO Sam Altman described Ive as the best designer in the world, adding that they can now work on the next generation of AI-powered computers. More details about OpenAI-Ive hardware products could emerge over the next few months. OpenAI was already rumored to be working on a mysterious AI gadget, presumably a screenless AI phone, which might be the same mobile gadget that Gurman revealed. While details of this alleged AI mobile are yet unknown, such a device could pose an alternative to conventional smartphones, raising the alarm for smartphone makers such as Apple, Samsung, and Google. Meanwhile, Apple might already be expecting such a device, as its services chief Eddy Cue allegedly said during his testimony at Google's antitrust case that iPhones might no longer exist 10 years from now.
    • Seems Nintendo have already thought of that after the Joy-Con drift in the Switch 2 EULA: Clause 16 of the EULA reads: "This arbitration provision precludes you and Nintendo from suing in court, having a trial by jury, or participating in a class action. You and Nintendo agree that arbitration will be solely on an individual basis and not as a class arbitration, class action, or any other kind of representative proceeding. You and Nintendo are each waiving the right to trial by a jury."
    • Cool glass phone you have in that silicon case bro
    • I can't say I ever noticed an OEM putting effort into user-friendly descriptions and icons who didn't also put effort into making good drivers. Usually, missing icons and descriptions was also a sign of bad drivers.
  • Recent Achievements

    • First Post
      brynmot earned a badge
      First Post
    • Reacting Well
      brynmot earned a badge
      Reacting Well
    • Week One Done
      Al_ earned a badge
      Week One Done
    • Week One Done
      MadMung0 earned a badge
      Week One Done
    • Reacting Well
      BlakeBringer earned a badge
      Reacting Well
  • Popular Contributors

    1. 1
      +primortal
      478
    2. 2
      +FloatingFatMan
      274
    3. 3
      ATLien_0
      243
    4. 4
      snowy owl
      209
    5. 5
      Edouard
      182
  • Tell a friend

    Love Neowin? Tell a friend!