Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 08-04-2008, 05:59 PM   #1 (permalink)
 
Newb Techie

Join Date: Aug 2008

Location: Pittsburgh, PA

Posts: 2

JohnAlpha is on a distinguished road

Send a message via AIM to JohnAlpha
Default VBScript in RunOnce Key

I'm having some issues setting a .vbs file in the RunOnce registry key through a .reg file. My goal is to set a few scripts to do some configuration on new installations, but while trying to test things out today I realized I couldn't seem to set the values I needed. Here is a basic test .reg file I made:

Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]
"Test"="This is a test."
"Script"="C:\test.vbs"
The Test value is created and set but the Script value is not. I noticed that this occurs anywhere in the registry, not just for the RunOnce key. However, if I manually go into the registry, make a new string, and then set the value to "C:\test.vbs" (or even something like "cscript C:\test.vbs"), it will set correctly. Furthermore, it actually functions, since any test scripts I tried would launch after a reboot.

Is this just some sort of convention I didn't know about that you can't use a .reg file to add scripts to run? I tried using Google, but I couldn't really find any information on this. If anyone could shed some light on this for me, I would really appreciate it.
JohnAlpha is offline  
Old 08-04-2008, 06:12 PM   #2 (permalink)
mikesgroovin's Avatar
 
HONK if you route packets

Join Date: Sep 2003

Posts: 4,664

mikesgroovin will become famous soon enoughmikesgroovin will become famous soon enough

Default Re: VBScript in RunOnce Key

your path needs one more "\"

like C:\\whateverpath\\whateverfile.vbs
__________________
A+, Net+, Sec+, Server+, Linux+, MOUS(2000 & '03), MCSE, MCSA, MCT, CNA, CCNA, CCDA, CCNP, CCSP
mikesgroovin is offline  
Old 08-04-2008, 06:46 PM   #3 (permalink)
 
Newb Techie

Join Date: Aug 2008

Location: Pittsburgh, PA

Posts: 2

JohnAlpha is on a distinguished road

Send a message via AIM to JohnAlpha
Default Re: VBScript in RunOnce Key

Awesome, thank you!

Is there any particular reason why you have to use the double backslash for the file path when working in the registry? I'm just curious.
JohnAlpha is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need steps for getting rid of SystemDefender.exe Trotter Virus - Spyware Protection / Detection 16 04-07-2008 06:57 PM
friends really bad log..needs some major help here. Static_11 HijackThis Logs (finished) 17 12-07-2007 09:44 AM
Virus Detected Yesterday mokarr HijackThis Logs (finished) 5 10-22-2007 11:03 AM