1.

Solve : MS-DOS Switches?

Answer»

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.

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.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.
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.



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.

Dusty,
You are the man! It worked PERFECTLY. Thanks again for your help. I owe you one.You're welcome.

Thanks for coming back with your result.


Discussion

No Comment Found