LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-30-2003, 12:24 PM   #31
scottpioso
Member
 
Registered: Jan 2003
Location: United States of America and damn proud of it!
Distribution: Windows 10 prior Red Hat User
Posts: 473

Original Poster
Rep: Reputation: 30

Okay, I'm doing that, and all that happens is a blank command windows opening up with a c: prompt

This is the batch file:

cmd

s:

cd NortonDefs

rename s://x/x/x/x/x.exe x.old

and the results:

C:\>cmd
Microsoft Windows 2000 [Version 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.

Last edited by scottpioso; 11-30-2003 at 12:31 PM.
 
Old 11-30-2003, 12:35 PM   #32
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
you don't need the s: or the cd nortondefs. You just need the:
cmd
rename s:\\nortondefs\*.exe *.old
exit
 
Old 11-30-2003, 12:41 PM   #33
scottpioso
Member
 
Registered: Jan 2003
Location: United States of America and damn proud of it!
Distribution: Windows 10 prior Red Hat User
Posts: 473

Original Poster
Rep: Reputation: 30
as before, when I run it, all that happens is a blank command window that opens. I took the exit out to see what the results would be so what is going on? Again, here it is the file as you specified:

cmd

ren s:\\nortondefs\*.exe *.old

and when it is run:

-----------------------------------------------------------------------

C:\>cmd
Microsoft Windows 2000 [Version 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.

C:\>

Last edited by scottpioso; 11-30-2003 at 12:42 PM.
 
Old 11-30-2003, 12:44 PM   #34
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
OK

Take out the command (and you don't need to have a line between each command).
 
Old 11-30-2003, 12:47 PM   #35
scottpioso
Member
 
Registered: Jan 2003
Location: United States of America and damn proud of it!
Distribution: Windows 10 prior Red Hat User
Posts: 473

Original Poster
Rep: Reputation: 30
ok, that worked fine. Now, onto the next project. To get the new file to download and install with no user interaction.

Last edited by scottpioso; 11-30-2003 at 12:49 PM.
 
Old 11-30-2003, 01:08 PM   #36
scottpioso
Member
 
Registered: Jan 2003
Location: United States of America and damn proud of it!
Distribution: Windows 10 prior Red Hat User
Posts: 473

Original Poster
Rep: Reputation: 30
To do this, could I just simply issue the command directly in the batch file? For example, since I'm already in the directory in which I'm downloading from, could I just issue the command to install the new file? So, basically, just type *.exe? Somehow I don't think so, but what do I do here?
 
Old 11-30-2003, 01:19 PM   #37
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
So you're thinking of just having one batch file?

I'm not sure about that - since you're having multiple desktops accessing one file in one location, you'd end up with the first box to complete doing whatever to the update file and the rest not being able to use it.
 
Old 11-30-2003, 01:25 PM   #38
scottpioso
Member
 
Registered: Jan 2003
Location: United States of America and damn proud of it!
Distribution: Windows 10 prior Red Hat User
Posts: 473

Original Poster
Rep: Reputation: 30
Right, actually this is for only one machine. ) Sorry I wasn't clear. So, the next thing I would like to do is setup the update script to run silently. What do I do with the script to allow that to happen?

and by the way, no changes will be made to the file being run. It's just doing it's thing and that's it

But I suppose it really doesn't matter. I could do it with two. So, what's next chief?

Would a call command here work? And if so, how?

Last edited by scottpioso; 11-30-2003 at 01:29 PM.
 
Old 11-30-2003, 01:39 PM   #39
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
In the batch file, at the end of the command(s) you need to use the switches. On my XP Box, the switches for delete are: del <whatever> /q (for quiet). To find out the switches on your system, type <command> /? into a command window and it will give a list. Most likely /y /q or something similar.
 
Old 11-30-2003, 02:07 PM   #40
scottpioso
Member
 
Registered: Jan 2003
Location: United States of America and damn proud of it!
Distribution: Windows 10 prior Red Hat User
Posts: 473

Original Poster
Rep: Reputation: 30
Okay, maybe I'm crazy but it doesn't even look like I have the option to do it quietly or am I wrong? Take a look. . .


C:\>command /?
Starts a new instance of the MS-DOS command interpreter.

COMMAND [[drive:]path] [device] [/E:nnnnn] [/P] [/C string] [/MSG]

[drive:]path Specifies the directory containing COMMAND.COM file.
device Specifies the device to use for command input and output.
/E:nnnnn Sets the initial environment size to nnnnn bytes.
/P Makes the new command interpreter permanent (can't exit).
/C string Carries out the command specified by string, and then stops
/MSG Specifies that all error messages be stored in memory. You
need to specify /P with this switch.
 
Old 11-30-2003, 02:16 PM   #41
scottpioso
Member
 
Registered: Jan 2003
Location: United States of America and damn proud of it!
Distribution: Windows 10 prior Red Hat User
Posts: 473

Original Poster
Rep: Reputation: 30
Jeesus, am I stupid or what? I took what you said literally about the command /?
 
Old 11-30-2003, 02:16 PM   #42
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
No - type in the name of the command say, xcopy (as an example) then type in /?

So your line would be:
c:\> xcopy /?

That would then bring up a list of options to go with xcopy. You can do this with all command line commands.
 
Old 11-30-2003, 02:17 PM   #43
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
You replied before me. Never mind. lol
 
Old 11-30-2003, 02:26 PM   #44
scottpioso
Member
 
Registered: Jan 2003
Location: United States of America and damn proud of it!
Distribution: Windows 10 prior Red Hat User
Posts: 473

Original Poster
Rep: Reputation: 30
Okay, okay. again the problem exists of getting the system to know which file to run, how do I get any exe file to run that it finds in the directory?
 
Old 11-30-2003, 02:27 PM   #45
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
What does *.exe give you? If it fails, try 2*.exe (assuming that the filename starts with 2)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Graphing Cron Jobs baktor Linux - General 1 11-21-2005 11:07 PM
Cron Jobs XaViaR Linux - General 1 06-23-2005 06:57 PM
cron jobs working2hard Linux - Software 0 07-28-2004 05:31 PM
CRON Jobs scottpioso Linux - Software 63 11-28-2003 06:45 PM
cron jobs Zyanid Linux - Software 0 08-27-2002 05:10 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration