Re: Writing a Floppy disk applet

  • From: "TJ McElroy" <raider.59@xxxxxxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Tue, 12 Feb 2008 06:19:25 -0500


Yes it is possible.

I pasted a copy of a windows scripting file (wsf) written in jscript, that I 
use to perform maintenance on a weekly basis.

I chose the windows scripting host because I could not get the windows start 
command to wait for one program to finish before it launched the next program.
I could however get the wsh run command to do what I wanted.

The documentation on the start command says that there is a /wait switch, but I 
can not get it to work correctly so I went with the wsh run command.

to launch the wsh file:
type: cscript filename.wsf

I launch the pasted wsh file using a msdos batch file:

@echo off
rem run clean_up.wsf
cscript c:\bats\clean_up.wsf

once the wsf file is created to your liking, you can copy it to a cd-rom and 
use a autorun.inf to launch the script file.

That way you can just insert the cd-rom and walk away.



- - - attached clean_up.wsh file - - -

<job id="">
<comment> </comment>
<script id="" language="JScript">
// define batch files to run
var easyCleaner = "c:\\bats\\easy_cln.bat";
var crapCleaner = "c:\\bats\\ccleaner.bat";
var reg_cleaner = "c:\\bats\\regclean.bat";
var clear_logs = "c:\\bats\\clr_logs.bat";
var sort_menu = "c:\\bats\\sortmenu.bat";
var all_done = "c:\\tools\\wav.exe c:\\sounds\\tngchime.wav";

var myShell = new ActiveXObject("WScript.Shell");
// myShell.Run(myPath, 1, true);

myShell.Run(easyCleaner,1,  true);
myShell.Run(crapCleaner, 1, true);
myShell.Run(reg_cleaner, 1, true);
myShell.Run(clear_logs, 1, true);
myShell.Run(sort_menu, 1, true);
myShell.Run(all_done, 1, true);
message("clean_up.wsf all done.", 1);

function message(in_string, WAIT) {
var WshShell = WScript.CreateObject("WScript.Shell");
var m_title = "Movefile Master Message";
var m_waitTime = WAIT; // zero equals forever 10 equals 10 seconds ect.
var m_string = in_string;
var BtnCode = WshShell.Popup(m_string, m_waitTime, m_title, 1 + 64);
// WScript.Echo("BtnCode = " + BtnCode);

switch (BtnCode) {
case 1:
// ok was pressed.
case 2:
// escape was pressed.
WScript.Quit (1); 
case -1:
// time has elapsed
// WScript.Echo("Time has elapsed.");
} // end switch
} // end message 


- - - end clean_up.wsh - - -

  ----- Original Message ----- 
  From: Matthew2007 
  To: programmingblind@xxxxxxxxxxxxx 
  Sent: Tuesday, February 12, 2008 2:33 AM
  Subject: Writing a Floppy disk applet

  Hi all,

  I'm wondering if it is possible to write a type of batch file or type of 
  applet that can run off of a floppy disk that will instruct an OS to run a 
  whole bunch of procedures without my being around. to be a little more 
  precise, in an effort to eliminate some of the repetition in my daily 
  routine, I want to walk into my office, place a floppy into my computer, and 
  as it starts, I want the computer to run all the instructions within the 
  floppy. If I have a theoretical 50 pages to scan, I want to place the floppy 
  with instructions to launch K1000 or any other scanning app, use the 
  automatic document feeder to scan my paperwork, save the scanned files with 
  a specific name, then have the files backed up to an external hard drive 
  which I carry around. In other words, I pretty much want to automate lots of 
  daily procedures without having to sit at my keyboard.

  Absolutely, any, any and all suggestions will be greatly, greatly 
  appreciated as this is a kinda serious request for list feedback,


  View the list's information and change your settings at

Other related posts: