Home / Microsoft / Microsoft DOS / MS-DOS Switches
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] - (Bottom) Print
Author Topic: MS-DOS Switches  (Read 1004 times)
sickboy49
Topic Starter
Starter



Posts: 4


« on: November 28, 2007, 12:19:13 PM »

I am new to this forum, and I am hoping I am posting this topic in the correct spot.  I am having an issue that I am unfamiliar with.   I am creating a batch file for a group policy, so when a user logs onto the network a certain program will run. 

Currently the users have to click a shortcut on there desktops after they log onto the network in order to start this program.  I am running into an issue starting this program from a batch file which is confounding me. 

The path in the batch file is S:MITC2000\T-Tracs\CLKINOUT.EXE S "SC"

The problem lies within the S after the .EXE.   I have no idea what this S is doing except for the fact it is pointing to another directory "SC".  But the executable is looking for files in the on C: instead of the SC directory.

This is a shot in the dark but could anyone help me with this "S".   Thanks in advance.

IP logged
Dusty
Egghead



Thanked: 72
Posts: 3,387

Experience: Beginner
OS: Windows XP


I could if she would, but she won't so I don't.

« Reply #1 on: November 28, 2007, 11:46:15 PM »

Quote
The path in the batch file is S:MITC2000\T-Tracs\CLKINOUT.EXE S "SC"

Here's another shot-in-the-dark 'cos you haven't even said what Operating System you are using!!!!  Will assume XP in one of its variants.

The path quoted just has to be wrong as /\ : * ? " < > and | are not valid in filenames.  So, if your default directory is C:, then that is where subdirectories/files will be sought. 

Suggest your path should have a \ after S: so that the path is S:\MITC2000\T-Tracs\CLKINOUT.EXE S "SC"    What the S "SC" parameters for clkinout.exe do will be explained in that program's documentation.

Good luck.

Edit:  Oh, welcome to the CH forums.
« Last Edit: November 29, 2007, 02:23:50 AM by Dusty » IP logged

One good deed is worth more than a year of good intentions.
sickboy49
Topic Starter
Starter



Posts: 4


« Reply #2 on: November 29, 2007, 07:21:10 AM »

Dusty,
I do apologize for the lack of info.  Yes, you were correct in assuming that the OS was XP, actually professionel.  In the original post I did post a syntax error in the path.   Thanks for correcting me.

To give you a little more background on this issue:  I am trying to write a batch file that can be used in the group policy of the active directory, so at logon this program will automatically start when the user logs onto the network.  Right now they use a shortcut icon on there desktop to open this software.  By the way all of our workstations are XP Professional, and our servers are 2003.  The program is located on the S: drive, which is network drive, and is mapped at user logon.   The shortcut icon that the users now use have this information in it:   Target: S:\MITC2000\T-TRACS\CLKINOUT.EXE S "SC" and START IN: S:\MITC2000\T-TRACS.   

I found in the documentation to the software that the S in the Target area directs the CLKINOUT.EXE to our database files in the SC directory.  This is the part that I can't figure out.   It seems that in the batch file it will not direct the executable to the SC directory.  When I do run the batch it executes but then loses the SC directory location and trys to find the database files in whatever default directory it can.  Example: if I run the batch from My Document folder on my workstation it will look in
My Documents for the SC directory instead of on the S:\ drive.  Even though the executable is running from the S:\ drive.  Any Ideas?

Thanks for the welcome.  I can tell that I will be using, and hopefully giving advice alot on this forum.
IP logged
Dusty
Egghead



Thanked: 72
Posts: 3,387

Experience: Beginner
OS: Windows XP


I could if she would, but she won't so I don't.

« Reply #3 on: November 29, 2007, 03:22:44 PM »

I will probably not be of much help with your problem as I'm not at all familiar with Clkinout.exe but...

Quote
Example: if I run the batch from My Document folder on my workstation it will look in My Documents for the SC directory instead of on the S:\ drive.  Even though the executable is running from the S:\ drive.

The OS default drive is not affected by where you run the executable from and will remain as C: or C:\My Documents etc..   Seems to me that the S switch in Clkinout.exe is not working or its format is wrong.

Can you change the OS default to S: without affecting the operation?  Such as your bat file could be:

S:
CD MITC2000\T-TRACS
CLKINOUT.EXE S "SC"


The default is now S:\MITC2000\T-TRACS and the .exe is run from there.

After program execution the default could be changed back to whatever using another CD command if required.

In the shortcut currently used START IN: S:\MITC2000\T-TRACS does the same job as the CD command shown in the proposed file.



IP logged

One good deed is worth more than a year of good intentions.
sickboy49
Topic Starter
Starter



Posts: 4


« Reply #4 on: November 30, 2007, 06:52:21 AM »

Dusty,
Thanks for the suggestion.  I will try that today, and let you know the results.  I think you may have solved the problem.  I was trying to figure out how/why the .exe was looking on C:.  Thanks again.

IP logged
sickboy49
Topic Starter
Starter



Posts: 4


« Reply #5 on: November 30, 2007, 07:20:08 AM »

Dusty,
You are the man!  It worked perfectly.  Thanks again for your help.  I owe you one.
IP logged
Dusty
Egghead



Thanked: 72
Posts: 3,387

Experience: Beginner
OS: Windows XP


I could if she would, but she won't so I don't.

« Reply #6 on: November 30, 2007, 11:47:30 AM »

You're welcome.

Thanks for coming back with your result.
IP logged

One good deed is worth more than a year of good intentions.
Pages: [1] - (Top) Print 
Home / Microsoft / Microsoft DOS / MS-DOS Switches « previous next »
 


Login with username, password and session length

Old Forum Search | Forum Rules
Copyright © 2010 Computer Hope ® All rights reserved.
Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
Page created in 0.105 seconds with 20 queries.