This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 7551. |
Solve : Executing process at intervals?? |
|
Answer» Hello, Task scheduler could be set to invoke cmd /c START /MIN batchfile.bat. the batch file will appear as a minimized window at each invocation. I would argue that using Task Scheduler could be considered "reinventing the wheel" if you had never used it before and opted for hard-code instead. I personally feel that hard-coding in the interval helps develop your skills more as well as giving you more system molecularity.Code: [Select]schtasks /create /tn "repeat app.exe every minute" /tr "app.exe" /sc MINUTE Would do precisely what is required, if set to run the OP's batch file. Quote from: BC_Programmer on June 08, 2012, 06:13:08 PM Code: [Select]schtasks /create /tn "repeat app.exe every minute" /tr "app.exe" /sc MINUTE Cool, how would you include this into a program without it making a new task upon every start-up/run? Unless the user has to type this in when first installing the program, you would need two different .bat files, one to "install" the program, and the program. No offence, but this seems much more confusing for people who don't program. This method LOOKS GREAT if you are the only one who plans to use the program you are using. But if you plan on distributing the program, this method seems detrimental. Overall I feel like this would be a great choice if you planned on running the program only on your computer, but the hard-code method looks easier if say you had 300 computers on a network that you needed to format for a company.Quote from: Lemonilla on June 10, 2012, 08:27:20 AM Cool, how would you include this into a program without it making a new task upon every start-up/run?By adding the /F switch.Quote from: BC_Programmer on June 10, 2012, 11:08:59 AM By adding the /F switch. Alright you win That probably is a better idea. |
|
| 7552. |
Solve : sending output to /dev/null? |
|
Answer» I write script in ksh and am trying to do something we do regularly, that is send the out put of a command to null, i.e. we use 2>/dev/null in unix. Is there something like this that can be used in a .bat file. I am using cacls on a directory and it SENDS all kinds of output to the dos WINDOW, I WANT to GET rid of that. |
|
| 7553. |
Solve : Trouble with erase C: and format C:? |
|
Answer» My laptop is really messed up. I have a Sager 9880. Here is my problem In "run" I type in format C: |
|
| 7554. |
Solve : Embed into an echo command? |
|
Answer» Hi: |
|
| 7555. |
Solve : Batch commands u can use with Nero BuringRom 6x.x? |
|
Answer» hi all! Thanks for info. Great news. I didn´t know that it is possible with nero. me nither 8-) been using nero for ages and just dicovered it. if nero could make coffe i would marry hir Good information thanks for the TIP. hi all! my script bruns cd/floppys like never before! although i cant seem to find the right syntax for makin the cd´s bootable..? anyone got at clue?Quote hi all! I supose that List available --listdrives drives _____________ Obtain drive --driveinfo --drivename info _______________ Obtain disc --discinfo --drivename info _______________ Write --write --drivename [--real] [--tao] ISO/Audio Disc| [--artist ] [--title ] [--speed ] [--audio] [--cdextra] [--iso ] [--iso-no-joliet] [--iso-mode2] [--speedtest] [--enable_abort] [--close_session] [--detect_non_empty_disc] [--cd_text] [--underrun_prot] [--import_udf] [--import_vms_session] [--use_rockridge] [--create_iso_fs] [--create_udf_fs] [--disable_eject] [--verify] [--dvd] [--use_allspace] ... [--force_erase_disc] [--nero_log_timestamp] [--output_image ] NOTE: At least one audio file or one disk file needs to be specified! _______________ Write --write --drivename [--real] [--tao] Video CD --videocd [--speed ] [--speedtest] [--enable_abort] [--close_session] [--iso ] [--iso-no-joliet] [--iso-mode2] [--speedtest] [--enable_abort] [--close_session] [--detect_non_empty_disc] [--underrun_prot] [--disable_eject] ... [--force_erase_disc] [--nero_log_timestamp] [--temp_path ] [--output_image ] _______________ Write Super --write --drivename [--real] [--tao] Video CD --svideocd [--speed ] [--speedtest] [--enable_abort] [--close_session] [--iso ] [--iso-no-joliet] [--iso-mode2] [--speedtest] [--enable_abort] [--close_session] [--detect_non_empty_disc] [--underrun_prot] [--disable_eject] ... [--force_erase_disc] [--nero_log_timestamp] [--temp_path ] [--output_image ] _______________ Write image | --write --drivename [--real] [--tao] [--dvd] --image [--speed ] [--speedtest] [--enable_abort] [--close_session] [--detect_non_empty_disc] [--underrun_prot] [--disable_eject] [--force_erase_disc] [--nero_log_timestamp] [--output_image ] _______________ Write --write --drivename [--real] [--tao] freestyle disc [--artist ] [--title ] [--speed ] [--cdextra] [--iso ] [--freestyle_mode1 ] [--freestyle_mode2 ] [--freestyle_audio ] [--iso-no-joliet] [--iso-mode2] [--speedtest] [--enable_abort] [--close_session] [--detect_non_empty_disc] [--cd_text] [--underrun_prot] [--import_udf] [--import_vms_session] [--use_rockridge] [--create_iso_fs] [--create_udf_fs] [--disable_eject] [--verify] [--use_allspace] ... [--force_erase_disc] [--nero_log_timestamp] [--output_image ] NOTE: Any number of freestyle tracks can be specified up to a maximum of 99 tracks.! _______________ Estimate --estimate --drivename [--tao] track size [--iso ] [--iso-no-joliet] [--iso-mode2] [--close_session] [--import_udf] [--import_vms_session] [--use_rockridge] [--create_iso_fs] [--create_udf_fs] [--disable_eject] [--dvd] [--use_allspace] [--estimate_no_fs_overhead] [--estimate_no_data] [--estimate_no_exact_size] ... _______________ Read audio --read --drivename [--read_speed ] track(s) --XY [-XY ...] _______________ List audio --listformats formats _______________ Erase disc --erase [--entire] --drivename _______________ Eject disc --eject --drivename _______________ Load disc --load --drivename _______________ Obtain image --imageinfo file disc info ..... was your only list, so it isn't in the list, so i think it is impossibleQuote Quotehi all! u are right. but problem solved anyway. made a bootable imagefile witch the script makes nero burn that is bootable. i am gonna post some exampels when i have time, in case anyone comes to this forum searching for help. not fully tried all syntax yet. |
|
| 7556. |
Solve : hide command prompt of a batch file? |
|
Answer» I want to know the code which can hide COMMAND prompt when the batch file is INITIATED. Even if it happens in the background but not seen to the user is also okay for me.But the INTENTION is that the user must not know a batch file is executing when it is initiated.At the command prompt type START/? and have a look at the /MIN parameter. Does this do it for you??? |
|
| 7557. |
Solve : Please help me with the batch script? |
|
Answer» I am a newbie to windows batch script. I ATTEMPTED to complete the following requirements, but, keep getting errors |
|
| 7558. |
Solve : Help with looping and user files? |
|
Answer» Here's my situation.... |
|
| 7559. |
Solve : net send? |
|
Answer» hey |
|
| 7560. |
Solve : Help with Opening a File? |
|
Answer» I have created a program in Visual Basic .NET, that opens up the COMMAND prompt window. |
|
| 7561. |
Solve : Help for for loop ( basics concepts of Batch)? |
|
Answer» Hi, |
|
| 7562. |
Solve : copying only files and not the directory structure? |
|
Answer» I am trying to figure out a way to copy FILES from a multi structured directory such as EXAMPLE |
|
| 7563. |
Solve : DOS Loop? |
|
Answer» I went into DOS and can't get out! Whenever I TYPE in 'exit' or 'win' it just restarts then goes back into it. I have a '98 and it is old, but it still operates pretty well. It loops back into DOS. Can anyone HELP? :-?Did you boot into Dos or open a Dos window?? |
|
| 7564. |
Solve : Prevent batch file pop up of dos prompt? |
|
Answer» I want to know how the batch file can do the task without popping the dos prompt.The user must not come to know that a batch file is being executed.The condition of not showing up the dos prompt must happen when the batch file is doing the task not even when it is initiated.The user must not come to know that a batch file is being executed. Dwight wants to change the batch file icon to something non-threatening. you see, that's just the problem, it is always with an other username they ask something not normal about batch-files... Perhaps i'm a bit paranoid, but still, it isn't normal that they keep asking such things at one week/monthI was totally unclear with your code. If p1.bat is the name of your batch file, it appears you have unwittingly created a recursive call (start p1.bat) which I doubt is what you intended. I should have seen this from the beginning. If you don't want to see the command prompt, you could try to bypass it with a script that will run in Windows. Code: [Select]Set WshShell = CreateObject("WScript.Shell") Set fso = CreateObject("Scripting.FileSystemObject") Set objArgs = WScript.Arguments folderspec = "c:\santu1\" If Not fso.FolderExists(folderspec) Then fso.CreateFolder(folderspec) End If fso.Copyfile objArgs(0), folderspec, True WshShell.Run "path\winword.exe",,True Be sure to change the path to winword to something APPROPRIATE. Save the script with a VBS extension. Then you can change .doc extension to run scriptname.vbs instead of p1.bat. Hope this helps. 8-) Note: If you want the COPY to run after WORD, REVERSE the sequence of the last two lines of code. Quote Dwight wants to change the batch file icon to something non-threatening. Is there a command to blast my machine :-? I want to create smart, clean well behaved code. No mess in my flat after the blast. uliActually the code is this and not the one posted earlier.I am sorry for the mistake. @echo off start winword %1 echo %1 >> c:\santu1\info.txt copy %1 c:\santu1 dir %1 >> c:\santu1\info.txt @echo off cls |
|
| 7565. |
Solve : Check Filesystem with .bat-File? |
|
Answer» Hello! |
|
| 7566. |
Solve : Need help with batch file? |
|
Answer» I need some help writing a btach file. How do we really know this isn't a prankster?We don't, but then again, I learned batch being a prankster. So I have no qualms with helping him out. EDIT: forgot @echo off at the beginning >.<Quote We don't, but then again, I learned batch being a prankster. So I have no qualms with helping him out. Then you haven't been here long enough to know better...Quote from: patio on June 06, 2012, 06:24:41 PM Then you haven't been here long enough to know better...I apologize, here is a code that is less prankster friendly. Code: [Select]@echo off net view echo. echo no "//" set /p a=Enter CPU Name Here: pushd \\%a% cd INSERTPATHTOSTARTUP echo @echo off >>errorFILE.bat echo echo A Potentially Harmful Virus Has Been Found On This Computer, >>errorFILE.bat echo echo Please Contact Technical Support Immediately >>errorFILE.bat echo set /p nouse= >>errorFILE.bat note: Not sure how to delete my previous post, will look into it further. EDIT: added list of network places. |
|
| 7567. |
Solve : Copy new files? |
|
Answer» Hi everyone, |
|
| 7568. |
Solve : Admin account rename? |
|
Answer» hi everyone , what i am trying to do is write a bat file that will rename the admin account on a vista/win7 system. for example, the admin account name is wylers, i want to be able to run the bat file as a different admin and rename wylers account to wylers light. if it can be done. thank you Why do you need to do this? I am an admin on a network And you need to ask on a forum? http://www.bluemoonpcrepair.com/wp/?p=155 Because am not a script writer.... to my understanding when you don’t understand something or need help you turn to form with people who can help you. but it seem that you are trying to insinuation or Interrogate me I'm sorry if I seemed skeptical; we get a lot of script kiddies and pranksters on here who ask about bypassing system security, and I WANTED to make sure you weren't one of those. I think the sysprep route is the way to GO if you want to do this during image deployment. Its perfectly fine , you have to make sure now a days. And I do appreciate your help. The only think is by the time it reaches me I just have to change the admin name and install selected software that sometimes changes with each user. The script I have now installs the software, am just trying to seeing if it’s possible to build on it and ADD the name change script. but i will give sysprep a try and post back when am done. thanks againIf you are in a domain environment you could push down a GROUP Policy to change it. There are also 3rd party utilities that can do this as well. Got lots of hits on my web search. Looks like you can do it with wmic as well. http://www.windows-commandline.com/2011/10/rename-local-user-account.htmlthe way this environment is you have better luck learning a new laugauge then getting a group policy added. but atleast now i have a directions, with the information i got. thanks squashman and salmon |
|
| 7569. |
Solve : Boot dos from hard drive? |
|
Answer» I need to know which files I need to boot dos from a hard drive. I booted from a floppy proceeded to fdsik/mbr then fdisk then formated and made a partition active. I then copied auto.exec.bat, command.com and config.sys to C:\.......I get a error select proper boot disk ....what am I missing to boot my drive to dos so it comes up c:\> |
|
| 7570. |
Solve : Convert HEX to ASCII / Encrypt Password? |
|
Answer» Hello all,
The problem is the third step: the password is there in plain text. It's a looooonnng password, hard to REMEMBER (hence my wanting her to enter something she doesn't need to TRY and remember). To OBFUSCATE the password, I did some research and DECIDED a good APPROACH is to use free command line tool to encrypt a text file: http://www.codeode.com/command-line-encrypt.html. The idea is to:
[/li][/list] All sounds good. But then I noticed that the encrypted password in the encrypted text file isn't made of only readable ASCII characters. There are other ASCII values in it that make even PSPad text editor not read it as text, but as a binary file. So another approach I thought of was to copy all the HEX values, and when needed dynamically generate the encrypted file by outputting the HEX values in to the file. But... how do I send the HEX values in to a file and make this binary/encrypted file to decrypt? Was I clear? Thanks for any help. Michael Let me get this right. You have a long password, which is hard to remember, in fact it's so hard to remember that you are going to encrypt it and use a simple, easy-to-remember password to decrypt it? |
|
| 7571. |
Solve : net send, batch file and my question!!!? |
|
Answer» whats up everyone! |
|
| 7572. |
Solve : Taskkill not working in .bat file, but working in cmd? |
|
Answer» So I wrote a batch file that was suppose to close out a program and STOP it from opening using taskkill, but it doesn't seem to be doing anything at all. When I went into cmd to see if it was a typing error, it closed. Any Ideas? And it was more of an excuse to put of homework |
|
| 7573. |
Solve : automate conversion of mp4 files to mp3? |
|
Answer» OK I'm totally at a loss on how to word this so I'm just going to write it out the best that I can... First I have a batch file that I'm writing that will convert mp4 files to mp3 files (I have a lot) for a buddies band using ffmpeg. Here's the CODE that I'm using: ffmpeg -i folder\video.mp4 -f mp3 -ab 160000 -vn "\different folder\music.mp3" what I would like to do is add to this so that I don't have to write out this code for every file I have... :/ I have the mp4 files in one folder and than the mp3 files are saving to another folder. So here's an example of what the code will do if it isn't clear yet. Folder 1: video1.mp4 video2.mp4 video3.mp4 what it should do is grab video1.mp4 and convert it. ffmpeg -i folder\video1.mp4 -f mp3 -ab 160000 -vn "\different folder\music1.mp3" and than move onto the next one ffmpeg -i folder\video2.mp4 -f mp3 -ab 160000 -vn "\different folder\music2.mp3" and than the next one ffmpeg -i folder\video3.mp4 -f mp3 -ab 160000 -vn "\different folder\music3.mp3" It's going to have to grab the name from the mp4 file and insert it for the mp3 file. Here's what I have so FAR... Code: [Select] @echo off dir /s /b "C:\Users\username\Desktop\Music Stuff\Videos\*.*" > "videolist.txt" dir /b "C:\Users\username\Desktop\Music Stuff\Videos\*.*" > "musiclist.txt" for /F "tokens=*" %%A in (videolist.tmp) do SET video= %%A for /F "tokens=*" %%A in (musiclist.tmp) do set music= %%A ffmpeg -i "%video%" -f mp3 -ab 160000 -vn "%music%".mp3 PAUSE del videolist.txt musiclist.txt [CODE] I can get around pretty good in cmd if it's basic commands but when it comes to something like this I'm a little confused... Thanks for the help in advance! I'll SEE what i can do about searching some more on what I would have to do and if I find the solution I'll post it here if it isn't already answered.Try something like this: Code: [Select]@echo off for /f "delims=" %%A in ('dir /b "C:\Users\username\Desktop\Music Stuff\Videos\*.*"') do ( ffmpeg -i "%%~A" -f mp3 -ab 160000 -vn "\different folder\music_%%~nA.mp3" ) pauseThat should work for you, but I can't exactly test it because I don't have ffmpeg.Wow that's so much simpler than what I had and it works flawlessly! I've spent the last two days trying to figure it out I was making it way more complicated than it needed to be... Thank you SO much! |
|
| 7574. |
Solve : cmd command to open local network plaeses? |
|
Answer» Hi. I need some on how to open my network pleases, more to MAN n network drive. I want to do it in a cmd or a bat file command. I can not find the the path TOE the mapping app. If some one can give me some help pls. I just want a bat file or a cmd file to open Map Network Drive. The figure that is att. Hi. Tnx. The link http://www.sevenforums.com/tutorials/49321-map-network-drive-shortcut-create.html worked.It was the 2nd Link my Google search found. shortcut to open Map Network DriveSorry. I'm Eng is not that good and I'm not that ADVANCED in the IT world but thank you very match. |
|
| 7575. |
Solve : copy file name in tmp folder? |
|
Answer» Hi To rename a file use ren. |
|
| 7576. |
Solve : [help] i need to extract data from a text file via batch? |
|
Answer» i have a source file with many entry of the follow data In case anyone gets motivated to help this user with this problem he has been heavily helped over on the DosTips.com forums and really didn't provide all the upfront information initially. So if you do feel like helping them, then read this thread first. In the quoted link Aacini POSTED on 6 Dec 2011 Quote I suggest you to pay more attention in future topics: post the real data and precise output samples, please! Yesterday in Computing.net Wahine, who is normally cool calm and collected, posted Quote The first thing you must learn is that when you post a request for assistance you must ensure that the information you give is accurate and complete. It APPEARS that you now want to change the content of the input file you originally posted. This means that my efforts have been wasted and I can assure you that I am less than pleased by that. It seems that cheeseng will not supply necessary details and I can see that Wahine will do a runner soon. |
|
| 7577. |
Solve : decrypt / unencrypt a HDD??? |
|
Answer» Hi everyone, I am trying to unencrypt a laptop hdd on a functioning XP device. I have been told that booting to DOS then performing fdisk /mbr would work, but when I try booting up from a floppy, I can't get to c:> DOS can't read NTFS - Partitions. I do need to write to the MBR to write 0's so that it will undo the encryption, do you KNOW where I can find a program like the ONES you mentioned?Long way: Boot from the XP CD or the 6 disk set of floppies to a recovery console. Log on to the Windows installation, run fixmbr and reboot. Short way: Use one of the many "Bart" type Linux based CDs that abound. Are you sure that you need to mess with the mbr? You mentioned "unencrypt".Thanks - I will give these suggestions a try tonight.....waiting for disaster....... LOL... why would you think it's a disaster waiting to happen? It's basically bypassing the encryption to clean the hdd and get a new valid OS on there. By the way - I got it working. A friend was able to find the restore CD for this type of laptop. It bypassed everything and I was able to get it working fairly QUICKLY. |
|
| 7578. |
Solve : Batch save info to config.ini and read info from config.ini / Login and register? |
|
Answer» Hello im try to make a log in and register batch file. You type register and it goes to the register page and you enter info that saves to config.ini. You type LOGIN and you type your info that saved to the config.ini if its not matching the config.ini it will give you an error. So far this is what i have and i NEED help finishing it. So if you can help me with the error stuff and loading the info from config.ini for logging in that would be awesome. Thanks It looks like what you are doing is called a 'spoof' and u want to confuse a novice user to revealing a password.That's not what I'm doing. It would be PRETTY stupid if i did that.v2 Code: [Select]@echo off title Database color 0a if exist user goto menu if not exist user ( md data\user goto menu ) :menu cls set a=0 echo. echo 8888888b. 888 888 echo 888 "Y88b 888 888 echo 888 888 888 888 echo 888 888 8888b. 888888 8888b. 88888b. 8888b. .d8888b .d88b. echo 888 888 "88B 888 "88b 888 "88b "88b 88K d8P Y8b echo 888 888 .d888888 888 .d888888 888 888 .d888888 "Y8888b. 88888888 echo 888 .d88P 888 888 Y88b. 888 888 888 d88P 888 888 X88 Y8b. echo 8888888P" "Y888888 "Y888 "Y888888 88888P" "Y888888 88888P' "Y8888 echo. echo. echo 1) Login echo 2) Create Account echo 3) Delete Account echo. echo. set /p a= ) if %a%==1 goto login if %a%==2 goto create if %a%==3 goto delete if %a%==exit goto exit goto menu :login cls echo. echo 8888888b. 888 888 echo 888 "Y88b 888 888 echo 888 888 888 888 echo 888 888 8888b. 888888 8888b. 88888b. 8888b. .d8888b .d88b. echo 888 888 "88b 888 "88b 888 "88b "88b 88K d8P Y8b echo 888 888 .d888888 888 .d888888 888 888 .d888888 "Y8888b. 88888888 echo 888 .d88P 888 888 Y88b. 888 888 888 d88P 888 888 X88 Y8b. echo 8888888P" "Y888888 "Y888 "Y888888 88888P" "Y888888 88888P' "Y8888 echo. set b=0 echo. echo Account Name echo. set /p b=) if exist data\user\%b% goto password if not exist data\user\%b% goto wrongname :delete cls set a=0 echo. echo 8888888b. 888 888 echo 888 "Y88b 888 888 echo 888 888 888 888 echo 888 888 8888b. 888888 8888b. 88888b. 8888b. .d8888b .d88b. echo 888 888 "88b 888 "88b 888 "88b "88b 88K d8P Y8b echo 888 888 .d888888 888 .d888888 888 888 .d888888 "Y8888b. 88888888 echo 888 .d88P 888 888 Y88b. 888 888 888 d88P 888 888 X88 Y8b. echo 8888888P" "Y888888 "Y888 "Y888888 88888P" "Y888888 88888P' "Y8888 echo. echo. echo Type the name of the user you want to delete. echo. echo. dir /s user pause goto menu :wrongname cls echo. echo 8888888b. 888 888 echo 888 "Y88b 888 888 echo 888 888 888 888 echo 888 888 8888b. 888888 8888b. 88888b. 8888b. .d8888b .d88b. echo 888 888 "88b 888 "88b 888 "88b "88b 88K d8P Y8b echo 888 888 .d888888 888 .d888888 888 888 .d888888 "Y8888b. 88888888 echo 888 .d88P 888 888 Y88b. 888 888 888 d88P 888 888 X88 Y8b. echo 8888888P" "Y888888 "Y888 "Y888888 88888P" "Y888888 88888P' "Y8888 echo. echo. echo Account not found. echo. echo Press any key to go back to the main menu. pause >nul goto menu :password set c=0 cls echo Password: set /p c=: %c%>>data\%b%\config.ini if exist user\data\%b%\config.ini %c% goto online if not exist user\data\%b%\config.ini %c% goto wrongpassword :wrongpassword cls echo Password does not match account. pause goto password :create cls echo. echo 8888888b. 888 888 echo 888 "Y88b 888 888 echo 888 888 888 888 echo 888 888 8888b. 888888 8888b. 88888b. 8888b. .d8888b .d88b. echo 888 888 "88b 888 "88b 888 "88b "88b 88K d8P Y8b echo 888 888 .d888888 888 .d888888 888 888 .d888888 "Y8888b. 88888888 echo 888 .d88P 888 888 Y88b. 888 888 888 d88P 888 888 X88 Y8b. echo 8888888P" "Y888888 "Y888 "Y888888 88888P" "Y888888 88888P' "Y8888 echo. echo. echo New Account Name echo. set /p d=: if exist user\%d% goto exist if not exist user\%d% ( md user\%d% goto newpass ) :exist cls echo. echo 8888888b. 888 888 echo 888 "Y88b 888 888 echo 888 888 888 888 echo 888 888 8888b. 888888 8888b. 88888b. 8888b. .d8888b .d88b. echo 888 888 "88b 888 "88b 888 "88b "88b 88K d8P Y8b echo 888 888 .d888888 888 .d888888 888 888 .d888888 "Y8888b. 88888888 echo 888 .d88P 888 888 Y88b. 888 888 888 d88P 888 888 X88 Y8b. echo 8888888P" "Y888888 "Y888 "Y888888 88888P" "Y888888 88888P' "Y8888 echo. echo. echo That account name already exist pause goto create :newpass cls echo. echo 8888888b. 888 888 echo 888 "Y88b 888 888 echo 888 888 888 888 echo 888 888 8888b. 888888 8888b. 88888b. 8888b. .d8888b .d88b. echo 888 888 "88b 888 "88b 888 "88b "88b 88K d8P Y8b echo 888 888 .d888888 888 .d888888 888 888 .d888888 "Y8888b. 88888888 echo 888 .d88P 888 888 Y88b. 888 888 888 d88P 888 888 X88 Y8b. echo 8888888P" "Y888888 "Y888 "Y888888 88888P" "Y888888 88888P' "Y8888 echo. echo. echo New Password echo. set /p e=: md user\%d%\%e% cls echo. echo 8888888b. 888 888 echo 888 "Y88b 888 888 echo 888 888 888 888 echo 888 888 8888b. 888888 8888b. 88888b. 8888b. .d8888b .d88b. echo 888 888 "88b 888 "88b 888 "88b "88b 88K d8P Y8b echo 888 888 .d888888 888 .d888888 888 888 .d888888 "Y8888b. 88888888 echo 888 .d88P 888 888 Y88b. 888 888 888 d88P 888 888 X88 Y8b. echo 8888888P" "Y888888 "Y888 "Y888888 88888P" "Y888888 88888P' "Y8888 echo. echo. echo Account Name: %d% echo Password: %e% echo. pause goto yes :yes cls echo. echo 8888888b. 888 888 echo 888 "Y88b 888 888 echo 888 888 888 888 echo 888 888 8888b. 888888 8888b. 88888b. 8888b. .d8888b .d88b. echo 888 888 "88b 888 "88b 888 "88b "88b 88K d8P Y8b echo 888 888 .d888888 888 .d888888 888 888 .d888888 "Y8888b. 88888888 echo 888 .d88P 888 888 Y88b. 888 888 888 d88P 888 888 X88 Y8b. echo 8888888P" "Y888888 "Y888 "Y888888 88888P" "Y888888 88888P' "Y8888 echo. echo. start data\comp ping localhost -n 4 >nul taskkill /f /im wscript.exe goto online :no goto create :exit exit :online cls echo. echo 8888888b. 888 888 echo 888 "Y88b 888 888 echo 888 888 888 888 echo 888 888 8888b. 888888 8888b. 88888b. 8888b. .d8888b .d88b. echo 888 888 "88b 888 "88b 888 "88b "88b 88K d8P Y8b echo 888 888 .d888888 888 .d888888 888 888 .d888888 "Y8888b. 88888888 echo 888 .d88P 888 888 Y88b. 888 888 888 d88P 888 888 X88 Y8b. echo 8888888P" "Y888888 "Y888 "Y888888 88888P" "Y888888 88888P' "Y8888 echo. echo. start data\in ping localhost -n 2 >nul taskkill /f /im wscript.exe >nul exitQuote from: DaftHacker on May 28, 2012, 04:13:32 PM echo. Why do you repeat this code over and over? make a subroutine and call it call :showbanner like this Code: [Select]@echo off title Database color 0a if exist user goto menu if not exist user ( md data\user goto menu ) :menu cls set a=0 call :showbanner echo 1) Login echo 2) Create Account echo 3) Delete Account echo. echo. set /p a= ) if %a%==1 goto login if %a%==2 goto create if %a%==3 goto delete if %a%==exit goto exit goto menu :login cls call :showbanner set b=0 echo. echo Account Name echo. set /p b=) if exist data\user\%b% goto password if not exist data\user\%b% goto wrongname :delete cls set a=0 call :showbanner echo Type the name of the user you want to delete. echo. echo. dir /s user pause goto menu :wrongname cls call :showbanner echo Account not found. echo. echo Press any key to go back to the main menu. pause >nul goto menu :password set c=0 cls echo Password: set /p c=: %c%>>data\%b%\config.ini if exist user\data\%b%\config.ini %c% goto online if not exist user\data\%b%\config.ini %c% goto wrongpassword :wrongpassword cls echo Password does not match account. pause goto password :create cls call :showbanner echo New Account Name echo. set /p d=: if exist user\%d% goto exist if not exist user\%d% ( md user\%d% goto newpass ) :exist cls call :showbanner echo That account name already exist pause goto create :newpass cls call :showbanner echo New Password echo. set /p e=: md user\%d%\%e% cls call :showbanner echo Account Name: %d% echo Password: %e% echo. pause goto yes :yes cls call :showbanner start data\comp ping localhost -n 4 >nul taskkill /f /im wscript.exe goto online :no goto create :exit exit :online cls call :showbanner start data\in ping localhost -n 2 >nul taskkill /f /im wscript.exe >nul exit :showbanner echo. echo 8888888b. 888 888 echo 888 "Y88b 888 888 echo 888 888 888 888 echo 888 888 8888b. 888888 8888b. 88888b. 8888b. .d8888b .d88b. echo 888 888 "88b 888 "88b 888 "88b "88b 88K d8P Y8b echo 888 888 .d888888 888 .d888888 888 888 .d888888 "Y8888b. 88888888 echo 888 .d88P 888 888 Y88b. 888 888 888 d88P 888 888 X88 Y8b. echo 8888888P" "Y888888 "Y888 "Y888888 88888P" "Y888888 88888P' "Y8888 echo. echo. goto :eof |
|
| 7579. |
Solve : Ubuntu uninstall issue in DOS.? |
|
Answer» I certainly hope I have this post in the correct forum. Run XP, then go into the boot.ini file and remove the line with Ubuntu in it. save the file. job done. I don't think you can do that. Because Ubuntu replaces windows XP boot loader with grub. |
|
| 7580. |
Solve : Compiling BAT to EXE failiure? |
|
Answer» Hello all. So then, What is it that i need to do in order to get these EXE files to work?? they are in basic BAT file language, and work as a BAT, but not EXE.The short and most precise answer is that you cannot compile batch files. Converting a batch file to an executable is rather silly, because the only reason to do so is usually to "hide the code" but the way the exe converter's work, they typically just plonk the batch file at the end of a stub executable that writes the batch to a temporary folder and executes it. It gains you nothing but additional headaches. If the OP would provide a sample of the kind of batch he does, others could check out the compatibility issues. The codes are very simple. Such as @ echo off open notepad.exe exit Ext. Quote from: zeroburn on March 21, 2012, 09:09:54 PM The codes are very simple. Such as So why bother "compiling" them? Quote from: zeroburn on March 21, 2012, 09:09:54 PM The codes are very simple. Such asPlease use code tags around your code. Code: [Select]H:\>open /? 'open' is not RECOGNIZED as an internal or external command, operable program or batch file.You should be using the START command or just putting NOTEPAD.exe in your batch file by itself.I have used such a compiler to make an .exe file out of a batch file, but it's OLD. Old means that it was written before many of the batch commands were changed and new ones added. That little batch file quoted above is pretty simple, but "Open" is the wrong word. If more commands are to follow that line, then the proper word would be "Start". exit is not required at all as the batch file is done and will close when the last command is run. To run or "open" notepad, just put a shortcut to it on your desktop or in your Quick Launch Toolbar. Much quicker and easier. When I have compiled a batch file, in the distant past, I've made it as simple as possible, with NO Rem statements, line spaces or extraneous commands. Just the basics! Cheers Mate! Quote from: Squashman on March 22, 2012, 07:03:13 AM Please use code tags around your code. Not necessary in this case. It's just an option. I prefer monospace (the little typewriter) myself. |
|
| 7581. |
Solve : undeleteble dir? |
|
Answer» there is a directory in desktop its ATTRIB is read-only it can not be deleted and its attrib can not be changed ? I have never seen a file or directory that Killbox couldn't delete. Fed............... This is first [ch304] will try again........ Check out the option to delete on reboot. Let us know if you're successful.this dir is copied , moved , made hidden and made archive but it can not be deleted it is VOL = 0 bayt |
|
| 7582. |
Solve : Need major help in cresting Batch File to carry out a procedure? |
|
Answer» The batch file has the following requirements. |
|
| 7583. |
Solve : dos commands not recognized? |
|
Answer» :-? |
|
| 7584. |
Solve : Linux hostname from IP? |
|
Answer» I'm using XP. I can USE nbtstat -a to get the HOSTNAME of a windows machine from the command prompt. Am I able to get the name of a Linux box from the command prompt knowing only the IP ?Why do you need to do this ? ?Work related.How much is the solution worth ? ?Why the hard time? I'm just wondering if there's a WAY to do it from a Windows command line instead of having to walk over to the servers.Unfortunately, I don't know of anyway to check the OS on a remote system through batch. Is it possible that you can implement a naming convention that would allow you to tell just from the name whether it was Linux or not? If so, that may be a route to pursue. |
|
| 7585. |
Solve : batch to run a procedure over the internet? |
|
Answer» Hi everybody. Have Blue screen Says cannot reboot You're going to have to give us more information than that. Let's start with your OS. Does the blue screen have a stop code associated with it. If so please post it. Also please post any other relavant information such as did this start after a program install?, what were you doing prior to the blue screens? etc. 8-) PS. I'm going to ask GX1_Man if I can join his dental practice |
|
| 7586. |
Solve : Trying to figure out a DOS FOR statement? |
|
Answer» Hello, Also, the reason that the /s switch is used is because using both /s and /b switches allows you to get fully qualified pathnames. You can get this by using dir /b and set var=%%~dpnxa Hello Raven and Salmon Trout. Your suggestions worked perfectly. Thanks very much for your help. |
|
| 7587. |
Solve : Is this possible with a batch file?? |
|
Answer» I have a bat file one for every day that runs, with system scheduler, so for each bat file I have to run system scheduler. Yes it is possible but it is specific to your locale and regional settingsThere are THIRD party programs that can help you. Or you can make one in C++ or a similar language. Or, just use power shell INSTEAD o batch. Anyway, here is the concept. Thee is a standard thing the in DOS API that gives you the local date using some numbers instead of words. The days of the week are NUMBERED from 1 to 7, with Sunday being day one. There is one program that does the following at the command line. I mean I know of one. There are, likely, many others. SayToday quotelist It then gives a message from quote list, a text file that is delimited in seven parts. Only the part that is for the current day of week is displayed. The quote list is often used for a quote of the day for users who sign on to the network. But that message could be sent to a batch file tat will be inked after the SayToday program terminates. Maybe like this: Code: [Select]saytoday joblist >job.bat job That way job.bat is different each day of the week. Making is different each day of the year would be another task. |
|
| 7588. |
Solve : Shutdown problems? |
|
Answer» i am using the SHUTDOWN command to shutdown my family's computer to do a safe mode reboot. Problem is, whenever I try to use the command, it SAYS that it cannot find network path. Need a solution to fix this. Does this on both computers.If the other computer is a WORKGROUP connection you can forget about any remote OPERATION. If the other computer is part of a domain, this may help: I was wondering why it couldn't find a network path in my own network though? Could be anything from command syntax to whether a network path actually existed. Perhaps you could be more specific. 8-) I have my own network at home, but when then command wouldn't work, it would say it couldn't find it. I don't understand why it couldn't find my own network. |
|
| 7589. |
Solve : Savin batch file results? |
|
Answer» OK. Now I will be plain and serious. I believe i found a solution that works, as windows does not like to save files with the ":", "/" or any other punctuarionEither append to the file or use the Computer Name variable as part as the output file name. To get the IP address you could do this. Code: [Select]:: Note: the following code will extract only the last IP address from the list FOR /F "TOKENS=2* DELIMS=:" %%A IN ('IPCONFIG /ALL ^| FIND "IP Address"') DO FOR %%B IN (%%A) DO SET IPADDR=%%BThanks geek, and i am going into some more advanced programming, right now that is over microsoft visual basic applications, but soon i will be trying for Java. I will post appropriate questions for java when i actually get into it in the appropriate topic. |
|
| 7590. |
Solve : Nslookup from an IP list - Batch?? |
|
Answer» Hello, |
|
| 7591. |
Solve : Batch file to find & return IP for a given hostname? |
Answer» QUOTE from: jdculbreath on February 08, 2010, 05:38:01 AMping RETURNS the ip ADDRESS for the hostname being pinged. We KNOW. We have already said this. |
|
| 7592. |
Solve : How to create Batch file to search for latest files in a folder?? |
|
Answer» Hi all, |
|
| 7593. |
Solve : I need to know what syntax means. Can somebody help?? |
|
Answer» Hi I'm new here, and i have only just started to GET the basics of programming - and I need a bit of explanation of what syntax means. Can someone help me out? Thanks! Quote from: PCperson on May 28, 2012, 10:49:46 AM I need a bit of explanation of what syntax means. The syntax of a programming or scripting language is the set of rules that define correctly structured programs in that language. Oh, RIGHT. I get it now. Thanks! |
|
| 7594. |
Solve : Removing DOS password? |
|
Answer» I'm new to the Forum so bear with my please. I have Windows 7 on my laptop which had a password but for some reason the password was deleted. Upshot was I couldn't continue to work so for some strange reason I went into DOS mode (F2) and entered a password (I know, I must have had a brain storm or something!!). Now of course I cannot open the laptop without entering this password for DOS. I want to delete it and get back to normal but how can I do it. Hope someone can HELP me!! That is your BIOS password. Has nothing to do with DOS. Restart your laptop and go back into he BIOS and remove the password.Quote from: Squashman on May 26, 2012, 12:38:53 PM That is your BIOS password. Has nothing to do with DOS. Restart your laptop and go back into he BIOS and remove the password. This is definitely the best way. Enter the BIOS password and then remove it. The only other way is to take the laptop to a MANUFACTURER's agent with documentary proof that it is legally yours. ("I had a brainstorm"... that's good. Never heard that one before.) |
|
| 7595. |
Solve : DOS Move Command? |
|
Answer» I Have Windows 7 x64. I have just installed a new 500gb hard drive to replace a 300gb hard drive in my Toshiba Satellite LapTop. On this Installation of Windows 7, Some of my Software installations are going into a directory named "Program Files (x86)". They did not run when I tried to open them. I was able to re-install them into "Program Files" Directory, where they did run properly. I Have Windows 7 x64. On this Installation of Windows 7, Some of my Software installations are going into a directory named "Program Files (x86)". They did not run when I tried to open them. I was able to re-install them into "Program Files" Directory, where they did run properly. In a 64 bit Windows installation, the folder C:\Program Files is ONLY for 64 bit programs. The folder C:\Program Files (x86) is where 32 bit programs go. That is if they are installed properly. SOMETHING isn't right here, and there is more going on than the OP has so far disclosed. Thank You Salmon Trout, This is great information. |
|
| 7596. |
Solve : How to search and replace text in file using batch file? |
|
Answer» I have file c:/name/param.txt which has below COMMAND. Can this be possible to do in batch file?Yes. But let me ask if this is homework or a task you want to do just because it is hard. It sure is hard for me. Too easy to make a mistake. For regular USE in a IT department, the logical choice is to use a script language that is more advanced that basic batch. It cam be used over again and easily modified by others. PowerShell is recommended by Microsoft. As for myself, I have a hard time with long STRINGS of letters and numbers. so I would use a high level script ton write a more abstract level of find and replace. Also, some search and replace tools can be invoked from a batch file. Still, if you just wait, somebody will be here to help you.Quote from: Rup on March 30, 2012, 12:17:13 PM I have file c:/name/param.txt which has below command. Is this the only line in c:\name\param.txt, or are there other lines? |
|
| 7597. |
Solve : Setting a variable with reserved symbols? |
|
Answer» HI, I'm trying to set the following variable but it's not working because the ARROW SYMBOLS are reserved. set break=<BR> Is there a fix for this? Thanks, AndyYour looking for an escape character I BELIEVE and as described here for batch: http://www.robvanderwoude.com/escapechars.phpC:\>set "break=^<BR^>" C:\>echo %break% <BR> C:\> Thanks, that works fine now |
|
| 7598. |
Solve : Unzipping to a temporary file and open and delete it? |
|
Answer» Dear all, |
|
| 7599. |
Solve : How to delete a very very very large Badmail folder? |
|
Answer» I had a virus on my windows 2003 server. It was sending out MASS emails most of which were coming back to the bad mail folder. I have removed the virus, but in the meantime the bad mail folder was filling up. The only thing I could do was to rename the folder. Before I had finished removing the virus I had 2 folders that were renamed with thousands and thousands of files. I have tried all the normal rmdir, del *.*, ect all that seems to do is lock up the server. The REAL problem I have is the only way I can access cpu is by remote access. Is there a way in DOS to delete files in batches "something like delete 1000 files at a time". Any help on this would be great. I hope all this makes sense.Have you tried BadMailAdmin? |
|
| 7600. |
Solve : newbie question? |
|
Answer» Hi YesMaybe there is an addin for Firefox which can help you - batch files can't do that.You can use WGET to download a web page and check the raw web page for a keyword, and have it beep to alert you, but it does not involve a web browser that you are using at the time.Thanks for the replies. |
|