Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Need Help Creating A Script


  • Please log in to reply
6 replies to this topic

#1 Damaru

Damaru

  • Members
  • 68 posts
  • OFFLINE
  •  
  • Local time:04:40 PM

Posted 01 January 2008 - 01:09 AM

I would like to create a script that adds a dozen or so entries to the Run box's most recently used list each time I start my computer up...

Can anybody point me to an online resource that will teach me how to do this?

Edited by Damaru, 01 January 2008 - 02:20 AM.


BC AdBot (Login to Remove)

 


m

#2 Tomo2

Tomo2

  • Members
  • 402 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Wanganui, Aotearoa NZ
  • Local time:12:40 PM

Posted 01 January 2008 - 07:28 PM

To add items to the drop down list in the run dialog you have to successfully execute them first, but you can create a script that opens the run dialog and enters a certain command to execute. I have no programming knowledge at all so I use AutoIt v3 to make scripts. It can also compile GUIs. http://www.autoitscript.com/autoit3/ :thumbsup:

L&P, World Famous in New Zealand since ages ago!
Posted Image
Avast! Antivirus : Spybot S&D : Trend Micro Housecall : Hosts file : HiJack This
Don't be too open minded - your brains will fall out


#3 Andrew

Andrew

    Bleepin' Night Watchman


  • Moderator
  • 8,250 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Location:Right behind you
  • Local time:04:40 PM

Posted 03 January 2008 - 04:50 AM

The MRU list for the Run box is located at
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU

There are 27 keys in that registry folder, all string values, labeled a through z and one labelled MRUlist.

Here's how it all works:

The a through z values are the actual commands that were typed in (with "\1" tacked on the end, but I don't know why). The runMRU list can only contain 26 entries corresponding to the 26 letters of the alphabet.

the MRUlist value contains a string of 26 letters representing the order of the MRUlist by the last command issued.

The script you will want to write should replace one or more of the lettered values with the entry you want (with the "/1" at the end). I would recommend leaving the MRUlist value alone, though; let Windows handle that.

Pretty much any scripting language that can access the registry will work. If it were me, I'd probably use a batch file and stick it in my Startup folder.

Feel free to ask if you have any questions. And, as always, backup your registry before tinkering!! No one has ever said "gee, I really wish I hadn't backed up my registry"

#4 Damaru

Damaru
  • Topic Starter

  • Members
  • 68 posts
  • OFFLINE
  •  
  • Local time:04:40 PM

Posted 04 January 2008 - 09:20 AM

Hi Andrew,

Thanks a lot for that wonderfully elucidating response!

Even though I'm a total newcomer to this subject, everything you said makes perfect sense to me.

Looks like I've got my work cut out for me, heh :thumbsup:

Edited by Damaru, 04 January 2008 - 11:11 AM.


#5 Andrew

Andrew

    Bleepin' Night Watchman


  • Moderator
  • 8,250 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Location:Right behind you
  • Local time:04:40 PM

Posted 04 January 2008 - 01:44 PM

Glad to help! It occurred to me that all you may need to do is create a .reg file with the desired info and have it run at startup. I've never tried this so I don't know whether Windows will react nicely, but I don't see why it wouldn't.

#6 steev12

steev12

  • Members
  • 1 posts
  • OFFLINE
  •  
  • Local time:07:40 PM

Posted 05 February 2008 - 02:36 AM

Does this link help?

http://quick-help.net/Creating-A-Script

#7 ActiveX

ActiveX

  • Members
  • 14 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:SECRET
  • Local time:07:40 PM

Posted 15 February 2008 - 12:34 PM

Well what kind of script are you trying to make??

Is it a windows script? if so i will give u simple directions

First, Create a new text document. You can do this by right clicking on the desktop, selecting new, and clicking "New Text Document".

Next you will have to edit this file, Right click on the-now on your desktop "New Text Document- and click "Edit".

This will open the document.

This is a basic script that will execute when you double click on the icon:

Microsoft=msgbox ("message",0,"message")

Now "0" is just a number that is used to answere the script, these numbers range from 0-99.

Now save this file as a script document.

CLick "File", Save As, and then save it as a (desired name here).vbs

You must type ".vbs" ( dont put quotes)

Then you may double click it, and it will be a script.

Thank You,

ActiveX




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users