Name: ducklips Date: April 29, 2004 at 10:58:34 Pacific Subject: Need help with .bat file! OS: dos CPU/Ram: latitude c540/640
Comment:
Does anyone knoe of a good net tutorial on how to write a good .bat file? I have a tricky challenge to accomplish. I suppose what I am looking for is a list of commands, hopefully a rather in-depth one.
Usually google will transform my pc into the "bat-computer" and help me find just about anything, but in this case I need the help of some experts. From what I have learned, this is the place to find some good saavy people.
Any help would be much appreciated. Thanks!
-Ducklips
"i woke up this morning and all of my stuff was stolen and replaced with exact duplicates."
Thanks Jboy! Your search did bring up many more results. I was typing in ".bat" instead of "batch".
Basically, I'm trying to figure out how to get a batch file to do a "run as" action, then enter an administrator user name and password to start a program when a restricted user logs on. The app that I want to start can only be started by an administrator but i don't want the restricted user to have admin priv's.
Does that make sense? Thanks again for the above info, I have learned a lot more.
"i woke up this morning and all of my stuff was stolen and replaced with exact duplicates."
It is an XP workstation but I found no help in the xp forum. I'm using whatever version of DOS that is on XP Pro. I am also using Windows 2003 Server, the user will be logging onto a domain on that server. I am not up to anything negative, I just need to initiate a scanning program that needs to always be running, and I'm not about to give administrative privileges to anyone that does not need it, which is why I'm trying to get this to work.
I just found this vb code below that I might be able to call into my batch file:
Sorry, way over my knowledge (and really not DOS), so I can't tell if it would work. Hopefully someone comes along who can tell. Risk is they will send you right back to the XP forum.
JW has asked that NT Batch questions are not asked in an inappropiate forum.
You can not use the MSDOS in XP as it does not have any, will never have any and I would be pleased if everybody got this into their skulls. XP is based on IBM OS/2, NT3, NT4, W2K and therefore a 32bit O/S with an intergrated GUI, totally unlike MSDOS
Even Linux in command line looks similar to MSDOS, but it is Linix, please will all you NT users please read and digest the following article as it explains why NT is not MSDOS and MSDOS is an emulation:
Yeah - it's a source of confusion to many computer users. The command prompt in XP is basically the NT command interpreter - on the surface, very similar to 'classic' DOS, but the nuts & bolts are very different.
It's become something of a bone of contention in this forum, as the majority of the posts seem to be in regard to XP/2K 'DOS' - which is one reason why it's helpful to put the correct specs in the OS field when posting.
Some of that is addressed at Secret_Doom's page, but for complex batch files you need to use the specific features for your particular Operating System.
You can also ask NT Batch questions in Programming Forum besides the NT/2K/XP Forum (or even the OS/2 Forum), but NEVER in the DOS Forum!
OS/2 was originally a joint project between MS and IBM. After their collaboration fell apart, WinNT was renamed from MS's version of OS/2 by MS (while IBM's version of OS/2 was later renamed to OS/2 Warp by IBM); Win2K and WinXP are WinNT 5.0 and WinNT 5.1 respectively. Please read here for more information about Windows NT:
Thanks for the help and your patience with my learning curve. I belong mainly in 3D animation and web design but I have been working more and more with workstations and networking which forced me to build and maintain a network environment.
this is a link to a 3D contest that I'm in for fun and I'll post my latest web work below that.
That's some interesting work - I was a big fan of Heavy Metal mag and the various Undergrounds from the 70's & 80's.
Sure, look around the other forums a give your question a try there - I'm not too surprised there wasn't much help in the actual XP forum - I get the impression that most of the helpers there aren't much more knowledgeable than most of the questioners (but what do I know?)
Good luck
The information on Computing.Net is the opinions of its users. Such opinions may not be accurate and they are to be used at your own risk.
it is true, to get the information you want for Batches,in the NT Forum is like gambling. It seems the most know how is in the DOS Forum.
A stupid question from me: I know the NT Konsole is different than the Dos Konsole, but most batch scripts are also working with NT. So where is the problem to give people help if they donīt get it in Windows or Programmers Forum?
uli - I think you misunderstand. It's not like we're witholding help.
Generally speaking, the contributers here in the 'old' DOS forum are familiar with DOS, not NT. If someone can help, they will - but it seems a little unfair to expect folks to give advice or instructions concerning Operating Systems that they have little or no experience with.
It's also a matter of policy to separate the various forums (mainly) by Operating System - this simplifies the use of the 'site search' feature.
We don't post DOS questions over in the NT forum, now do we?
; )
The information on Computing.Net is the opinions of its users. Such opinions may not be accurate and they are to be used at your own risk.
Besides what jboy had said in the above response --
a quotation from uli's post:
"most batch scripts are also working with NT"
Not true. The fact is: A lot of advanced DOS batch scripts will NOT work with NT, while most NT batch scripts will NOT work with DOS. In particular, NT batch scripts are generally incompatible with DOS systems. Read this page for more information:
The information on Computing.Net is the opinions of its users. Such
opinions may not be accurate and they are to be used at your own risk.
Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE