FW: [sdw2003] Help creating a script

Janis Legzdins janisl at netzero.net
Sat Nov 14 14:10:20 PST 2009


Nestor,

 

Simple command to change drives is:

cd d:

 

Try that from command line H: drive.

 

Regards,

Janis

 

From: Néstor [mailto:rotsen at gmail.com] 
Sent: Friday, November 13, 2009 9:43 AM
To: Janis Legzdins; San Diego Windows 2003 User Group
Subject: Re: FW: [sdw2003] Help creating a script

 

Janis,

Thanks for your reply!!!

The command works from the D drive command line, my default drive is the H
drive.  
>From the H drive the command does not work.

How do I tell windows to change to the D drive before running the command?

Thanks,

Néstor :-)

2009/11/12 Janis Legzdins <janisl at netzero.net>

Nestor,


1. check if Java is set as env variable in cmd
Path

then
java -version
if no response then you need to set it

2. After java path set try to run the same thing from the command line and
see if it works.

Regards,
Janis

-----Original Message-----
From: sdw2003-bounces at mattware.com [mailto:sdw2003-bounces at mattware.com] On
Behalf Of Néstor
Sent: Monday, November 09, 2009 9:23 AM
To: San Diego Windows 2003 User Group
Subject: [sdw2003] Help creating a script

I want to create a script that runs a java command at boot.   I was told
that I need to add the script  to my "Scheduled Tasks".
This is the command I want to be run when the machine boots
java -jar D:\Inetpub\wwwroot\apache-solr-nightly\example\start.jar

I created a script start_solr.bat to do the following:
cd "D:\Inetpub\wwwroot\apache-solr-nightly\example\"
java -jar D:\Inetpub\wwwroot\apache-solr-nightly\example\start.jar

But my script FAILS because it does not know anything about the D drive
when I create the start_solr.bat script as follows:
d:
cd "D:\Inetpub\wwwroot\apache-solr-nightly\example\"
java -jar D:\Inetpub\wwwroot\apache-solr-nightly\example\start.jar

FAILS again!  It does not know what "d:" means.   How do I tell the script
to switch to the D drive

*What is the proper way to run my java command via a script or how
do I tell the script that it need to be on the D drive before it runs
the java command.*

Thanks,

Néstor :-)
_______________________________________________
sdw2003 mailing list
sdw2003 at mattware.com
http://lists.mattware.com/mailman/listinfo/sdw2003

____________________________________________________________
"Shoot" into a New Career
Film Degrees, in front & behind the camera at New York Film Academy
http://thirdpartyoffers.netzero.net/TGL2241/c?cp=ODcnN6l7OSGddHFkT6MjXwAAJ1F
qLY0OSK4a_fS4zwkmw1iAAAQAAAAFAAAAANNNYj4AAAMlAAAAAAAAAAAAAAAAABSFZgAAAAA=

 



More information about the sdw2003 mailing list