Make Program Open Itself Again and Again in Batch File
I'm making a simple batch file (bat) how do I arrive stay open?
- Thread starter superHARD
- Starting time engagement
- #i
- #2
ipconfig / all
break
- #3
now is there a way to go far auto copy to clipboard their mac address?
- #4
@echo off
ipconfig /all > c:\ipresult.txt
pause
- #v
or any to re-create the txt file then all they take to do is paste it in a email back to me?
- #six
I call up information technology's just asking a fiddling bit too much automation from a simple script, you demand a more complex scripting language or your own plan to exercise what you desire.
Then over again, batch guru'due south could well show me wrong.
- #7
mailto launch: ?
- #8
START mailto:aid@yourdomain.com?subject=Your%%20subject%%
It'll spawn a new post from the default postal service client
Ken g6
Programming Moderator, Elite Fellow member
- December eleven, 1999
- fifteen,656
- 2,747
- 55
- #9
If all yous're afterwards is the MAC addresses, and not what interfaces they become to, the information could exist made shorter:
ipconfig /all | find "Physical Accost" > c:\ipresult.txt
Merely I'g not sure how to get that into the Discipline line.
- #x
Now, how do I automate a "run as" control in at that place?
I'grand wanting to run it as a certian username in this case the username is "install"
- #eleven
- #12
I don't know how to use either of them...and I don't actually know how to apply these bat files either...Originally posted by: yinan
Y'all can gather this information remotely using vbscript and wmi
- #13
runas /username:yourdomain\install yourcommandOriginally posted by: superHARD
Cool, the notice characteristic workes keen for me...TY!Now, how practise I automate a "run equally" control in at that place?
I'k wanting to run it every bit a certian username in this instance the username is "install"
There are other options to consider, but that should exist plenty to get y'all started.
- #14
If so, use psexec command, psexec ipconfig /all \\computernameorip /user:install
the syntax may be off (it'due south been a while since I had to bust out the pstools) merely it should exist close.
- Jan 29, 2004
- 13,679
- 10
- 81
- #xv
For case try this from the command line:
rundll32 user32.dll LockWorkStation
- Advertising
- Cookies Policies
- Privacy
- Term & Conditions
- Near us
- This site uses cookies to help personalise content, tailor your feel and to keep you logged in if you annals.
By continuing to use this site, you lot are consenting to our apply of cookies.
Source: https://forums.anandtech.com/threads/im-making-a-simple-batch-file-bat-how-do-i-make-it-stay-open.50871/
0 Response to "Make Program Open Itself Again and Again in Batch File"
Post a Comment