[sdw2003] Help creating a script

Néstor rotsen at gmail.com
Mon Nov 9 09:23:01 PST 2009


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 :-)


More information about the sdw2003 mailing list