|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread |
Rating:
|
Display Modes |
|
|
#1 |
|
Don't tread on me
|
HELP batch file, win2k "soon.exe"
Ok, trying to get this to work.
Wanting to run a batch file remotely in win2k and can't figure out how. help
__________________
Miami, flee it like a native. |
|
|
|
|
|
#2 |
|
SQL nutcase
|
you can try to schedule a job with the AT scheduler that runs the batch file. You can do this remotely.
|
|
|
|
|
|
#3 |
|
Don't tread on me
|
Well,
I am unfamiliar with this, really new to the batch stuff, it's for a project at work, trying to impress the boss. ![]() I really need a working example to build on. Just want to copy a batch file to many pc's, then run the batch file on them. I have tried, but I can't get it right, using all win2k. help me mosquito! You are the man! |
|
|
|
|
|
#4 |
|
Don't tread on me
|
got it!
---------------------------------------------- Xcopy /y ttt.bat \\%1\c$\winnt soon \\%1 60 cmd /c "C:\winnt\ttt.bat" ---------------------------------------------- netsh interface ip set address "Local Area Connection" static 192.168.0.8 255.255.255.0 192.168.0.1 1 add dns "Local Area Connection" 200.100.100.1 add dns "Local Area Connection" 200.100.100.2 netsh exit ---------------------------------------------- now if I can write a script that can do this for multiple machines according to pc name.......ouch> |
|
|
|
|
|
#5 |
|
SQL nutcase
|
the pcname is an environment variable %COMPUTERNAME%, so you can make a selection on this one.
You can put the batch file in the netlogon share on your server, and set it as logon script (or include it in the logon script of your users.) to schedule a batch file, you use Code:
at \\computername 12 "c:\blabla.bat" Last edited by mosquito; 07-09-2001 at 03:38 AM. |
|
|
|
|
|
#6 |
|
Don't tread on me
|
well,
the script would be a little more complicated than that. Example: if pc name is PE2878D1, then set the ip address to 10.37.128.78 (see the correlation between ip and computer name?) I really don't know anything about parsing, and don't want to write a script for every pc (like 250), would like to use just one. Just don't know where to start. Any clues? |
|
|
|
|
|
#7 |
|
SQL nutcase
|
Parsing a string positional is not easy with shell scripting. I can't remember how to do it, but I'll look it up tomorrow.
|
|
|
|
|
|
#8 |
|
Don't tread on me
|
nevermind I got it
netsh interface ip set address "Local Area Connection" static 10.37.1%computername:~2,2%.%computername:~4,2% 255.255.255.0 192.168.0.1 1 add dns "Local Area Connection" 200.100.100.1 add dns "Local Area Connection" 200.100.100.2 |
|
|
|
|
|
#9 |
|
SQL nutcase
|
That's it, I used that syntax only once before, and of course, I forgot.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|