

InterviewSolution
Saved Bookmarks
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your Microsoft knowledge and support exam preparation. Choose a topic below to get started.
8901. |
Solve : Grep parameters in a make file? |
Answer» <html><body><p>Hi,<br/><br/>I am trying to use the grep command within a makefile but I'm having <a href="https://interviewquestions.tuteehub.com/tag/difficulty-953306" style="font-weight:bold;" target="_blank" title="Click to know more about DIFFICULTY">DIFFICULTY</a> with the syntax e.g. :-<br/><br/>Code: <a>[Select]</a> $(shell $(GREP) "apple" fruitlist.txt) <br/><a href="https://interviewquestions.tuteehub.com/tag/returns-1187977" style="font-weight:bold;" target="_blank" title="Click to know more about RETURNS">RETURNS</a> an error that the file can't be located, it appears that the parameters are read as <a href="https://interviewquestions.tuteehub.com/tag/one-241053" style="font-weight:bold;" target="_blank" title="Click to know more about ONE">ONE</a> hence returning an invalid file name.<br/>Is there a <a href="https://interviewquestions.tuteehub.com/tag/particular-1147539" style="font-weight:bold;" target="_blank" title="Click to know more about PARTICULAR">PARTICULAR</a> separator I should be using?<br/>Any help is appreciated thanks.</p></body></html> | |
8902. |
Solve : Move cursor with batch file? |
Answer» <html><body><p>Greetings. I'm not <a href="https://interviewquestions.tuteehub.com/tag/sure-656539" style="font-weight:bold;" target="_blank" title="Click to know more about SURE">SURE</a> this is the correct forum to ask something like this, but I've got to start somewhere, right? We've got an IBM mainframe, with 3270 on our machines to access the data. We can write VB script to automate the completion of repetitive tasks, and it actually saves countless hours of what would otherwise be <a href="https://interviewquestions.tuteehub.com/tag/manual-247374" style="font-weight:bold;" target="_blank" title="Click to know more about MANUAL">MANUAL</a> work. The problem is that when running a script, the speed is strangly dependent upon whether or not the mouse cursor is moving over the VB file. For example, say my VB script can perform a transaction in 5 seconds when the mouse is not moving over the VB file that is running. I can then move the mouse cursor in any direction or distance, as long as it is moving somewhere over the VB script file, and the script can all of the sudden perform the same transactions in 2 seconds. My first thought was to get one of those things people have on their desks that rock back and forth, producing a repetitive blue wave, and simply sit my mouse on it. My next thought was to have a program that would just move the cursor around. I'm not even sure that is possible, let alone how I would go about doing it. Any ideas or thoughts? Thanks.<br/><br/>Greg<strong>Apparently this is how VB scrip is helping the unemployment issue. </strong> <br/><br/>Now the IT department shave to hire somebody to rock the mouse back and forth to speed up the process. Just think of how this will help he under skilled people who can not otherwise hold a job.<br/><br/><em> Put an ad in the local newspaper:</em><br/>mouse rocker wanted, <br/>no experience needed.,<br/>mouse provided.. Well, I can't tell you how many times I have sat there, racing the clock to a deadline, doing nothing but just what you suggested.I was unaware VBScript even ran on IBM mainframes. There is no native way in VBScript to do this, but if you have a VB compiler, you can build a class wrapper using the Windows API and use it within VBScript to move the cursor:<br/><br/><strong>Class Wrapper:</strong><br/><a href="https://interviewquestions.tuteehub.com/tag/code-25512" style="font-weight:bold;" target="_blank" title="Click to know more about CODE">CODE</a>: <a>[Select]</a>Public Class SetCursorPos<br/> Private Declare Function SetCursorPos Lib "user32" Alias "SetCursorPos" _<br/> (ByVal x As Long, ByVal y As Long) As Long<br/><br/> Public Sub MoveTheCursor(ByVal xPos As Integer, ByVal yPos As Integer)<br/> SetCursorPos(xPos, yPos)<br/> End Sub<br/>End Class<br/><br/>The above is for VB6; replace every occurrence of <em>long</em> to <em>integer</em> if using VB.Net<br/><br/>In your VBScript, add the following code:<br/><br/>Code: <a>[Select]</a>Set pointer = CreateObject("vbWrappers.SetCursorPos")<br/>pointer.MoveTheCursor 100, 80<br/><br/>The 100 and 80 coordinates are arbitrary. Change as needed to hover in the correct spot.<br/><br/>Good luck. <br/><br/><br/><br/><br/><br/><br/>Quote from: Sidewinder on June 29, 2011, 08:00:10 AM</p><blockquote>I was unaware VBScript even ran on IBM mainframes. </blockquote><br/>It doesn't. He wrote<br/><br/>Quote<blockquote>We've got an IBM mainframe, with 3270 on our machines to access the data. </blockquote><br/>By "3270" I think he means a terminal emulator program that mimics an IBM 3270 terminal. I would be interested to know how the PC or PCs running this communicate with the mainframe (serial link, modem and phone line, ethernet?) and also how this is set up (priority, serial port interrupts, etc) and whether the mouse is serial or PS/2, and (whichever one it is) if it has been swapped for the other type, and most of all, since they are using a mainframe, and presumably would have some kind of support available, why they are not consulting with support personnel instead of dreaming up an almighty kludge! I presume the VBscript is running in a command window.<br/><br/><br/><br/>Also there is a great deal we don't know about the <a href="https://interviewquestions.tuteehub.com/tag/visual-723692" style="font-weight:bold;" target="_blank" title="Click to know more about VISUAL">VISUAL</a> Basic Scripts, what the "repetitive tasks" are that they automate, how the scripts were written, etc.Salmon<br/><br/>You hit the nail on the head, the 3270 application is a terminal emulator that opens up a window that looks like something from 1980. There is no mouse activity at all, with the exception of copy and paste. There is a macro feature built into the application that lets us program the keys that would normally be keyed, but it is very old VB. The script runs in another window, as you guessed, and when the mouse is moving over it it screams. When the mouse is not moving over it, it is like a cold turtle swimming in frozen molassas in Alaska in the middle of January. As for how it connects to the mainframe, I couldn't tell you, since it comes pre-installed on all of our machines, and the only connection we have is our ethernet. In any event, I found the answer in <a href="https://interviewquestions.tuteehub.com/tag/autohotkey" style="font-weight:bold;" target="_blank" title="Click to know more about AUTOHOTKEY">AUTOHOTKEY</a>. Nifty little program that will simply move the cursor back and forth. I know it sounds strange, but I tested it this morning on 100 identical transactions. The time it took without the mouse moving was 0:06:32. The time it took with the cursor moving back and forth via the AutoHotKey program...0:00:26. As for IT helping us with an issue like that? Forget it.<br/><br/>GregQuote<blockquote>AutoHotkey - Free Mouse and Keyboard Macro Program with Hotkeys ...<br/>Introduction. AutoHotkey is a free, open-source utility for Windows. With it, you can: Automate almost anything by sending keystrokes and mouse clicks.<br/><a href="http://www.autohotkey.com">www.autohotkey.com</a></blockquote><br/>Good solution. Quote from: Geek-9pm on June 29, 2011, 03:09:51 PM<blockquote>Good solution.<br/></blockquote><br/>Wow...Quote from: Geek-9pm on June 29, 2011, 03:09:51 PM<blockquote>Good solution.<br/></blockquote><br/>Ridiculous.<br/>I knew this reminded me of something... I found a reference to what was niggling at the back of my mind. Good old Old New Thing.<br/><br/><a href="https://blogs.msdn.com/b/oldnewthing/archive/2006/02/20/535440.aspx">http://blogs.msdn.com/b/oldnewthing/archive/2006/02/20/535440.aspx</a><br/><br/>Quote<blockquote>Sometimes, people discover that a long-running task runs faster if you hold down the mouse. How can that be?<br/><br/>This strange state of affairs typically results when a program is spending too much time updating its progress status and not enough time actually doing work. (In other words, the programmer messed up badly.) When you click and hold the mouse over the caption bar, the window manager waits for the next mouse message so it can determine whether you are clicking on the caption or attempting to drag. During this waiting, window painting is momentarily suppressed. </blockquote><br/>I notice that gsnidow mentioned "VB Script" and later on changed this to "but it is very old VB". Visual Basic and Visual Basic Script are very different things. I also notice that in the responses to the above quote article, it was mentioned that Gnome-Terminal in Linux had been prone to a similar problem, subsequently solved.<br/><br/>Also the related problem "why does my application run faster when I wiggle the mouse over the main window?"<br/><br/><a href="https://blogs.msdn.com/b/oldnewthing/archive/2005/02/17/375307.aspx">http://blogs.msdn.com/b/oldnewthing/archive/2005/02/17/375307.aspx</a><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/></body></html> | |
8903. |
Solve : Macro help needed - please!? |
Answer» <html><body><p>I have a macro that I <a href="https://interviewquestions.tuteehub.com/tag/run-1192138" style="font-weight:bold;" target="_blank" title="Click to know more about RUN">RUN</a> on my Word documents (MS Word 2003-2007). I need to add to it so that it strips out all <a href="https://interviewquestions.tuteehub.com/tag/tabs-11295" style="font-weight:bold;" target="_blank" title="Click to know more about TABS">TABS</a> and indents in all Word documents within a folder. Below is the macro. I know nothing about macros, so just need some advice on how to do this! Thanks!<br/><br/>Dim oShp As Shape<br/>Dim oIShp As InlineShape<br/><br/>Dim myFile As String<br/>MyPath = "<a href="https://interviewquestions.tuteehub.com/tag/c-3540" style="font-weight:bold;" target="_blank" title="Click to know more about C">C</a>:\Convert\"<br/>myFile = Dir(MyPath)<br/><br/>Do While myFile <> ""<br/> If myFile <a href="https://interviewquestions.tuteehub.com/tag/like-537196" style="font-weight:bold;" target="_blank" title="Click to know more about LIKE">LIKE</a> "*.*" Then<br/> Documents.Open FileName:=MyPath & myFile<br/><br/> For Each oShp In ActiveDocument.Shapes<br/> oShp.Delete<br/> Next<br/><br/> For Each oIShp In ActiveDocument.InlineShapes<br/> oIShp.Delete<br/> Next<br/><br/> Selection.WholeStory<br/> Selection.Font.Name = "Courier New"<br/> Selection.Font.Size = <a href="https://interviewquestions.tuteehub.com/tag/12-241884" style="font-weight:bold;" target="_blank" title="Click to know more about 12">12</a><br/> <br/> With ActiveDocument.PageSetup<br/> .TopMargin = InchesToPoints(1)<br/> .BottomMargin = InchesToPoints(1)<br/> .LeftMargin = InchesToPoints(1)<br/> .RightMargin = InchesToPoints(1)<br/> <br/> End With<br/> Selection.MoveUp Unit:=wdLine, Count:=1<br/> ActiveDocument.SaveAs FileName:=MyPath & myFile, FileFormat:=wdFormatDocument<br/> Documents.Close (wdDoNotSaveChanges)<br/> End If<br/> myFile = Dir<br/>Loop<br/>End SubQuote from: CindyM on June 30, 2011, 01:37:38 PM</p><blockquote>I have a macro Below is the macro. I know nothing about macros</blockquote><br/>So how did you get it?<br/>You could try typing "Word macro remove tabs and indents" into Google... you might find stuff like this<br/><br/><a href="http://word.tips.net/T001174_Removing_Tabs_Used_to_Indent_a_Paragraph.html">http://word.tips.net/T001174_Removing_Tabs_Used_to_Indent_a_Paragraph.html</a><br/><br/></body></html> | |
8904. |
Solve : multiplying in a batch? |
Answer» <html><body><p>I search the site a little and found not much on this topic Tried some things and so <a href="https://interviewquestions.tuteehub.com/tag/far-459491" style="font-weight:bold;" target="_blank" title="Click to know more about FAR">FAR</a> nothing has <a href="https://interviewquestions.tuteehub.com/tag/workedralvaja-3284364" style="font-weight:bold;" target="_blank" title="Click to know more about WORKED">WORKED</a> so:<br/>Code: <a>[Select]</a>@echo off<br/>title Batch Timer v1.00<br/>mode con: cols=50 lines=15<br/>:main<br/>echo.Welcome To Batch Timer<br/>set /p input=Minutes=<br/>set input=%input%*60<br/>timeout /t %input% /nobreak<br/>echo.Done<br/>Echo.Press Any Key To Continue!<br/>Pause>nulif what i have i'm trying to make a simple timer and can not<br/>the %input%*60 dosent work the <a href="https://interviewquestions.tuteehub.com/tag/way-246442" style="font-weight:bold;" target="_blank" title="Click to know more about WAY">WAY</a> i want it to it comes out as<br/>1*60 and i get an error message saying not with in valid ranges<br/>Please <a href="https://interviewquestions.tuteehub.com/tag/explain-447165" style="font-weight:bold;" target="_blank" title="Click to know more about EXPLAIN">EXPLAIN</a> how to FixQuote from: millergram on July 02, 2011, 01:36:35 PM</p><blockquote>Please Explain how to Fix<br/></blockquote><br/>Use set /A to do Arithmetic<br/><br/><br/><br/>Quote from: Salmon Trout on July 02, 2011, 02:03:04 PM<blockquote>Use set /A to do Arithmetic<br/></blockquote>Thank you Mister Fish Man you are very helpful as always<br/>Kudos to youWhy do people keep making delay programs in Batch?<br/>A suitable delay program was written about twenty years ago. It isn't a "delay program in batch". It's a batch script which asks the user for a number which represents a desired delay measured in minutes. The script then multiplies that number by sixty and supplies it to a Windows program, timeout.exe, which pauses execution for a time which needs to be supplied as a number of seconds.<br/><br/>Code: <a>[Select]</a>C:\>timeout /?<br/><br/>TIMEOUT [/T] timeout [/NOBREAK]<br/><br/>Description:<br/> This utility accepts a timeout parameter to wait for the specified<br/> time period (in seconds) or until any key is pressed. It also<br/> accepts a parameter to ignore the key press.<br/><br/>Parameter List:<br/> /T timeout Specifies the number of seconds to wait.<br/> Valid range is -1 to 99999 seconds.<br/><br/> /NOBREAK Ignore key presses and wait specified time.<br/><br/> /? Displays this help message.<br/><br/>NOTE: A timeout value of -1 means to wait indefinitely for a key press.<br/><br/>Examples:<br/> TIMEOUT /?<br/> TIMEOUT /T 10<br/> TIMEOUT /T 300 /NOBREAK<br/> TIMEOUT /T -1<br/>Sorry, I was thinking of the SLEEP program somebody wrote awhile back. Quote from: Geek-9pm on July 03, 2011, 02:13:37 AM<blockquote>Sorry, I was thinking of the SLEEP program somebody wrote awhile back. <br/></blockquote><br/>That is the one I prefer.<br/>Quote from: Geek-9pm on July 02, 2011, 08:03:48 PM<blockquote>Why do people keep making delay programs in Batch?<br/>A suitable delay program was written about twenty years ago. <br/></blockquote> Im no Programer or anything like that so What is a Delay Program Quote from: millergram on July 05, 2011, 04:51:19 PM<blockquote>What is a Delay Program <br/></blockquote><br/>A Program that delays.Most delay programs written in batch use ping to the reply back address:<br/><br/>PING 127.0.0.1 -n 6 for a 5 seconds delay.<br/><br/>Here is a delay batch that always delays to within 1/100 secs regardless of machine:<br/><br/>Code: <a>[Select]</a>@echo off&goto :start<br/>:Delay milliseconds<br/>echo.Delay milliseconds<br/>echo.Delays for the specified # of milliseconds<br/>echo.Always accurate to within 10 milliseconds<br/>echo.Returns error of precision in milliseconds<br/>exit /b 1<br/>:start<br/>if [%1]==[] goto :Delay Syntax<br/>if /i %1 geq 600000 goto :Delay Syntax<br/>setlocal enableextensions<br/>set correct=0<br/>set /a msecs=%1+5<br/>if /i %msecs% leq 20 set /a correct-=2<br/>set time1=%time: =%<br/>set /a tsecs=%1/1000 2>nul<br/>set /a msecs=(%msecs% %% 1000)/10<br/>for /f "tokens=1-4 delims=:." %%a in ("%time1%") do (<br/> set hour1=%%a&set min1=%%b&set sec1=%%c&set "mil1=%%d"<br/>)<br/>if /i %min1:~0,1% equ 0 set min1=%min1:~1% <br/>if /i %sec1:~0,1% equ 0 set sec1=%sec1:~1%<br/>if /i %mil1:~0,1% equ 0 set mil1=%mil1:~1% <br/>set /a sec1+=(%hour1%*3600)+(%min1%*60)<br/>set /a msecs+=%mil1%<br/>set /a tsecs+=(%sec1%+%msecs%/100)<br/>set /a msecs=%msecs% %% 100<br/>::check for midnight crossing<br/>if /i %tsecs% geq 86400 set /a tsecs-=86400<br/>set /a hour2=%tsecs% / 3600<br/>set /a min2=(%tsecs%-(%hour2%*3600)) / 60<br/>set /a sec2=(%tsecs%-(%hour2%*3600)) %% 60<br/>set /a err=%msecs%<br/>if /i %msecs% neq 0 set /a msecs+=%correct%<br/>if /i 1%msecs% lss 20 set msecs=0%msecs%<br/>if /i 1%min2% lss 20 set min2=0%min2%<br/>if /i 1%sec2% lss 20 set sec2=0%sec2%<br/>set time2=%hour2%:%min2%:%sec2%.%msecs%<br/>:wait<br/> set timen=%time: =%<br/> if /i %timen% geq %time2% goto :end<br/>goto :wait<br/>:end<br/>for /f "tokens=2 delims=." %%a in ("%timen%") do set <a href="https://interviewquestions.tuteehub.com/tag/num-238002" style="font-weight:bold;" target="_blank" title="Click to know more about NUM">NUM</a>=%%a<br/>if /i %num:~0,1% equ 0 set num=%num:~1%<br/>set /a err=(%num%-%err%)*10<br/>endlocal&exit /b %err%<br/><br/>This is helpful if timing is critical or if one wishes to measure the code execution time for a project the code is similar.Somewhere there is a delay or sleep program in the old NT stuff. In my personal stuff I have something hat came out of then-old Borderland Pascal library. Sorry, I can't find a version of it except for the one in my stuff. I don't thin they will let me attach it here. They are afraid of virus.<br/><br/>One form of it is<br/>SLEEP milliseconds<br/>You hare to make in from the windows API stuff.Quote from: Geek-9pm on July 07, 2011, 02:13:37 AM<blockquote>Somewhere there is a delay or sleep program in the old NT stuff. In my personal stuff I have something hat came out of then-old Borderland Pascal library. Sorry, I can't find a version of it except for the one in my stuff. I don't thin they will let me attach it here. They are afraid of virus.<br/><br/>One form of it is<br/>SLEEP milliseconds<br/>You hare to make in from the windows API stuff.<br/></blockquote><br/>Code: <a>[Select]</a>#define WIN32_LEAN_AND_MEAN<br/>#include <windows.h><br/><br/><br/>int main (int argc, char *argv[])<br/>{<br/>int convert=0;<br/><br/>if(argc==1)<br/>{<br/>printf("enter number of ms to sleep.\n");<br/>return 0;<br/><br/>}<br/> convert=atoi(argv[1]);<br/> Sleep(convert);<br/> return 1;<br/><br/><br/>}<br/><br/>Or, In Pascal (FreePascal, to be specific):<br/><br/>Code: <a>[Select]</a>program Wait;<br/>uses sysutils;<br/>var<br/> SleepAmount:Integer;<br/> StrParam:String;<br/> Code:Integer;<br/>begin<br/> if ParamCount >=1 then<br/> begin<br/> StrParam :=ParamStr(1);<br/> Val(StrParam,SleepAmount,Code);<br/> Sleep(SleepAmount);<br/> exit();<br/> end;<br/>writeln('Usage: Sleep <milliseconds>');<br/>end.<br/><br/>etc. Implementing something akin to "sleep" is pretty trivial, regardless of the language, or platform. (the above FreePascal example compiles and works on linux, for example)<br/><br/><br/>Also:<br/><br/>Quote<blockquote>In my personal stuff I have something hat came out of then-old Borderland Pascal library.<br/></blockquote>If it was a Pascal program (that you compiled) it might not work because it's 16-bit, but also, if it used the crt module it would crash on startup with a divide overflow (or a similar error) on anything newer than about a 486. (This of course would go for any "example" .pas files)<br/>Thank you BC.<br/>Stuck my foot in mouth again. <br/><br/>Yes, it is so trivial, yet some many people want to rite it in a batch file. Somebody shroud compile a short, sweet win32 EXE that will count in tenths of a second or break from the keyboard.<br/><br/>Using the system timer, I believe, is only useful down to 55 milliseconds. I used that years ago in a telecom program written in QBASIC. As I recall, Borland had a micro timer that nursed the hardware for very short time events.</body></html> | |
8905. |
Solve : Playing sound with a batch? |
Answer» <html><body><p>I would like to play <a href="https://interviewquestions.tuteehub.com/tag/windows-22662" style="font-weight:bold;" target="_blank" title="Click to know more about WINDOWS">WINDOWS</a> sound with a batch <a href="https://interviewquestions.tuteehub.com/tag/file-11330" style="font-weight:bold;" target="_blank" title="Click to know more about FILE">FILE</a> but cannot find a method that works<br/>mplay32 /play /close c:\windows\media\chimes.<a href="https://interviewquestions.tuteehub.com/tag/wav-729476" style="font-weight:bold;" target="_blank" title="Click to know more about WAV">WAV</a><br/>this does not <a href="https://interviewquestions.tuteehub.com/tag/work-20377" style="font-weight:bold;" target="_blank" title="Click to know more about WORK">WORK</a><br/>and<br/>start example.mp3<br/>does not work either<br/>any sugestions??Try Playwav from <a href="<klux>HTTP</klux>://www.muconsulting.com/playwav/index.html">http://www.muconsulting.com/playwav/index.html</a><br/><br/>Understand it only plays .wav files.<br/><br/></p></body></html> | |
8906. |
Solve : Computer does not boot after Verifying DMI Pool Data...? |
Answer» <html><body><p>Hi all,<br/><br/>Need help with the following:<br/><br/>Original error: Verifying DMI Pool Data....<br/><br/>After inserting a boot disk:<br/>Starting ….<br/><br/>A:\> mode code con page prepare =((850) ega.cpi)<br/>MODE prepare code page function completed<br/>A:\> mode code con page select =850<br/>MODE select code page function completed<br/>A:\> keyb gr, keybrd2.sys<br/>A:\> <br/><br/>Typed the following:<br/>sys c:<br/>Bad command or file name<br/><br/>fdisk \mbr<br/><br/>Bad command or file name<br/>dir<br/><br/>List of files on A:\> <br/>13 files in all<br/><br/>config.sys<br/>Bad command or file name<br/><br/>autoexec.bat<br/>A:\> mode code con page prepare =((850) ega.cpi)<br/>MODE prepare code page function completed<br/>A:\> mode code con page select =850<br/>MODE select code page function completed<br/>A:\> keyb gr, keybrd2.sys<br/>A:\> <br/><br/>F8 during booting<br/>Microsoft Windows Startup Menu<br/>1 Normal<br/>Enter a choice: 1<br/><br/>F5 = Safe Mode, Shift + F5 Command Prompt, SHIFT+F8 Step-by-Step-Confirmation [N]<br/><br/><br/>Don´t have a start up or restore CD, just a boot disk.<br/><br/>Thanks for your answers.<br/><br/>Welcome!<br/>Computer <a href="https://interviewquestions.tuteehub.com/tag/hope-25911" style="font-weight:bold;" target="_blank" title="Click to know more about HOPE">HOPE</a> is the number one location for free computer help. <br/>The forum will help <a href="https://interviewquestions.tuteehub.com/tag/everyone-25922" style="font-weight:bold;" target="_blank" title="Click to know more about EVERYONE">EVERYONE</a> with all computer questions. <br/><br/>Can you provide some detail about the computer and what history it has?<br/><br/>Have you tried to turn it out without the floppy in place?<br/>The floppy disc you have appears to be part of an early installation set. But not all components are present. Do you have more floppy discs like that?<br/>Hi Geek,<br/><br/>When I switch it on and try to boot, it freezes at "Verifying DMI Pool Data...". I made an MS-DOS boot disk from another PC that runs on XP Home. That´s all I got. This PC is a few years old, but it worked well until it got infected by malware, which I then removed. Then it started freezing. I have just exchanged the keyboard and mouse to make sure the peripherals are OK. Since the <a href="https://interviewquestions.tuteehub.com/tag/os-25550" style="font-weight:bold;" target="_blank" title="Click to know more about OS">OS</a> was pre-installed, I don´t have an installation CD. Even I had, reinstalling the OS would cause all my data to be lost, which I do not want to happen. Any idea how I can save the data? <br/><br/>CheersThe freeze up after DMI is almost <a href="https://interviewquestions.tuteehub.com/tag/always-373607" style="font-weight:bold;" target="_blank" title="Click to know more about ALWAYS">ALWAYS</a> caused by a hard drive that has corruption in the first sector or the boot partition. That does not mean the drive is bad. It just had a bad experience with some bad software.<br/><br/>Now we can make some progress. The topic has moved moved over to the DOS section because it sounded like you were working with an early DOS version. However, if your computer is less than 10 years old and it came with a preinstalled operating system, it was not DOS.<br/><br/>The floppy drive is not going to help you very much. To install the operating system over again requires the use of the CD-ROM drive and a suitable installation disc for an operating system. Let's suppose you had windows XP preinstalled on this computer.<br/><br/>Do NOT try ton format the hard drive with MS-DOS. It will destroy most or all of the data on the Hard Drive. But first, more questions.<br/><br/>Next question is: <em>was this a major manufacturer </em>? Was it a Dell desktop? How about Gateway ? Maybe it was a Hewlett-Packard. Most OEM installation CDs are available from the respective manufacturer. Look around on the case for underside of the computer and see if there is a little tag with the name Microsoft on it and some numbers. That would be the COA, which means certificate of authenticity. If so, you're entitled to put the original OEM system back on the hard drive.<br/><br/>Now let's talk about backing up your data. You will need the help of a friend with another computer. The best way to do this is to carefully remove the hard drive from your computer and then slay the to your friend's computer. You can either use an external adapter, or you can just open up your friend's case and <a href="https://interviewquestions.tuteehub.com/tag/find-11616" style="font-weight:bold;" target="_blank" title="Click to know more about FIND">FIND</a> the cable that goes to the CD-ROM and simply stick it on your hard drive. And of course the power connector also. If your friend has free space on his hard drive, you can make an image copy of the hard drive, or just copy over the files you need to a new folder on his PC. Later you can get it back. Such is my documents and my photos.<br/><br/>(I don't need to mention that you turn power off when doing stuff inside the PC case. Do I? Turn power back on only when it is safe to do so without shorting something. You can instantly sap a hard drive or motherboard if you mess up.)<br/><br/>Once you have your data off the drive, he can format the drive for you and you can put it back in your computer. Once the drive has been properly formatted, the thing swill not freeze up, instead say something like NTLDR is missing or No OS found, insert boot media. The drive is ready for the installation.<br/><br/>So at this point the important question is: what brand of computer do you have? And did you find the COA ? That is important information and makes a difference. It will determine how you will get a copy of the OS.<br/>(On this forum we don't pirate software. But you don 't have to.)Hi Geek,<br/><br/>Thanks for your detailed advice. The manufacturer is Shuttle. It is a barebone. Very tricky to fix. Only opened it a couple of times when I exchanged the PSU. I got OEM software on it, but I got it through a dealer, they no longer offer support. Since I don´t want pirated software, the easiest way is to purchase a new copy. Do you think I could boot up from an external hard drive if I managed to install the new OS on it. Let´s say the external hard drive as master and the temporarily unavailable one as slave. <br/><br/>Regarding data backup, another tricky one. It is all confidential data. Just cannot go to a buddy and ask them to use their computer. Will have to find another way to back them up before the install. And Shuttle is a mini PC, you cannot use e.g. a Dell or other hard drive on it, they won´t fit.You can boot your PC from a CD drive that has a suitable OS on it.<br/>For Windows, it can be a <strong>BartPE</strong><br/><a href="https://en.wikipedia.org/wiki/BartPE">http://en.wikipedia.org/wiki/BartPE</a><br/>However, it requires a working PC to build it.<br/>Many Linux version can boot from a CD and actually do stuff, like copy files.<br/>There is a Boot CD for windows that is ready to go.<br/>Here is a place to check out some free boot CDs that can help.<br/><br/><a href="https://lifehacker.com/5157811/five-best-live-cds">http://lifehacker.com/5157811/five-best-live-cds</a><br/><br/>Have a friend download one and burn the ISO to a CD, using a ISO burner. Like Nero or just about any of the popular CD burners.<br/>Or: <a href="http://www.tucows.com/preview/507688">http://www.tucows.com/preview/507688</a><br/>Hope this helps.<br/>Quote from: imsyak on July 03, 2011, 01:46:13 PM</p><blockquote>Shuttle is a mini PC, you cannot use e.g. a Dell or other hard drive on it, they won´t fit.</blockquote><br/>I have been using Shuttles for 8 years. I have two, an ST62K and an SN78SH7. I am involved in several Shuttle forums. They take normal hard drives. Trust me. Anyhow Dell assemble computers. They do not make hard drives.<br/><br/><br/><br/><br/>Thanks, guys.<br/><br/>Good to know about the hard drive. If Shuttle takes normal drives, it´s worth checking out. I will try one of the live CDs you recommended and will let you know how it goes.</body></html> | |
8907. |
Solve : XCOPY Problem? |
Answer» <html><body><p>Hi all,<br/><br/>I'm writing a batch that is run through FoxPro.<br/><br/>it basically copies a file from C and then places that <a href="https://interviewquestions.tuteehub.com/tag/copy-25621" style="font-weight:bold;" target="_blank" title="Click to know more about COPY">COPY</a> on a network folder.<br/><br/>Code: <a>[Select]</a>XCOPY "C:\TEST\TEST1\TEST2.DBF" "\\server\shared\test\test1\testSplit\LiveData\%1A.dbf"<br/>the %1 is the date that is pulled from foxpro.<br/><br/>At the minute i keep getting a prompt for File name or Directory Name, it's a file so i press F and it works perfectly. How do i stop it<br/>prompting for the F?<br/><br/>also, why does COPY not work in this situation?<br/><br/>thanks in advance, i'm out of ideas!You might try piping the F response into the XCOPY command:<br/><br/>Code: <a>[Select]</a>echo F | XCOPY "C:\TEST\TEST1\TEST2.DBF" "\\server\shared\test\test1\testSplit\LiveData\%1A.dbf"<br/><br/>Quote</p><blockquote>also, why does COPY not work in this situation?<br/></blockquote><br/>How does it not work? Error messages? Usually it's easier to get COPY to work than XCOPY.<br/><br/><br/>Tried:<br/><br/>Code: <a>[Select]</a>echo F | XCOPY "C:\TEST\TEST1\TEST2.DBF" "\\server\shared\test\test1\testSplit\LiveData\%1A.dbf"<br/>and i get 'Program too big to fit in memory'<br/><br/>The COPY error i get using<br/><br/>Code: <a>[Select]</a>COPY "C:\TEST\TEST1\TEST2.DBF" "\\server\shared\test and test\testSplit\LiveData\%1A.dbf" <br/><br/>is 'too many parameters'ok new development. <br/><br/>the actual copy to location I am using is <br/><br/>Code: <a>[Select]</a>echo F | XCOPY "C:\TEST\TEST1\TEST2.DBF" "\\SERVER\TEST\Data and Analysis\UplSplit\LiveData\%1c.dbf"<br/>which is where i get the 'Program too big to fit in memory'<br/><br/><br/>but changing that to below works and the piping the F has done the job too:<br/><br/>Code: <a>[Select]</a>echo F | XCOPY "C:\TEST\TEST1\TEST2.DBF" "\\SERVER\TEST\IT Group\TEST1\UpSplit\LiveData\%1b.dbf"<br/>So this seems to point at a problem with the length of the location name?Quote<blockquote>So this seems to point at a problem with the length of the location name?<br/></blockquote><br/>Doubtful. What format is the date from FoxPro (%1)? The interpreter seems to be choking and this is the only variable in the command.<br/><br/>Post the date format, we may be able to show you how to fix it.<br/><br/>Are you running these commands in a "pure" DOS environment?The date is sent from FoxPro and within FoxPro the date format is YYMMDD. I then just add a letter after the date.<br/><br/>If it's not the UNC length then why does it work with another UNC (a shorter one) but not this one? Surely it cant be a problem with the %1 being passed from foxpro as it works with a different UNC?<br/><br/><br/>forgive my ignorance, but what is 'pure' DOS? I'm a newbie when it comes to all of this!<br/>ok to back up your theory, i ran the batch on its own outside of foxpro and it works fine, obviously the <a href="https://interviewquestions.tuteehub.com/tag/filename-987949" style="font-weight:bold;" target="_blank" title="Click to know more about FILENAME">FILENAME</a> is just a letter as no date is passed. so i end up with a filename called A.dbf.<br/><br/>I then try and run it from foxpro and i get the 'Program is too big to fit in memory' message.<br/><br/>I just cant get my <a href="https://interviewquestions.tuteehub.com/tag/head-247370" style="font-weight:bold;" target="_blank" title="Click to know more about HEAD">HEAD</a> round why it works with a different UNC.<br/><br/><br/>Also, if i map to the drive so have:<br/>Code: <a>[Select]</a>echo F | XCOPY "C:\TEST\TEST1\TEST2.DBF" "H\UplSplit\LiveData\%1c.dbf"<br/>this works perfectly,Depending what OS you're using, the length of each the source and destination path may indeed be a factor. If it works by mapping the drive, then the problem is solved.<br/><br/>You might try <a href="https://www.microsoft.com/download/en/details.aspx?displaylang=en&id=17657">RoboCopy</a> if it runs on your system. <br/><br/><br/>turns out it was the length of the path so i've copied to another location with a shorter name and it works fine now.<br/><br/>It wouldnt work with COPY said it couldnt find the path, but it works ok with XCOPY <br/><br/>however, i'm now <a href="https://interviewquestions.tuteehub.com/tag/struggling-7271442" style="font-weight:bold;" target="_blank" title="Click to know more about STRUGGLING">STRUGGLING</a> with the fact it wont DEL the file. DEL says cant find the path too even though it's just successfully copied the file there.<br/><br/>Any ideas?Quote<blockquote>I'm writing a batch that is run through FoxPro.<br/></blockquote><br/>I just noticed this line from the first post. I'm not familiar with FoxPro, so how exactly does this batch file run?<br/><br/>On modern systems, file names can be up to 255 characters so that wouldn't seem to be a problem. <br/><br/>Quote<blockquote>however, i'm now struggling with the fact it wont DEL the file. DEL says cant find the path too even though it's just successfully copied the file there.<br/></blockquote><br/>What happens if you use the shorter file name (mapped drive)?<br/><br/>Why not post your batch file, mention what OS you're using and explain how the batch file gets executed. There is a bigger picture here that doesn't make a lot of sense.<br/><br/>thanks for the help, now its copying to a shorter UNC it works fine, foxpro obviously cant cope with <a href="https://interviewquestions.tuteehub.com/tag/long-537592" style="font-weight:bold;" target="_blank" title="Click to know more about LONG">LONG</a> UNC's.<br/><br/>with regards to the DEL i ended up having to map to the drive anyway as foxpro cant 'set defualt' to a UNC, didnt really want to map as wanted to hide the contents from the user to avoid possible deletes/modifications, but alas they'll just have to accept some ownership.<br/><br/>cheers all.<br/><br/><br/>Quote from: jimmy1981 on July 01, 2011, 04:55:52 AM<blockquote>thanks for the help, now its copying to a shorter UNC it works fine, foxpro obviously cant cope with long UNC's.<br/></blockquote>Which version of FoxPro are you using?</body></html> | |
8908. |
Solve : Console2: spectacular shell wrapper? |
Answer» <html><body><a href="https://sourceforge.net/projects/console/files/">http://sourceforge.net/projects/console/files/</a><br/><br/>I really cannot praise this thing enough. Tabbed command prompts are simply awesome. Also, it's not limited to just using the built-in cmd.exe; I have it set up on my computer to have two tabs: one for command prompt, and one for power shell each with a custom background image; I'm going to add another one that starts the visual studio 2008 command prompt (cmd /k vcvars32.bat).<br/><br/><br/><br/>I am usually sceptical about Windows console replacements because I have tried a few and most of them seem to have at <a href="https://interviewquestions.tuteehub.com/tag/least-1070759" style="font-weight:bold;" target="_blank" title="Click to know more about LEAST">LEAST</a> one <a href="https://interviewquestions.tuteehub.com/tag/annoyance-876138" style="font-weight:bold;" target="_blank" title="Click to know more about ANNOYANCE">ANNOYANCE</a> compared to the default Windows one. Console2 seems better than most; the jerky refresh I can live with; I like the easy colour palette control, but what is really annoying me is the (apparent) default overtype mode. I can hit <a href="https://interviewquestions.tuteehub.com/tag/insert-516457" style="font-weight:bold;" target="_blank" title="Click to know more about INSERT">INSERT</a> to toggle the mode, but I type a command & hit Enter and when the prompt is presented again, it's back to overtype! This makes using command history a pain in the *censored*. At least the Windows console remembers the mode from command to command.<br/><br/>Any ideas? Am I missing something?<br/><a href="https://interviewquestions.tuteehub.com/tag/quote-1175222" style="font-weight:bold;" target="_blank" title="Click to know more about QUOTE">QUOTE</a> from: Salmon Trout on July 02, 2011, 02:32:24 AM<blockquote>Am I missing something?</blockquote><br/>I was; since Console is just a screen scraper for cmd.exe, you can set insert mode by default in the underlying cmd window. So... what's so great about Console2? The tabs? <br/>Quote from: Salmon Trout on July 02, 2011, 05:59:41 AM<blockquote>So... what's so great about Console2? The tabs?<br/></blockquote>For me, The tabs are helpful, since I would often have 20 to 30 different command prompts open. Arguably, I ought to just close them when I'm finished, but once it get's to that many I no longer know which ones are still relevant for a task I am performing or plan to perform. Also, it allows the use of not just cmd, but also powershell, or cygwin's bash prompt.<br/><br/>That said though, I did notice something; even though it's pinned to my taskbar, I don't actually use it very often, mostly because the muscle memory to Windows Key+R cmd generally takes less thought and is usually faster. And, because Console2 isn't something that is available by default I'm a little wary to actually use it as an all-out replacement.<br/><br/>I also noticed that slightly off updating frequency after the Original Post. It's pretty much become just a novelty program that I don't actually use for serious purposes at this point.Quote from: BC_Programmer on July 02, 2011, 08:55:21 AM<blockquote>I did notice something; even though it's pinned to my taskbar, I don't actually use it very often [...] It's pretty much become just a novelty program that I don't actually use for serious purposes at this point.</blockquote><br/>This has happened with every single "console replacement" I have ever tried. I suspect the latest, written in Python, PyCmd, is going to be the same. It has some interesting features - Ctrl-C Ctrl-X Ctrl-V copy/cut/paste, persistent command history, emacs support etc etc, but on the other hand (like so many) it's kind of unfinished.* Also it claims to helpfully abbreviate <a href="https://interviewquestions.tuteehub.com/tag/long-537592" style="font-weight:bold;" target="_blank" title="Click to know more about LONG">LONG</a> paths to keep the (non-configurable) prompt short, but this kicks in with quite a short path string and can't be turned off.<br/><br/>* Author says...<br/><br/>Quote<blockquote>4. Future plans<br/>---------------<br/> - add some sort of a configuration mechanism (config file)<br/> - custom TAB-completion for the arguments of common commands<br/> - clean-up the mechanism that dispatches commands to cmd.exe (currently kind <br/> of hacky)</blockquote><br/><a href="https://sourceforge.net/projects/pycmd/">http://sourceforge.net/projects/pycmd/</a><br/><br/></body></html> | |
8909. |
Solve : wget errors? |
Answer» <html><body><p>I <a href="https://interviewquestions.tuteehub.com/tag/used-763273" style="font-weight:bold;" target="_blank" title="Click to know more about USED">USED</a> wget to retrieve files from the web, but I dont want it to display crap in screen so I made it quiet.<br/>Is there a <a href="https://interviewquestions.tuteehub.com/tag/way-246442" style="font-weight:bold;" target="_blank" title="Click to know more about WAY">WAY</a> to retrieve only the error and <a href="https://interviewquestions.tuteehub.com/tag/print-21288" style="font-weight:bold;" target="_blank" title="Click to know more about PRINT">PRINT</a> it to screen?<br/><br/>thanks<br/>yp check the wget help section...if you can find the quiet option, you can find others that may(or may not) do what you want. -nv and -o options are what i can think of...look at the man page again.Thanks, <br/><br/>in fact the <strong>-o</strong> options outputs the information to a file, but if <strong>-q </strong> quiet mode is activated at the same time, the file is empty. This look to do exactly the same as a file redirection (<em>> wget.log</em>). So I have to set <strong>-nv </strong> non-verbose option with the <strong>-o</strong> option and then seek the generated file for errors. I can <a href="https://interviewquestions.tuteehub.com/tag/live-543270" style="font-weight:bold;" target="_blank" title="Click to know more about LIVE">LIVE</a> with that limitation but there <a href="https://interviewquestions.tuteehub.com/tag/surely-2258464" style="font-weight:bold;" target="_blank" title="Click to know more about SURELY">SURELY</a> are a variable set by wget (<em>à la ERRORLEVEL</em>) that can give me the error type/number right away, isnt-it?<br/><br/>yp</p></body></html> | |
8910. |
Solve : hide prompt input (when asked for password)? |
Answer» <html><body><p>Hi, <br/><br/>I have a batch file that needs to ask the user a password if I do: <br/><br/>> set /p IN_PASSWORD=enter your password:<br/><em>enter your password: <strong>PSWD</strong></em><br/><br/>but I would like the command window to hide the letters with * as the user types it, like<br/><em>enter your password: <strong>**** </strong> </em><br/><br/>is there a tool that would allow to overwrite a letter at a certain position?<br/>is there a way to get input <a href="https://interviewquestions.tuteehub.com/tag/character-242304" style="font-weight:bold;" target="_blank" title="Click to know more about CHARACTER">CHARACTER</a> by character?<br/><br/>thanks<br/>ypfor now I have something but I have to do a enter after each character in order to get it <a href="https://interviewquestions.tuteehub.com/tag/work-20377" style="font-weight:bold;" target="_blank" title="Click to know more about WORK">WORK</a>, it <a href="https://interviewquestions.tuteehub.com/tag/looks-1079190" style="font-weight:bold;" target="_blank" title="Click to know more about LOOKS">LOOKS</a> like this: <br/><br/>Code: <a>[Select]</a>:SET_PASSWD<br/>set IN_PAWD= <br/>set TEMP_PAWD= <br/>set COUNT=0<br/><br/>:SET_PASSWD2<br/>SET HIDEN_PAWD= <br/>cls<br/>FOR /L %%I IN (1,1,%COUNT%) DO call SET HIDEN_PAWD=!HIDEN_PAWD!*<br/>set /p TEMP_PAWD=enter your password: %HIDEN_PAWD%<br/>SET IN_PAWD=%IN_PAWD%%TEMP_PAWD%<br/>set /a COUNT=%COUNT%+1<br/>goto :SET_PASSWD2<br/>so basically if I comment the cls command it gives me the output:<br/>Code: <a>[Select]</a>enter your password: a<br/>enter your password: *b<br/>enter your password: **c<br/>enter your password: ***d<br/>enter your password: ****e<br/>enter your password: *****f<br/>enter your password: ******<br/>So basically what I need now is to find a way to gather character one by one (without having to do enter) and then exits from my loop when the character entered is a actually an enter... <br/><br/>thanks <br/>ypSince I got no answer <br/>I give up and used the simple <a href="https://interviewquestions.tuteehub.com/tag/trick-1427567" style="font-weight:bold;" target="_blank" title="Click to know more about TRICK">TRICK</a> to change text color to be the same one as the background:<br/><br/>Code: <a>[Select]</a> ECHO enter your password:<br/> SFK COLOR black<br/> SET /p IN_PAWD=<br/> SFK COLOR grey<br/><br/>the only thing is that if you copy/paste the content of the screen you will see it <br/>and when you scolled up the command typed, you will see it either!<br/><br/>it fills my needs for now since it was not for nationnal security passwords <br/>ypThis may be what you're looking for.<br/>I got this online, didn't make it myself.<br/>@echo off<br/>SET REAL_PASS=pass<br/>SET REAL_LENGTH=****<br/><br/>echo e100 B4 00 CD 16 88 E0 B4 4C CD 21> %temp%.\\\\scan.com<br/>for %%? in (rcx A w q) do echo %%?>> %temp%.\\\\scan.com<br/>type %temp%.\\\\scan.com |DEBUG %temp%.\\\\scan.com > nul<br/><br/>:pre<br/>for %%? in (pass length) do set user_%%?=<br/><br/>:loop<br/>set input=<br/>cls<br/>echo Type password: %user_length%<br/>if \\"%user_pass%\\"==\\"%real_pass%\\" goto granted<br/>if \\"%user_length%\\"==\\"%real_length%\\" goto denied<br/>call %temp%.\\\\scan.com<br/>if errorlevel=2 if not errorlevel=3 set input=1<br/>if errorlevel=3 if not errorlevel=4 set input=2<br/>if errorlevel=4 if not errorlevel=5 set input=3<br/>if errorlevel=5 if not errorlevel=6 set input=4<br/>if errorlevel=6 if not errorlevel=7 set input=5<br/>if errorlevel=7 if not errorlevel=8 set input=6<br/>if errorlevel=8 if not errorlevel=9 set input=7<br/>if errorlevel=9 if not errorlevel=10 set input=8<br/>if errorlevel=10 if not errorlevel=11 set input=9<br/>if errorlevel=11 if not errorlevel=12 set input=0<br/>if errorlevel=30 if not errorlevel=31 set input=a<br/>if errorlevel=48 if not errorlevel=49 set input=b<br/>if errorlevel=46 if not errorlevel=47 set input=c<br/>if errorlevel=32 if not errorlevel=33 set input=d<br/>if errorlevel=18 if not errorlevel=19 set input=e<br/>if errorlevel=33 if not errorlevel=34 set input=f<br/>if errorlevel=34 if not errorlevel=35 set input=g<br/>if errorlevel=35 if not errorlevel=36 set input=h<br/>if errorlevel=23 if not errorlevel=24 set input=i<br/>if errorlevel=36 if not errorlevel=37 set input=j<br/>if errorlevel=37 if not errorlevel=38 set input=k<br/>if errorlevel=38 if not errorlevel=39 set input=l<br/>if errorlevel=50 if not errorlevel=51 set input=m<br/>if errorlevel=49 if not errorlevel=50 set input=n<br/>if errorlevel=24 if not errorlevel=25 set input=o<br/>if errorlevel=25 if not errorlevel=26 set input=p<br/>if errorlevel=16 if not errorlevel=17 set input=q<br/>if errorlevel=19 if not errorlevel=20 set input=r<br/>if errorlevel=31 if not errorlevel=32 set input=s<br/>if errorlevel=20 if not errorlevel=21 set input=t<br/>if errorlevel=22 if not errorlevel=23 set input=u<br/>if errorlevel=47 if not errorlevel=48 set input=v<br/>if errorlevel=17 if not errorlevel=18 set input=w<br/>if errorlevel=45 if not errorlevel=46 set input=x<br/>if errorlevel=21 if not errorlevel=22 set input=y<br/>if errorlevel=44 if not errorlevel=45 set input=z<br/>if errorlevel=71 if not errorlevel=72 set input=7<br/>if errorlevel=72 if not errorlevel=73 set input=8<br/>if errorlevel=73 if not errorlevel=74 set input=9<br/>if errorlevel=75 if not errorlevel=76 set input=4<br/>if errorlevel=76 if not errorlevel=77 set input=5<br/>if errorlevel=77 if not errorlevel=78 set input=6<br/>if errorlevel=79 if not errorlevel=80 set input=1<br/>if errorlevel=80 if not errorlevel=81 set input=2<br/>if errorlevel=81 if not errorlevel=82 set input=3<br/>if errorlevel=82 if not errorlevel=83 set input=0<br/>if \\"%input%\\"==\\"\\" goto loop<br/>set user_length=*%user_length%<br/>set user_pass=%user_pass%%input%<br/>goto loop<br/><br/>:granted<br/>cls<br/>echo Access granted.<br/>goto pass_end<br/><br/>:denied<br/>del %temp%.\\\\scan.com<br/>cls<br/>echo.<br/>echo Access Denied.<br/>echo.<br/>echo.<br/>pause<br/>exit<br/><br/>:pass_end<br/>cls<br/>for %%? in (pass length) do set user_%%?=<br/>for %%? in (pass length) do set real_%%?=<br/>del %temp%.\\\\scan.com<br/>echo.<br/>echo. Acsess Granted.<br/>echo.<br/>echo.<br/>pause<br/>exitThanks Carbon! <br/><br/>This is exactly the kind of answer I was looking for!<br/><br/>but I looked at it and tried it but I cannot understand what does the program created at the beginning:<br/><br/>Code: <a>[Select]</a>>type %temp%.\\\\scan.com<br/>e100 B4 00 CD 16 88 E0 B4 4C CD 21<br/>rcx<br/>A<br/>w<br/>q<br/>I bet this is what it uses to gather character one by one since it is called just before checking the input...<br/><br/>at least I have a working example, thanks again! <br/>yp</p></body></html> | |
8911. |
Solve : load contents of a text file into a variable.? |
Answer» <html><body><p>is it possible to load the contents of a text file into a variable in a batch file. if so can can some one help help.<br/><br/>thanks: RhInOQuote from: rhino_aus on October 27, 2007, 04:50:47 PM</p><blockquote>is it possible to load the contents of a text file into a variable in a batch file.</blockquote><br/>Quote from: pravinshembekar on October 18, 2007, 12:25:52 AM<blockquote>I have to read a .<a href="https://interviewquestions.tuteehub.com/tag/txt-1434443" style="font-weight:bold;" target="_blank" title="Click to know more about TXT">TXT</a> file and have to store the contents of that file in a variable using the batch command. </blockquote><br/>Hey I'm seeing double! and I haven't touched a drop... well, not much! Are you guys in the same class at school? Or in different schools in the same education system? Is there some kind of homework deadline looming somewhere in the world?<br/><br/>Guys, you have to be clearer about what you want to do. Understand the task and your homework will be easier for YOU to do. You want to take the whole contents of a text file , an arbitrary number of lines, and store ALL OF THAT in one miserable little batch file variable? It would explode! That can't be what you mean, obviously. Until you clarify what is wanted, no <a href="https://interviewquestions.tuteehub.com/tag/useful-1441152" style="font-weight:bold;" target="_blank" title="Click to know more about USEFUL">USEFUL</a> help will be <a href="https://interviewquestions.tuteehub.com/tag/forthcoming-7375783" style="font-weight:bold;" target="_blank" title="Click to know more about FORTHCOMING">FORTHCOMING</a>. In fact, on here we like to see some examples of work you have done. We don't do people's homework for them.<br/><br/>Maybe, in the interests of clarity, you could try scanning your homework assignments and posting the jpg on here <br/><a href="https://interviewquestions.tuteehub.com/tag/nope-ramro-name-ch-2198662" style="font-weight:bold;" target="_blank" title="Click to know more about NOPE">NOPE</a>, it is not homework, just another person struggling with the same <a href="https://interviewquestions.tuteehub.com/tag/problem-25530" style="font-weight:bold;" target="_blank" title="Click to know more about PROBLEM">PROBLEM</a>. i dont know pravinshembekar, i just looked through the forum and found that thread.<br/><br/>all that a side, does anyone know how to do it.what are you going to do after you load the whole file contents into a variable?Since you refuse to be any clearer about what you are trying to do, the short answer is No. You can't make a batch variable hold the "contents" of any arbitrarily chosen text file. Not all at once. Just think about it for a second. A batch variable can hold only one line of text. A randomly chosen text file could have any number of lines. In fact the question in nonsense. Maybe that isn't what you mean, but you have been asked for more information and you have not given it. Unless and until you do, this is where we stop, I think.<br/><br/><br/><br/><br/><br/><br/><br/>what is in the text file?<br/><br/>can u post a copy of file contents?Hi rhino_aus,<br/><br/>Assuming you are using Windows XP, the following MS-DOS batch-file should do the job...<br/>Code: <a>[Select]</a>@echo off<br/>setlocal EnableDelayedExpansion<br/><br/>REM ======== Load contents of text file into variable one line at a time ======== <br/>for /F "delims=" %%A in (TEST.TXT) do (<br/> set LINE=%%A <br/> echo !LINE!<br/>)<br/><br/>PAUSE<br/><br/>REM ======== Append **ENTIRE** contents of text file into one variable without LF/CR characters ======== <br/>set LINE=<br/>for /F "delims=" %%A in (TEST.TXT) do ( set LINE=!LINE!%%A )<br/>echo !LINE!<br/><br/><br/>Here is an example of running this batch-file...<br/>Code: <a>[Select]</a>D:\TEST> type TEST.TXT<br/>This is an<br/>example of a<br/>text file which<br/>contains four lines.<br/><br/>D:\TEST> TEST.BAT<br/>This is an<br/>example of a<br/>text file which<br/>contains four lines.<br/>Press any key to continue . . .<br/>This is an example of a text file which contains four lines.<br/><br/>D:\TEST><br/><br/><strong>Please NOTE that I would not recommend appending a LARGE text file into one variable.</strong><br/><br/>Please also <strong>NOTE</strong> that this batch-file excludes explanation mark characters ("!") as well as LF / CR characters. For example:<br/>Code: <a>[Select]</a>D:\TEST> type TEST.TXT<br/>This is an!!!!<br/>example of a!!!!<br/>!!!!text file which<br/>contains four lines!!!!<br/><br/>D:\TEST> TEST<br/>This is an<br/>example of a<br/>text file which<br/>contains four lines<br/>Press any key to continue . . .<br/>This is an example of a text file which contains four lines<br/><br/>D:\TEST><br/><br/>Hope that helps,<br/>JamesQuote from: James2000 on October 30, 2007, 12:43:39 PM<blockquote>Please also <strong>NOTE</strong> that this batch-file excludes explanation mark characters ("!") as well as LF / CR characters. For example:<br/></blockquote><br/>Exclamation?<br/><br/>PS good code!<br/>I have similar question of this kind,<br/><br/>I have to search for a content in .txt file then copy that content and i have to paste it into other txt file<br/>can anybody help me out</body></html> | |
8912. |
Solve : using the msg command? |
Answer» <html><body><p>I'm wondering how, or if, it is possible to use the msg command to send a message to another computer.<br/>I checked msg /?, but got confused by it.<br/>Anyone know how to do it?Quote from: michaewlewis on October <a href="https://interviewquestions.tuteehub.com/tag/31-241974" style="font-weight:bold;" target="_blank" title="Click to know more about 31">31</a>, 2007, 11:54:24 AM</p><blockquote>I'm wondering how, or if, it is possible to use the msg command to send a message to another computer.<br/>I checked msg /?, but got confused by it.<br/>Anyone know how to do it?<br/></blockquote><br/>Basically you type msg username (which is the person you are typing to) then /SERVER:computername (which is the name of the PC you are sending it to then the message you want to send. I (when I used to do this) would use the net send command.<br/><br/>An example would be C:\>msg coemah /SERVER:PC-one Testing this message <a href="https://interviewquestions.tuteehub.com/tag/interface-11652" style="font-weight:bold;" target="_blank" title="Click to know more about INTERFACE">INTERFACE</a> thingy!<br/><br/>The target PC would get a standard Windows box with something like "message from michaewlewis date time code" and then the text of your code (Testing this message interface thingy!) and an "OK" button to close the box.<br/><br/>hmm... that's what I tried before and I get two errors each time I try:<br/>Error <a href="https://interviewquestions.tuteehub.com/tag/opening-1136658" style="font-weight:bold;" target="_blank" title="Click to know more about OPENING">OPENING</a> Terminal server otherComputer01<br/>Error [5]:Access is denied.<br/><br/>Is a password necessary? Is the msg command allowed in domains?If this is a school or office, messaging is often disabled by admins to avoid time wasting, distraction from work or study, or harrassment.<br/>Quote from: contrex on October 31, 2007, 12:17:18 PM<blockquote>If this is a school or office, messaging is often disabled by admins to avoid time wasting, distraction from work or study, or harrassment.<br/></blockquote><br/>I'm pretty sure it's not turned off, but if it is, how would I turn it on? I'm trying to find a simple way to send alerts to specific users, just in case I'm not at my own computer with my other tools for messaging.<br/>BTW, I am the network admin. <br/>You do have send message access permission?<br/><br/>Terminal Services Configuration (tscc.msc)<br/><br/>Open up the Properties of the RDP-Tcp connection<br/>object, <a href="https://interviewquestions.tuteehub.com/tag/permissions-771019" style="font-weight:bold;" target="_blank" title="Click to know more about PERMISSIONS">PERMISSIONS</a> tab, Advanced, Edit the entry<br/>you are interested in changing.<br/><br/>Ok, I don't have a terminal server. It's starting to sound like it's necessary.... is it?<br/>Is tscc.msc only on servers? I don't have it on my xp machine.<br/></body></html> | |
8913. |
Solve : Trim a string value? |
Answer» <html><body><p>Dear All,<br/><br/>I ve <a href="https://interviewquestions.tuteehub.com/tag/red-238021" style="font-weight:bold;" target="_blank" title="Click to know more about RED">RED</a> the regedit by using following script line<br/>REG <a href="https://interviewquestions.tuteehub.com/tag/query-244700" style="font-weight:bold;" target="_blank" title="Click to know more about QUERY">QUERY</a> "HKLM\Software\Oracle" /v FORMS60.it returns the value like <br/>FORMS60 REG_EXPAND_XZ d:\forms6i\FORMS60.but i need to show d:\forms6i\FORMS60 these part of the string only<br/><br/>please help me to trim this and also help me to show the trimmed value<br/><br/>Thanks<br/>JebeshQuote</p><blockquote><br/>@echo off<br/><br/><a href="https://interviewquestions.tuteehub.com/tag/set-11758" style="font-weight:bold;" target="_blank" title="Click to know more about SET">SET</a> string=FORMS60 REG_EXPAND_XZ d:\forms6i\FORMS60<br/><br/>REM 1: trim the string into its 3 tokens<br/><br/>for /f "tokens=1,2,3 delims= " %%a in ("%string%") do (<br/>set token1=%%a<br/>set token2=%%b<br/>set token3=%%c<br/>)<br/><br/>REM show the 3 <a href="https://interviewquestions.tuteehub.com/tag/sub-250109" style="font-weight:bold;" target="_blank" title="Click to know more about SUB">SUB</a> strings<br/>echo token number 1 is %token1%<br/>echo token number 2 is %token2%<br/>echo token number 3 is %token3%<br/><br/></blockquote></body></html> | |
8914. |
Solve : trouble with creating a directory? |
Answer» <html><body><p>Some <a href="https://interviewquestions.tuteehub.com/tag/commands-18925" style="font-weight:bold;" target="_blank" title="Click to know more about COMMANDS">COMMANDS</a> don't work like <a href="https://interviewquestions.tuteehub.com/tag/mk-548207" style="font-weight:bold;" target="_blank" title="Click to know more about MK">MK</a> dir,<a href="https://interviewquestions.tuteehub.com/tag/mkdir-548226" style="font-weight:bold;" target="_blank" title="Click to know more about MKDIR">MKDIR</a>,md.<br/>Tries them but don't now how to view and <a href="https://interviewquestions.tuteehub.com/tag/use-241643" style="font-weight:bold;" target="_blank" title="Click to know more about USE">USE</a> them.<br/>Please give me a straight answer. I use Windows XP.mkdir/?<br/><br/>type that in CMDQuote from: lordoftheplat on October 31, 2007, 04:00:39 AM</p><blockquote>mkdir/?<br/><br/>type that in CMD<br/></blockquote><br/>Better still, put a space between mkdir and /?<br/></body></html> | |
8915. |
Solve : doing pop-up in batch? |
Answer» <html><body><p>Hi, <br/><br/>is there a way to do <a href="https://interviewquestions.tuteehub.com/tag/pop-344914" style="font-weight:bold;" target="_blank" title="Click to know more about POP">POP</a> up in a batch file. I already know that MSG will display a <a href="https://interviewquestions.tuteehub.com/tag/message-25597" style="font-weight:bold;" target="_blank" title="Click to know more about MESSAGE">MESSAGE</a> with an <a href="https://interviewquestions.tuteehub.com/tag/ok-1127144" style="font-weight:bold;" target="_blank" title="Click to know more about OK">OK</a> button. But I would prefer a pop-up with YES and NO buttons or <a href="https://interviewquestions.tuteehub.com/tag/even-976335" style="font-weight:bold;" target="_blank" title="Click to know more about EVEN">EVEN</a> better someting where I could enter a text string.<br/><br/>thanks<br/>ypyou can <a href="https://interviewquestions.tuteehub.com/tag/use-241643" style="font-weight:bold;" target="_blank" title="Click to know more about USE">USE</a> the <a href="http://www.computerperformance.co.uk/ezine/ezine46.htm">MsgBox() function</a> in vbscript<br/></p></body></html> | |
8916. |
Solve : display content of a list within a variable? |
Answer» <html><body><p>Hi, <br/><br/>I have a variable <strong>LIST=ELEM1;ELEM2;ELEM3</strong><br/>which command should I call to have for results<br/><strong>ELEM1<br/>ELEM2<br/>ELEM3</strong><br/><br/>if I do the following command line; I do have only the first element of the list (while the other are probably in %<a href="https://interviewquestions.tuteehub.com/tag/j-236599" style="font-weight:bold;" target="_blank" title="Click to know more about J">J</a> and so on)<br/><strong>> for /<a href="https://interviewquestions.tuteehub.com/tag/f-236701" style="font-weight:bold;" target="_blank" title="Click to know more about F">F</a> "delims=;" %i in ("%LIST%") do echo %i<br/>ELEM1</strong><br/><br/>note that I do construct the LIST, so I can <a href="https://interviewquestions.tuteehub.com/tag/change-238106" style="font-weight:bold;" target="_blank" title="Click to know more about CHANGE">CHANGE</a> the delimiters or the <a href="https://interviewquestions.tuteehub.com/tag/format-11876" style="font-weight:bold;" target="_blank" title="Click to know more about FORMAT">FORMAT</a> if required.<br/><br/>thanks<br/>found by myself <br/><br/>I change my list format to have space as delimiters <strong>LIST=ELEM1 ELEM2 ELEM3</strong><br/><br/><strong><a href="https://interviewquestions.tuteehub.com/tag/set-11758" style="font-weight:bold;" target="_blank" title="Click to know more about SET">SET</a> AUTO_VARIABLE_LIST=%LIST%<br/>:FOR_LOOP<br/>for /f "tokens=1* " %%i in ("%AUTO_VARIABLE_LIST%") do (<br/> call echo %%i<br/> set AUTO_VARIABLE_LIST=%%j<br/>)<br/>if "%AUTO_VARIABLE_LIST%"=="" GOTO :END_LOOP else (<br/> GOTO :FOR_LOOP<br/>)<br/>:END_LOOP </strong> <br/><br/><br/></p></body></html> | |
8917. |
Solve : Good day people, can anyone enlighten me to what this command does.? |
Answer» <html><body><p>I have been going through some files on a customers server, the old 'IT' guy was a bit of a whizz but stupid with it and lost his job due to stupidity and pron. <br/><br/>Going through the old server I inherited I found this batch file, I understand that its designed to copy files from one drive to another and probably write a <a href="https://interviewquestions.tuteehub.com/tag/text-11613" style="font-weight:bold;" target="_blank" title="Click to know more about TEXT">TEXT</a> file at the end of copying, but I can't <a href="https://interviewquestions.tuteehub.com/tag/quite-1175131" style="font-weight:bold;" target="_blank" title="Click to know more about QUITE">QUITE</a> grasp the way its been written. I frequently use batch files myself and now prefer these to drag and drop as they seem quicker and I dont have to watch that stupid folder and flying paper crap ..... it <a href="https://interviewquestions.tuteehub.com/tag/may-557248" style="font-weight:bold;" target="_blank" title="Click to know more about MAY">MAY</a> be an illusion but thats my preference.<br/><br/>The file in question is below, and my main boggle is whats with the ">" in the middle? Is this some sort of "xcopy" shorthand??<br/><br/><strong>"\\SERVER1\120gig (H)\Backup\COPY TO BACKUP SERVER.BAT" > "\\SERVER1\120gig (H)\Backup\backup.txt"</strong><br/><br/>I <a href="https://interviewquestions.tuteehub.com/tag/look-544452" style="font-weight:bold;" target="_blank" title="Click to know more about LOOK">LOOK</a> forward to you educated and varied replies.<br/><br/>Many ThanksThe ">" redirects the output from the batch to a file. So while the batch script would <a href="https://interviewquestions.tuteehub.com/tag/normally-571448" style="font-weight:bold;" target="_blank" title="Click to know more about NORMALLY">NORMALLY</a> output text to the console, with the ">" it instead writes it to "backup.txt".<br/><br/>With one ">" the text will be written to the beginning of the file, overwriting anything currently in it. If you instead use two ">>" the text will be written to the end of the file, thereby appending the text instead of overwriting. <br/><br/>Check out this site for more redirection action:<br/><a href="https://www.ss64.com/ntsyntax/redirection.html">http://www.ss64.com/ntsyntax/redirection.html</a><br/><br/><br/>Many thanks, its very useful to know. Now that I know exactly what it does I may well start incorporating it into a few "batches".<br/><br/>Many thanks for your help.</p></body></html> | |
8918. |
Solve : Take picture with webcam in dos. (command) ???? |
Answer» <html><body><p>Hello everybody.<br/><br/>I <a href="https://interviewquestions.tuteehub.com/tag/busy-404257" style="font-weight:bold;" target="_blank" title="Click to know more about BUSY">BUSY</a> making a security .bat file.<br/>Is there any <a href="https://interviewquestions.tuteehub.com/tag/command-11508" style="font-weight:bold;" target="_blank" title="Click to know more about COMMAND">COMMAND</a> or script so you can make a photo with your webcam and save it??<br/><br/><a href="https://interviewquestions.tuteehub.com/tag/greetings-1012977" style="font-weight:bold;" target="_blank" title="Click to know more about GREETINGS">GREETINGS</a> Ultimate-TesterIf you got some software with your webcam it might have a command line or batch mode. Did you <a href="https://interviewquestions.tuteehub.com/tag/get-11812" style="font-weight:bold;" target="_blank" title="Click to know more about GET">GET</a> any?<br/>Only the drivers and a viewer are on the cd.<br/>No command line or something. <br/>I think I have to look on google or something for a command line webcam prog<br/><br/>Do you have any??I doubt very much a webcam will have DOS drivers...even so you would <a href="https://interviewquestions.tuteehub.com/tag/need-25476" style="font-weight:bold;" target="_blank" title="Click to know more about NEED">NEED</a> a DOS based app to run it.</p></body></html> | |
8919. |
Solve : Dos prompt? |
Answer» <html><body><p>Since I upgraded to WindowsXP Pro I haven't been able to, don't know how, change directorys.<br/>At my Dos prompt I have, C:\WINDOWS\SYSTEM32> <br/>I tried, cd Windows, but it won't work<br/>If I type A: it will change to, A:\><br/>By right clicking on the MS-Doc Command icon and bringing up Properties then clicking the <br/>Program tab, I have in the Cmd line box: C:\WINDOWS\system32\command.com, and in the Working box:, C:\WINDOWS\system32<br/>Is this where I have to amend any of these lines and if so, what do I change them to and is it safe to do so.<br/>I need to open or edit a BAS programs at C:\Qbasic so I get them into Notepad.<br/>When you enter CD Windows the system is looking for a directory named Windows as a child (subdirectory) of C:\Windows\System32 which does not exist.<br/><br/>Use CD C:\Windows (Note the C:\)<br/><br/>Quote</p><blockquote>By right clicking on the MS-Doc Command icon and bringing up Properties then clicking the<br/>Program tab, I have in the Cmd line box: C:\WINDOWS\system32\command.com, and in the Working box:, C:\WINDOWS\system32</blockquote><br/>Suggest change your Cmd line box to read C:\WINDOWS\SYSTEM32\CMD.EXE<br/><br/>and change your working box to read C:\<br/><br/>then when you click the icon you will always open cmd.exe and have just C:\> as the prompt.<br/><br/>Or IMHO better still, <a href="https://interviewquestions.tuteehub.com/tag/create-427332" style="font-weight:bold;" target="_blank" title="Click to know more about CREATE">CREATE</a> a new shortcut on your desktop for cmd.exe <br/><br/>Good luck<br/><br/>Thanks Dusty,<br/>After I posted I discovered that I should have entered at the prompt:<br/>C:\WINDOWS\SYSTEM32> cd \QBasic, I forgot the slash.<br/>I have in my C:\Qbasic folder a program titled Cory.bas.<br/>I tried to open it using: C:\QBasic> QBasic /run Cory and C:\QBasic> QBasic /run Cory.bas but neither worked.<br/>LMK if this should this work?<br/><br/>I already had a shortcut named: MS-DOS Command <br/>I renamed this, shortcut to Cmd.exe.<br/><br/>In CMD.exe properties/Program Tab:<br/>I now have at the Cmd line C:\WINDOWS\system31\cmd.exe<br/>Working is:C:\WINDOWS\system32<br/><br/>I have this set to open as a window but when I want to copy a program from a forum to Qbasic I just need to change it to open as a window. <br/><br/>I'm 79 and some of this is starting to <a href="https://interviewquestions.tuteehub.com/tag/frazzle-7681565" style="font-weight:bold;" target="_blank" title="Click to know more about FRAZZLE">FRAZZLE</a> what little grey stuff I have left.<br/><br/>You didn't indicate which version of QBasic you are using but...<br/><br/>In the version I use (Qbasic 4.5) the interpreter is named QB not QBasic so the command to load it and run your program would be QB /RUN Cory.bas <br/><br/>LMK what error message you get (if any)<br/><br/>Upper case is used for emphasis only.<br/><br/>At your prompt C:\Windows\system32 type cd\Qbasic...<br/>Then C:\QBasic> QBasic /run Cory and C:\QBasic> QBasic /runQuote from: chequer on October <a href="https://interviewquestions.tuteehub.com/tag/28-242614" style="font-weight:bold;" target="_blank" title="Click to know more about 28">28</a>, 2007, 11:20:20 PM<blockquote>Since I upgraded to WindowsXP Pro I haven't been able to, don't know how, change directorys.<br/>At my Dos prompt I have, C:\WINDOWS\SYSTEM32> <br/>I tried, cd Windows, but it won't work<br/>If I type A: it will change to, A:\><br/>By right clicking on the MS-Doc Command icon and bringing up Properties then clicking the <br/>Program tab, I have in the Cmd line box: C:\WINDOWS\system32\command.com, and in the Working box:, C:\WINDOWS\system32<br/>Is this where I have to amend any of these lines and if so, what do I change them to and is it safe to do so.<br/>I need to open or edit a BAS programs at C:\Qbasic so I get them into Notepad.<br/></blockquote>Dusty,<br/>I managed to work it out. I had forgot that I had renamed Qbasic.exe to q.exe<br/>All I have to do is at C:\WINDOWS\system32> is to enter cd \qbasic to bring up,<br/>C:\Qbasic> then C:\Qbasic>q /run cory.txt to open the file.<br/>I am using QB 1.1<br/>I have just bought a new Microsoft MultiMedia <a href="https://interviewquestions.tuteehub.com/tag/keyboard-532411" style="font-weight:bold;" target="_blank" title="Click to know more about KEYBOARD">KEYBOARD</a> 1.0A kb0186, It has a Fkey on/off <a href="https://interviewquestions.tuteehub.com/tag/button-11522" style="font-weight:bold;" target="_blank" title="Click to know more about BUTTON">BUTTON</a> on it.<br/>On my old keyboard if I made a typing error at the Prompt, I could by pressing F3, bring back the text I had entered.. <br/>Regardless of the Fkey button being on or off it doesn't work now.<br/>In a program I use a lot, to save a lot of typing I have defined the F keys as,<br/>KEY 6, "WED" + chr$(13): key 7, "THU" +CHR$(13) etc..., won't work on my new Keyboard.<br/>Any clues?<br/>Quote from: patio on October 30, 2007, 06:13:07 AM<blockquote>At your prompt C:\Windows\system32 type cd\Qbasic...<br/>Then C:\QBasic> QBasic /run Cory and C:\QBasic> QBasic /run<br/></blockquote>Thanks patio,<br/>I managed to work it out. I had forgot that I had renamed Qbasic.exe to q.exe<br/>All I have to do is at C:\WINDOWS\system32> is to enter cd \qbasic to bring up,<br/>C:\Qbasic> then C:\Qbasic>q /run cory.txt to open the file.<br/>I am using QB 1.1<br/><br/>See my reply to dusty</body></html> | |
8920. |
Solve : Routing issues, MS-DOS 6.22, Novell, and TINY (a sort of ssh/VNC)? |
Answer» <html><body><p>Hi there everyone... first post <br/><br/><em><strong>Note:</strong> I like to ramble on a lot, skip to the bold/italic/underlined text below if you just want my problem. </em><br/><br/>Well, I have a MS-DOS 6.22 machine (as stated in the subject) and you can probably guess that the box is running real DOS .<br/><br/>Well, I have an ethernet card - specifically a Realtec RT(L)8029(AS) (words in brackets sometimes admitted) in this 400MHz Celeron with 32MB of RAM and 160MB of HD space... this was just thrown "quickly" together from parts I had "around", I plan to upgrade (especially the HD ) and <a href="https://interviewquestions.tuteehub.com/tag/switch-20997" style="font-weight:bold;" target="_blank" title="Click to know more about SWITCH">SWITCH</a> to Linux or FreeDOS or something else at one stage, I'm just fooling around at the moment.<br/><br/>The point of explaining all that?<br/>I'd really like my problem to <a href="https://interviewquestions.tuteehub.com/tag/get-11812" style="font-weight:bold;" target="_blank" title="Click to know more about GET">GET</a> resolved... but don't push yourselves <em>too</em> hard, as it'll be, well, wasted effort <br/><br/>Okay, now for the problem.<br/><br/>The card works, I have its packet driver, as well as PCIODI.COM (which I'll explain below).<br/><br/>TINY, my "DOS-based VNC system" works absolutely wonderfully, except it requires use of either the PCTCP or Novell Client32 TCP/<a href="https://interviewquestions.tuteehub.com/tag/ip-14828" style="font-weight:bold;" target="_blank" title="Click to know more about IP">IP</a> stacks. I initially (after a long search) found the required PCTCP files off the net, and got everything working - I connected <a href="https://interviewquestions.tuteehub.com/tag/via-723599" style="font-weight:bold;" target="_blank" title="Click to know more about VIA">VIA</a> another of my PCs (specifically my "main" box) to the MS-DOS machine (wow).<br/><br/>Then I discovered that the PCTCP stack system had been sold and was no longer available, except if I paid $100+ to its new owner.<br/><br/>YIKE.<br/><br/>So... I then began the long, long journey of Novell Client32.<br/><br/>And I managed to get it to "go"!!! <br/><br/>I first load the packet driver, then LSL, then PCIODI, then IPXODI, then NIOS, uncountable NLMs (including my network card's NLM)... and it shows the magic DHCP screen... and BOOM, it gets an IP off of DHCP.<br/><br/><strong><em>My problem:</em></strong><br/>I can connect locally to 1.2.3.7 via the TINY client and up comes the display.<br/>However... I can't connect via the internet (ie 'truly' remotely) and view the display.<br/>What's so weird is that... <a href="https://interviewquestions.tuteehub.com/tag/remote-621964" style="font-weight:bold;" target="_blank" title="Click to know more about REMOTE">REMOTE</a> (ie out-of-my-network) clients can <em>type</em> and the keys are sent... yet the display doesn't update.<br/><br/><strong>So, to sum up, I think that this is a routing issue between my router and the PC, and not so much to do with the actual machine itself.</strong><br/><br/>I did try giving the machine my external "internet" IP, but that naturally didn't work <br/><br/><em><strong>?!?!?!?!</strong></em><br/><br/>Thanks in advance for any help you might be able to give!<br/>-dav7</p></body></html> | |
8921. |
Solve : beep in dos? |
Answer» <html><body><p>can anyone <a href="https://interviewquestions.tuteehub.com/tag/help-239643" style="font-weight:bold;" target="_blank" title="Click to know more about HELP">HELP</a> me how to check <a href="https://interviewquestions.tuteehub.com/tag/weather-772166" style="font-weight:bold;" target="_blank" title="Click to know more about WEATHER">WEATHER</a> the beep in my ms-dos is on or off?<br/><br/>is there any command to play beep?<br/><br/>can how to on and off the beep in dos?<br/><br/><a href="https://interviewquestions.tuteehub.com/tag/pelase-2218822" style="font-weight:bold;" target="_blank" title="Click to know more about PELASE">PELASE</a> do tell me<br/>i am waitingIf you motherboard has a speaker, you can beep in DOS. if not, you cannot.<br/><br/>1. strike CTRL + G on the keyboard while at the DOS prompt.<br/>2. Type this at the prompt<br/><br/>echo aY | choice<br/><br/>3. If you have QBASIC, run this <a href="https://interviewquestions.tuteehub.com/tag/batch-893737" style="font-weight:bold;" target="_blank" title="Click to know more about BATCH">BATCH</a>.<br/><br/>@echo off<br/>echo beep> beep.bas<br/>echo system>> beep.bas<br/>qbasic /run beep.bas<br/>del beep.bas<br/>cls<br/><br/><br/><strong>rundll32 user32.dll,MessageBeep</strong></p></body></html> | |
8922. |
Solve : make zip/rar archive with bat file? |
Answer» <html><body><a href="https://interviewquestions.tuteehub.com/tag/hi-479908" style="font-weight:bold;" target="_blank" title="Click to know more about HI">HI</a>,<br/><br/>i want to <a href="https://interviewquestions.tuteehub.com/tag/make-249948" style="font-weight:bold;" target="_blank" title="Click to know more about MAKE">MAKE</a> a zip/rar archive of all text file in dir "d:\<a href="https://interviewquestions.tuteehub.com/tag/mat-287" style="font-weight:bold;" target="_blank" title="Click to know more about MAT">MAT</a>" with a <a href="https://interviewquestions.tuteehub.com/tag/bat-394554" style="font-weight:bold;" target="_blank" title="Click to know more about BAT">BAT</a> file.<br/><br/>is this possible?<br/><br/>regds<br/>simus<br/>theirs a program called 7z.exe (7 Zip)<br/><br/>all versions are listed here, <a href="https://www.7-zip.org/download.html">http://www.7-zip.org/download.html</a><br/>includes a command line version , here <a href="https://downloads.sourceforge.net/sevenzip/7za442.zip">http://downloads.sourceforge.net/sevenzip/7za442.zip</a>If you have winzip install you can also use it at the command line within your batch file!<br/><br/>see: <a href="http://www.memecode.com/docs/winzip.html">http://www.memecode.com/docs/winzip.html</a> <br/><br/>yp</body></html> | |
8923. |
Solve : why when i exit my command prompt it it asks me end now or cancel? |
Answer» <html><body><p>I exit of my command prompt and then a <br/><a href="https://interviewquestions.tuteehub.com/tag/dialog-950792" style="font-weight:bold;" target="_blank" title="Click to know more about DIALOG">DIALOG</a> box <a href="https://interviewquestions.tuteehub.com/tag/aeuraeuraeuraeurcomes-1474428" style="font-weight:bold;" target="_blank" title="Click to know more about COMES">COMES</a> up with <a href="https://interviewquestions.tuteehub.com/tag/choices-916015" style="font-weight:bold;" target="_blank" title="Click to know more about CHOICES">CHOICES</a> of<br/>end proggram or cancel. Why is this?You are clicking on the red X in the top right corner. You need to type EXIT and <a href="https://interviewquestions.tuteehub.com/tag/enter-446119" style="font-weight:bold;" target="_blank" title="Click to know more about ENTER">ENTER</a> at the prompt to avoid this.</p></body></html> | |
8924. |
Solve : Shutdown Command? |
Answer» <html><body><p>Hey, patio.<br/>I agree, but it may be confusing.<br/>If you read couple of sentences from PC World description: <a href="https://www.pcworld.com/article/id,61687-page,5/article.html">http://www.pcworld.com/article/id,61687-page,5/article.html</a><br/>Quote</p><blockquote><strong>Q:</strong> Is DOS dead in Windows 2000? Can I run an ancient DOS program or two that I still favor?<br/><br/><strong>A:</strong> The demise of DOS, to pinch a pithy line from Mark Twain, has been greatly exaggerated.<br/><br/>The terminology surrounding it has changed, but a form of DOS still exists. Windows 2000 calls it the Command Prompt rather than MS-DOS Prompt, and tucks it into the Start, Programs, Accessories menu. Windows 2000 won't let you reboot to the DOS prompt, as Windows 95 and 98 did, but you can run DOS executable files from within Windows 2000.</blockquote>it sounds pretty clear, doesn't it?<br/><br/>But then, even pros are having some problems: <a href="http://malektips.com/windows_2000_and_dos_help_and_tips.html">MalekTips</a><br/>The title says: Quote<blockquote>Windows 2000 and <strong>DOS</strong> Help and Tips</blockquote>Quote<blockquote><strong>but a form of DOS still exists.</strong></blockquote><br/>Emphasis mine...and therefore the DOS limitations on filenames no longer existed.<br/>I stand by my observation.<br/>Trust me after you see it as much as i have you'll agree.<br/><br/>Quote from: Broni on October 21, 2007, 08:18:28 PM<blockquote>Quote<blockquote>Isn't there a seven character limit that applies in DOS?</blockquote>Good <a href="https://interviewquestions.tuteehub.com/tag/question-25051" style="font-weight:bold;" target="_blank" title="Click to know more about QUESTION">QUESTION</a>, but I believe, it doesn't apply to Win 2K, and later. Those Windows don't use real DOS. If I remember correctly, I was able to execute commands from Command Prompt under Win 2K, which didn't follow "7.3" rule.<br/>I'm too lazy to turn my 2K on, now, so I'll wait for you to try it....LOL<br/></blockquote><br/>Just a point of clarification: In plain old MS-DOS, the format of filename.ext was 8.3 , not 7.3.<br/><br/>Quote<blockquote>the format of filename.ext was 8.3</blockquote>Ooooops!!!....Thanks That is all fine and <a href="https://interviewquestions.tuteehub.com/tag/dandy-943691" style="font-weight:bold;" target="_blank" title="Click to know more about DANDY">DANDY</a>, but what about the shutdown command?When you open your Command Prompt, how does your prompt look like?<br/><strong>C:\Documents and Settings\sharmall</strong> ?Whatever it is, your syntax should look like this:<br/><br/><strong>cd C:\Documents and Settings\sharmall\Desktop\shutdown<br/>shutdown /l /t:300 "The <a href="https://interviewquestions.tuteehub.com/tag/computer-243299" style="font-weight:bold;" target="_blank" title="Click to know more about COMPUTER">COMPUTER</a> is shutting down" /y /c</strong>You're amazing! It worked to perfection! (Then I had to abort it)<br/><br/>Thank You!You're welcome <br/><br/>but.....<br/><br/>Quote<blockquote>Then I had to abort it</blockquote>You're not playing any dangerous games on not yours computers, are you???No, I just tested it and the shutdown window appeared and I'm like like Yay! It worked! But then I'm like, holy crap it is going to close all my open programs! (Plus it takes forever for this to reboot Pentium II [laptop]) So I aborted it.Guys just a thought, but if I can add to the original question of shutting down. If your going to use a prompt to shut down the machine...... why not link it to "<a href="https://interviewquestions.tuteehub.com/tag/xcopy-747962" style="font-weight:bold;" target="_blank" title="Click to know more about XCOPY">XCOPY</a>" and <a href="https://interviewquestions.tuteehub.com/tag/back-389278" style="font-weight:bold;" target="_blank" title="Click to know more about BACK">BACK</a> up some files along the way.<br/><br/>One of my original thoughts was to copy documents when i finished with the computer for the night, then i got sick of coming back an hour later to turn it off so I ended up linking the two together. My pc now has a single "backup" button on the quickstart menu that initiates the backup and then switches the machine off after its done. A few weeks after that paranoia got me, so I got it to creat a "logfile.txt" after each backup so i could check when it was last completed.Quote from: trespasser on October 24, 2007, 04:40:35 PM<blockquote>If your going to use a prompt to shut down the machine...... why not link it to "xcopy" and back up some files along the way.<br/>[...] I got it to creat a "logfile.txt" after each backup so i could check when it was last completed.</blockquote><br/>This is exactly what I do every shutdown. <br/><br/></body></html> | |
8925. |
Solve : Sorting files to different folders - Help~? |
Answer» <html><body><p>I need to create a batch file to sort the files into 2 different folders base on a <a href="https://interviewquestions.tuteehub.com/tag/word-244271" style="font-weight:bold;" target="_blank" title="Click to know more about WORD">WORD</a> or a phrase. Let say I have 4 files, DSNO001, DSNO002, DSNO003, DSNO004 in Folder A. Only DSNO002 contains "Company ABC" which I want to put in Folder B, the other 3 files move to Folder C. How can I do it? Any expert can help me? Hi QK,<br/><br/>Assuming you are using Windows XP, the following MS-DOS batch-file should do the job...<br/>Code: <a>[Select]</a>@echo off<br/>if not exist Folder_A md Folder_A<br/>if not exist Folder_B md Folder_B<br/><br/>for %%A in (*.txt) do (<br/> find "Company ABC" %%A>nul<br/> if errorlevel 1 (move %%A Folder_A) else (move %%A Folder_B)<br/>)<br/><br/><br/>Here is an example of <a href="https://interviewquestions.tuteehub.com/tag/running-1192206" style="font-weight:bold;" target="_blank" title="Click to know more about RUNNING">RUNNING</a> this batch-file...<br/>Code: <a>[Select]</a>D:\<a href="https://interviewquestions.tuteehub.com/tag/test-13460" style="font-weight:bold;" target="_blank" title="Click to know more about TEST">TEST</a>> <a href="https://interviewquestions.tuteehub.com/tag/dir-431995" style="font-weight:bold;" target="_blank" title="Click to know more about DIR">DIR</a> /b<br/>DSNO001.txt<br/>DSNO002.txt<br/>DSNO003.txt<br/>DSNO004.txt<br/>FileSorter.bat<br/><br/>D:\TEST> FileSorter<br/><br/>D:\TEST> dir /b<br/>Folder_A<br/>Folder_B<br/>FileSorter.bat<br/><br/>D:\TEST> dir /b Folder_A<br/>DSNO001.txt<br/>DSNO003.txt<br/>DSNO004.txt<br/><br/>D:\TEST> dir /b Folder_B<br/>DSNO002.txt<br/><br/>D:\TEST><br/><br/>Hope that helps,<br/>James</p></body></html> | |
8926. |
Solve : Is ther anyway to set the position of a new console window after using "start"? |
Answer» <html><body><p>The title of the thread pretty much describes what I would like to know. The "Start" <a href="https://interviewquestions.tuteehub.com/tag/command-11508" style="font-weight:bold;" target="_blank" title="Click to know more about COMMAND">COMMAND</a> <a href="https://interviewquestions.tuteehub.com/tag/opens-586856" style="font-weight:bold;" target="_blank" title="Click to know more about OPENS">OPENS</a> up a new <a href="https://interviewquestions.tuteehub.com/tag/console-240226" style="font-weight:bold;" target="_blank" title="Click to know more about CONSOLE">CONSOLE</a> window, but the seem to open up pretty much in the same position when you open multiple windows, so is there any way to set where they will open prior to using the start command?<br/>You mean to change position of this:<br/><br/>Quote from: Broni on October 26, 2007, 08:41:01 PM</p><blockquote>You mean to change position of this:<br/><br/>(picture of Windows XP Start Button menu)<br/><br/></blockquote><br/>I don't think he means that. If you read the post, it seems pretty clear that he's talking about the command prompt START command.<br/><br/>Z-Funk, as far as I know this is not easily possible in standard XP command language, but there is an extra command called CMDOW which you can download which will allow you to do this.<br/><br/><a href="http://www.commandline.co.uk/cmdow/">http://www.commandline.co.uk/cmdow/</a><br/><br/><br/><br/><br/><br/><br/>Contex, <a href="https://interviewquestions.tuteehub.com/tag/yes-748598" style="font-weight:bold;" target="_blank" title="Click to know more about YES">YES</a> you understood my question completely (why would I ask where to change the XP start window in a DOS forum?)<br/><br/>Anyway, thanks Contex.<br/><br/>One last thing, is there any way to close other console windows that you've opened up using the "start" command. "<a href="https://interviewquestions.tuteehub.com/tag/exit-251227" style="font-weight:bold;" target="_blank" title="Click to know more about EXIT">EXIT</a>" only closes the one you're currently working with.<br/>Quote from: Z-Funk on October 27, 2007, 06:20:15 AM<blockquote>One last thing, is there any way to close other console windows that you've opened up using the "start" command. "exit" only closes the one you're currently working with.</blockquote><br/>CMDOW will do this also.<br/></body></html> | |
8927. |
Solve : FOR in batch with enhanced variables? |
Answer» <html><body><p>I am attempting a task that would work if I could use<br/>(inside a batch file) the 'enhanced syntax for variable<br/>references:<br/><br/> %~nI - expands %I to a file name only<br/><br/>which I first discovered this week. I am running MS WinXP,<br/>Ver 5.1.2600 (with Svc pak 2) on a SysteMax Venture with a<br/>3.4 GHz Pentium D, 1.00 GB of RAM.<br/><br/>The following is a 1-line batch file--t.bat:<br/><br/> for %%~nS in (*.c) do echo c51Cmd %%S NML SPV_BETA<br/><br/>The c51Cmd is another batch file. I will replace 'echo' with<br/>'call' should I ever get this thing to work.<br/><br/>When I run it as shown, I get:<br/>> <br/>> M:\xxx>t<br/>> %~nS was unexpected at this time.<br/>> <br/>> M:\xxx> for %~nS in (*.c) do echo c51Cmd %<br/>> S NML SPV_BETA<br/>> <br/><br/>I had doubled the percent sign, since it had been necessary<br/>in all prior versions of Windows. I decided to remove one<br/>'%':<br/>> <br/>> M:\xxx>t<br/>> The following usage of the <a href="https://interviewquestions.tuteehub.com/tag/path-11833" style="font-weight:bold;" target="_blank" title="Click to know more about PATH">PATH</a> operator in batch-parameter<br/>> substitution is invalid: %~nS in (*.c) do echo c51Cmd %S NML SPV_BETA<br/>> <br/>> <br/>> For valid formats type CALL /? or FOR /?<br/>> t was unexpected at this time.<br/>> <br/>> M:\xxx> for %~nS in (*.c) do echo c51Cmd %<br/>> S NML SPV_BETA<br/>> <br/><br/>I read though all the <a href="https://interviewquestions.tuteehub.com/tag/help-239643" style="font-weight:bold;" target="_blank" title="Click to know more about HELP">HELP</a> I could get from windows. On one<br/>web forum I saw an inference that that the 'enhanced'<br/>features could not be used unless extended <a href="https://interviewquestions.tuteehub.com/tag/parameters-11881" style="font-weight:bold;" target="_blank" title="Click to know more about PARAMETERS">PARAMETERS</a> were<br/>enabled. I found no <a href="https://interviewquestions.tuteehub.com/tag/way-246442" style="font-weight:bold;" target="_blank" title="Click to know more about WAY">WAY</a> to query my command interpreter as<br/>to whether this was true, but did find a way to run it with<br/>them on:<br/><br/> cmd /E:ON<br/> for %%~nS in (*.c) do echo c51Cmd %%S NML SPV_BETA<br/> exit<br/><br/>No difference.<br/><br/>Does this feature really work, or is MicroSoft just jerking<br/>my chain?<br/>============================================================<br/>Gary Lynch | To send mail change no$pam in my<br/><a href="/cdn-cgi/l/email-protection">[emailprotected]</a>$pam.com | domain name to stacoenergy<br/>============================================================Just one tiny mistake, the for %%S defines the variable, its after the DO that you use the variable expansion, like this below<br/><br/>for %%S in (*.c) do echo c51Cmd %%~nS NML SPV_BETA<br/><br/>GrahamQuote</p><blockquote>Does this feature really work, or is MicroSoft just jerking<br/>my chain?</blockquote><br/>It works if you do it right, like Graham <a href="https://interviewquestions.tuteehub.com/tag/says-1195457" style="font-weight:bold;" target="_blank" title="Click to know more about SAYS">SAYS</a>.<br/><br/>!!!!<br/><br/>That fixed it. <br/><br/>I went back through the Windows Help system. There's<br/>nothing from which I could have inferred that reversal.<br/><br/>(Thanks.)<br/>============================================================<br/>Gary Lynch | To send mail change no$pam in my<br/><a href="/cdn-cgi/l/email-protection">[emailprotected]</a>$pam.com | domain name to stacoenergy<br/>============================================================I guess you just have to 'know' it<br/><br/>In the old days, there were no enhancements so those of us used to how it used to work saw how the enhancements were slotted in.<br/><br/>Good luck<br/>Graham</body></html> | |
8928. |
Solve : how to Find a file like windows search-Dos? |
Answer» <html><body><a href="https://interviewquestions.tuteehub.com/tag/dear-431391" style="font-weight:bold;" target="_blank" title="Click to know more about DEAR">DEAR</a> All,<br/><br/>How to write a msdos batch file to find a exe file like windows file search<br/><br/>Thanks<br/>Jebesh S<br/>cd /d D:\ [where D is the drive letter]<br/>dir /s filename.exe [where filename is desired file]<br/><br/>or<br/><br/>dir /s *.exe to find all exe files<br/><br/><br/>Thanks for your immediate response,<br/>but i want to search globally for example.i wan to search a .exe file from <br/>any where( <a href="https://interviewquestions.tuteehub.com/tag/c-3540" style="font-weight:bold;" target="_blank" title="Click to know more about C">C</a>: or d: or e:drive).the exe file also <a href="https://interviewquestions.tuteehub.com/tag/may-557248" style="font-weight:bold;" target="_blank" title="Click to know more about MAY">MAY</a> be any where likely <br/>c: or d: or e:<br/><br/>please <a href="https://interviewquestions.tuteehub.com/tag/let-11597" style="font-weight:bold;" target="_blank" title="Click to know more about LET">LET</a> me know whether it is possible in msdos <a href="https://interviewquestions.tuteehub.com/tag/script-345000" style="font-weight:bold;" target="_blank" title="Click to know more about SCRIPT">SCRIPT</a> (batch file)<br/><br/>Thanks<br/><br/>Jebesh S</body></html> | |
8929. |
Solve : HELP... how do i code a % within my command. ?? |
Answer» <html><body><p>Hi all,<br/>just joined, looks like fantastic site.<br/>I need some help, first, I'm not a coder so please consider that when replying.<br/><br/>I need to run a command that will do a ldap sync against A.D. and the <a href="https://interviewquestions.tuteehub.com/tag/vendor-1444632" style="font-weight:bold;" target="_blank" title="Click to know more about VENDOR">VENDOR</a> states that it can't be run as a whole and it must be split up in groups of lastnames like A-G, then H-......<br/>So, the base command is "Ldap_sync". This command alone would grab A-Z. IF the vendor had scripted the executable correctly and it didn't run out of <a href="https://interviewquestions.tuteehub.com/tag/memory-11894" style="font-weight:bold;" target="_blank" title="Click to know more about MEMORY">MEMORY</a>. ( vendor is <a href="https://interviewquestions.tuteehub.com/tag/computer-243299" style="font-weight:bold;" target="_blank" title="Click to know more about COMPUTER">COMPUTER</a> Associates. BOO.....)<br/><br/>So i need to run this command ( which works fine when typed on a cmd prompt, but <strong>NOT</strong> when run from a .Bat file. ( It does not like the<strong> %</strong> that is embeeded within the command.) <br/><br/><strong>ldap_sync -c "last_name LIKE 'A%' AND type != 2308” -l “userid=?”</strong><br/><br/>Thank you all for reading this and verified <a href="https://interviewquestions.tuteehub.com/tag/solution-25781" style="font-weight:bold;" target="_blank" title="Click to know more about SOLUTION">SOLUTION</a>.!You need to 'escape' the % char as it is special to DOS, your line should look like this -<br/><br/>ldap_sync -c "last_name LIKE 'A^%' AND type != 2308” -l “userid=?”<br/><br/>the ^ before the % <a href="https://interviewquestions.tuteehub.com/tag/means-236635" style="font-weight:bold;" target="_blank" title="Click to know more about MEANS">MEANS</a> treat it literally as a % and not the special meaning it normally has.<br/>GrahamTHx for the reply, but please.......( as I would and do on Network System Mgmt sites).. VERIFY your posts\Replies..... Your solution is not valid and does not work as stated.Quote from: n505mw on October 25, 2007, 01:31:28 PM</p><blockquote>THx for the reply, but please.......( as I would and do on Network System Mgmt sites).. VERIFY your posts\Replies..... Your solution is not valid and does not work as stated.<br/></blockquote><br/>n505mw, maybe some good manners would help you here? Shouting in capitals and loudly whining will not get you the quality help you want. <br/><br/>We don't care what you would do on "Network System Mgmt sites".<br/><br/>Your forum style is not valid and does not work as needed.<br/><br/>Describe failure mode of supplied batch code.<br/>I'm still wondering why the answer was not available on your "Network System Mgmt. Sites"...<br/><br/>you could try this<br/>ldap_sync -c "last_name LIKE 'A%%' AND type != 2308” -l “userid=?”</body></html> | |
8930. |
Solve : Squeak? |
Answer» <html><body><p>Hello,<br/><br/>First I want to say that I hope I posted in the right section.<br/>Running Windows XP SP2 and just downloaded a game called Squeak.<br/><br/>The program was built to run under MS-DOS. When I started the program, it exits automatically. I went to properties and unticked the check box that said "Close on Exit". I ran the program again, but this time the title bar changes to [<a href="https://interviewquestions.tuteehub.com/tag/inactive-499040" style="font-weight:bold;" target="_blank" title="Click to know more about INACTIVE">INACTIVE</a> GAME.EXE]. Went back to properties, ticked the box that said "Close on Exit" and now when I open the game, it automatically exits. What should I do?Quote from: dairyman on October <a href="https://interviewquestions.tuteehub.com/tag/28-242614" style="font-weight:bold;" target="_blank" title="Click to know more about 28">28</a>, <a href="https://interviewquestions.tuteehub.com/tag/2007-290053" style="font-weight:bold;" target="_blank" title="Click to know more about 2007">2007</a>, 07:06:20 <a href="https://interviewquestions.tuteehub.com/tag/pm-239666" style="font-weight:bold;" target="_blank" title="Click to know more about PM">PM</a></p><blockquote>... What should I do?<br/></blockquote><br/>Did you mean, 'What should I do to get it to run properly under XP?' ?<br/><br/><br/><br/><br/>Do you have a floppy drive?<br/>While you are waiting for an XP person to come along and assist, here is something to experiment with: boot your computer to DOS, since that is what the game wants. ( <a href="http://www.bootdisk.com">www.bootdisk.com</a> )<br/>Then try running the game. You might discover that something is wrong with the game. This is a possibility needs to be considered.<br/><br/><br/>must be your OS, you need window 98, or I dun kno.Quote<blockquote>Did you mean, 'What should I do to get it to run properly under XP?' ?</blockquote><br/>Sorry, that is what I mean.<br/><br/>Quote<blockquote>Do you have a floppy drive?</blockquote><br/>No, I don't.</body></html> | |
8931. |
Solve : how to know the file name? |
Answer» <html><body><a href="https://interviewquestions.tuteehub.com/tag/hi-479908" style="font-weight:bold;" target="_blank" title="Click to know more about HI">HI</a> All,<br/>I'm trying to <a href="https://interviewquestions.tuteehub.com/tag/retrieve-613988" style="font-weight:bold;" target="_blank" title="Click to know more about RETRIEVE">RETRIEVE</a> the file name of my batch file inside the file itself. I know that %0% contains the file that I run, but I would like to remove the directory <a href="https://interviewquestions.tuteehub.com/tag/information-238790" style="font-weight:bold;" target="_blank" title="Click to know more about INFORMATION">INFORMATION</a>. <br/>I mean, if I have a test.bat file under c:\test and I run c:\test\test.bat .... %0% contains c:\test\test.bat instead of just "test.bat".<br/>I'm looking for something like basedir in linux..<br/><br/>Any hint ?<br/>Thanks a lot<br/>Stenichele, you typed too many percent signs.<br/><br/>The variable that contains a batch file's path, name, and extension is %0 not %0%.<br/><br/>You can use some of the <a href="https://interviewquestions.tuteehub.com/tag/standard-246169" style="font-weight:bold;" target="_blank" title="Click to know more about STANDARD">STANDARD</a> variable modifiers on the %0 variable to get the bare filename and extension.<br/><br/>For full details of all the modifiers type FOR /? at the prompt<br/><br/>Consider an (imaginary) batch file C:\Test Files\Batch\mybatch.bat<br/><br/>Drive <strong>C:</strong><br/>Path <strong>\Test Files\Batch\</strong><br/>name <strong>mybatch</strong><br/>extension <strong>.bat</strong><br/><br/>%0 gives the full path, file name, and extension <strong>C:\Test Files\Batch\mybatch.bat</strong><br/>%~n0 gives the name <strong>mybatch</strong><br/>%~x0 gives the extension including the <a href="https://interviewquestions.tuteehub.com/tag/dot-pddhte-hai-441246" style="font-weight:bold;" target="_blank" title="Click to know more about DOT">DOT</a> <strong>.bat</strong><br/><br/>You can combine them so<br/><br/>%~nx0 gives the filename and the extension only (no drive or path) <strong>mybatch.bat</strong><br/><br/>Actually you can build up the same result as %0 from parts as %~dpnx0 (<strong>d</strong>rive, <strong>p</strong>ath, <strong>n</strong>ame, e<strong>x</strong>tension)<br/><br/>Hi contrex,<br/>thanks a lot !!<br/><br/>ste</body></html> | |
8932. |
Solve : Fixing Blue Screen of Death....Reg edit with MS-DOS Floppy startup? |
Answer» <html><body><p>Hey everyone! I need some help with fixing my comp; it runs Win XP Pro with SP2. I understand that i can easily just re-install Windows, but that is my last resort. I am currently having some sort of registry problem, and i cant even start up in Safe Mode. I have already created a Windows XP MS-DOS startup disk, and i am really lost as to what to do from here. Here is the error i was receiving (on my blue screen of death):<br/><br/>STOP: c0000218 {Registry File Failure} <br/>The Registry Cannot Load the Hive (file): <br/>\systemroot\system32\config\default <br/>Or its log or alternate. <br/>It is corrupt, absent, or not writable.<br/><br/>What is it that i need to do in the command prompt? Any help would be greatly appreciated, even if its just a lead in the right direction, because right now, i am quite the newb at navigating MS-DOS! Thanks everyone!<br/><br/>ALSO: If it wasn't obvious before, i do have another computer to perform neccessary operations as needed.thanks for the quick response! It looks to be exactly what i need! I wouldn't have guessed that the windows website would actually be <a href="https://interviewquestions.tuteehub.com/tag/useful-1441152" style="font-weight:bold;" target="_blank" title="Click to know more about USEFUL">USEFUL</a> X-o. I'll let you <a href="https://interviewquestions.tuteehub.com/tag/know-534065" style="font-weight:bold;" target="_blank" title="Click to know more about KNOW">KNOW</a> how it goes, thanks for your help!ok, i'm still having problems...my Windows XP cd is a backup disk..it <a href="https://interviewquestions.tuteehub.com/tag/works-17618" style="font-weight:bold;" target="_blank" title="Click to know more about WORKS">WORKS</a> if a comp boots up normally, but it wont boot up from the cd unless you can already accesss windows int he first place...anyone know how i could initialize the boot up from my cd drive from a floppy disk (dos?)?can you explain a little more? , your in dos and your trying to boot the installation cd , from dos?<br/>or your just trying to load the cd , instead of starting windows?Both, essentially, if that makes any sense:<br/><br/>I need to be able to access the recovery window, and then i can solve my issues from there (thanks to your previous link that is now gone for some reason?). In order to reach the recovery window (as i'm sure u well know, but i'd much rather be more clear this time =D), i need to be able to boot up off of the Windows XP installer CD since i cannot even make it through a windows boot up. The problem is, my Windows XP CD i have is a backup CD (original MIA), and its all i have; this CD works just fine for whatever reason if you run it while in Windows, where it manually restarts your computer, and your good to go, and everything runs just fine. Otherwise, if you designate in the bios to boot up off the CD, it doesn't <a href="https://interviewquestions.tuteehub.com/tag/find-11616" style="font-weight:bold;" target="_blank" title="Click to know more about FIND">FIND</a> anything and continues on to booting up off the hard drive :-/. So, i thought that my best chance would be to somehow start my Windows XP CD through MS-DOS, as so far, thats the most i've been able to get to. So, if i can start it up with MS-DOS, or any other alternative method you can think of, i would appreciate it mucho =) Thanks for your time Diablo416 =)<br/><br/>have you tryed rebooting it with ctrl+alt+delete , after the cd fails to load .. so that the cd is inserted before it startsup , ive had similar problems.. and found success with that, im not completely sure but after you fix dos prompt to read a cd , once it does .. its going to ask to reboot anyways<br/><br/><strong><a href="https://www.microsoft.com/technet/archive/win98/tips/erd.mspx?mfr=true">http://www.microsoft.com/technet/archive/win98/tips/erd.mspx?mfr=true</a></strong><br/>that page underneith .. "adding the cd-rom driver" contains a solution to using a cd drive at dos prompt, <br/>idealy if you can get a windows nt recovery disk , it will have an option to boot with a cd drive support, saves alot of time.. id send it to you myself, but i do not have an a:\ drive anymore and cant get it off the diskette.. ill see if i can track one down thats already online though<br/><br/>hope this helps, sorry for the delayDont worry, i appreciate all the help i can get, dont even worry about the response time, i'm not exactly hasty either =)<br/><br/>I'm not sure what you mean by a ctrl+alt+del boot, i've never done one before; whats different about it, and when do you hold it down? because initially after it fails to boot from the cd, it jumps right into booting off the HD, and then after it almost completely loads, i get my lovely BSOD...so i'm not sure when it is i'm supposed to hold it down.<br/><br/>Also, what do you mean by "so that the cd is inserted before it startsup"? Sorry, i just wish to clarify so we don't have any misunderstandings =)<br/><br/>"its going to ask to reboot anyways" -- Right, but hopefully it will have some sort of temporary storage to where it correctly boots off the Win XP Installer CD after it restarts the computer (i'm not sure exactly how it works, but i know something happens, read a little further)...because thats the only way i found that the Win XP Install CD works....heres what i mean by that...as i said before, when i run the CD normally while in Windows, and you select "install Windows", it says it will reboot the computer, and then after it restarts, it boots up off the Win XP Installer CD perfectly fine...i can reinstall windows/do whatever without a hitch. Why does it work then and not from a bios startup? I believe if i initialize some sort of startup other than the bios doing it, it will work due to some sort of boot record save.<br/><br/>I took a look at your link...and it seems like that would be a solution, but the problem is, i can't find "config.sys", and i wont have my specific cd-rom driver info, as the brands of my cd-roms are different. I guess if it came down to it, i could borrow the cd drive for this process, which really isnt that much of a pain, but none the less, i'm not sure where to find "config.sys"; searching for it via Windows turned up nill (hidden files and everything).<br/><br/>I saw that there was a 4.2 MB Windows startup disk that i could download when i was lookin stuff up (from the official Windows site, if i remember correctly)...it was the only worthwhile result i found besides what you've come up with...i'm not sure how exactly that will work (will it seperate it onto several floppys?)...is this the correct thing i would need? I thought the windows startup disk was only one floppy. Just curious to see if you thought this would be a waste of time and/or unlikely to be useful...cuz if it will work, i wouldn't mind going out and buying a few ancient floppys =). I'm in doubt due to the separation of the file that would be <a href="https://interviewquestions.tuteehub.com/tag/necc-2188203" style="font-weight:bold;" target="_blank" title="Click to know more about NECC">NECC</a> to save it to floppys...not sure if it would correctly break it up for you, or if it would even work being broken up.<br/><br/>Thanks a lot for stickin with me man, hopefully we can fix this =) . I appreciate the help!!! =D Let me know what you think, i'll check back tomorrow.Hello y'all.......I've got the exact same problem as "Armenix" and I've quoted his post below. I cant read any responses on the forum though, so, I have to ask again. My computer is a Dell laptop. While I was online yesterday, the screen went black (I thought the battery died, but that wasn't it) I plugged in the power supply and hit the start button and the last page came back up. I continued working for a few minutes, but then the computer shut down. This may have been because I pressed the power button more than once, I don't know. Later, when I re-started, the BSOD came up. Now, problem is that when I do restart, it always gets to the BSOD and it won't let me go to any safe or MSdos page on startup. It also won't boot to the cd-rom. I don't have a floppy drive, so, what now? I am only slightly familiar with DOS, and moving around in the registry, so, please bear with me. Thanks<br/><br/>Quote from: Armenix on October 15, 2007, 03:54:20 PM</p><blockquote>Hey everyone! I need some help with fixing my comp; it runs Win XP Pro with SP2. I understand that i can easily just re-install Windows, but that is my last resort. I am currently having some sort of registry problem, and i cant even start up in Safe Mode. I have already created a Windows XP MS-DOS startup disk, and i am really lost as to what to do from here. Here is the error i was receiving (on my blue screen of death):<br/><br/>STOP: c0000218 {Registry File Failure} <br/>The Registry Cannot Load the Hive (file): <br/>\systemroot\system32\config\default <br/>Or its log or alternate. <br/>It is corrupt, absent, or not writable.<br/><br/>What is it that i need to do in the command prompt? Any help would be greatly appreciated, even if its just a lead in the right direction, because right now, i am quite the newb at navigating MS-DOS! Thanks everyone!<br/><br/>ALSO: If it wasn't obvious before, i do have another computer to perform neccessary operations as needed.<br/></blockquote></body></html> | |
8933. |
Solve : capture file content as variable? |
Answer» <html><body><p>i <a href="https://interviewquestions.tuteehub.com/tag/would-3285927" style="font-weight:bold;" target="_blank" title="Click to know more about WOULD">WOULD</a> like to capture the content after the third comma .<br/>Such as : a,b,<a href="https://interviewquestions.tuteehub.com/tag/c-3540" style="font-weight:bold;" target="_blank" title="Click to know more about C">C</a>,d<br/>i would like the use d as a variable <br/><br/><a href="https://interviewquestions.tuteehub.com/tag/many-554478" style="font-weight:bold;" target="_blank" title="Click to know more about MANY">MANY</a> thanks<br/>a FOR loop with the delims set to be commas, using the "tokens=1,2,3,4,5*" <a href="https://interviewquestions.tuteehub.com/tag/implicit-504822" style="font-weight:bold;" target="_blank" title="Click to know more about IMPLICIT">IMPLICIT</a> variable creation should do it.<br/></p></body></html> | |
8934. |
Solve : list all computer in network? |
Answer» <html><body><p>is there any dos <a href="https://interviewquestions.tuteehub.com/tag/command-11508" style="font-weight:bold;" target="_blank" title="Click to know more about COMMAND">COMMAND</a> to list all the computer name or ip or both in my <a href="https://interviewquestions.tuteehub.com/tag/network-236637" style="font-weight:bold;" target="_blank" title="Click to know more about NETWORK">NETWORK</a>?<a href="https://interviewquestions.tuteehub.com/tag/see-630247" style="font-weight:bold;" target="_blank" title="Click to know more about SEE">SEE</a> your other post for replies.<br/>Double Post. Topic Closed.</p></body></html> | |
8935. |
Solve : regarding ping? |
Answer» <html><body><p>Hello friends,<br/><br/> i just want to know about PING command which were used for networking. When i use this command to know about the status of the remote system some times it gives reply and in some case it gives request time out. <br/><br/> Dear friends i want to know about when it gives request time out , what it actualy mean i mean the server is not in <a href="https://interviewquestions.tuteehub.com/tag/actives-2398741" style="font-weight:bold;" target="_blank" title="Click to know more about ACTIVES">ACTIVES</a> or some thing else ...<br/><br/> can any one on this plzQuote from: sree on October 24, 2007, 11:35:55 PM</p><blockquote>Hello friends,<br/><br/> i just want to know about PING command which were used for networking. When i use this command to know about the status of the remote system some times it gives reply and in some case it gives request time out. <br/><br/> Dear friends i want to know about when it gives request time out , what it actualy mean i mean the server is not in actives or some thing else ...<br/><br/> can any one on this plz<br/></blockquote><br/>When the ping command "times out" it means that a reply was not received from the remote system before a preset time limit was passed. <br/><br/>The <a href="https://interviewquestions.tuteehub.com/tag/aeuroereason-239555" style="font-weight:bold;" target="_blank" title="Click to know more about REASON">REASON</a> could be that the remote system is down, or running very slowly, or there is a network problem.<br/>Or the remote system could be refusing pings.<br/>Many firewalls block pings because they let an potential attacker know the system is running.I believe to ping back n forth btwn two computers both need to configure their firewall to "Allow incoming echo requests". Go to Firewall settings in your control <a href="https://interviewquestions.tuteehub.com/tag/panel-245966" style="font-weight:bold;" target="_blank" title="Click to know more about PANEL">PANEL</a>. Advanced tab. ICMP settings button. It's the first box.<br/><br/>Here are some links on it:<br/><a href="http://kb.iu.edu/data/aopy.html">http://kb.iu.edu/data/aopy.html</a><br/><a href="https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/hnw_understanding_firewall.mspx?mfr=true">http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/hnw_understanding_firewall.mspx?mfr=true</a>Quote from: Deerpark on October 25, 2007, 04:10:33 AM<blockquote>Or the remote system could be refusing pings.<br/>Many firewalls block pings because they let an potential attacker know the system is running.<br/></blockquote><br/>Quite right, Deerpark. Also many web connected <a href="https://interviewquestions.tuteehub.com/tag/servers-1202524" style="font-weight:bold;" target="_blank" title="Click to know more about SERVERS">SERVERS</a>, <a href="https://interviewquestions.tuteehub.com/tag/including-773415" style="font-weight:bold;" target="_blank" title="Click to know more about INCLUDING">INCLUDING</a> some well known ones, routinely refuse ping requests in order to reduce system workload.<br/></body></html> | |
8936. |
Solve : COPY File? |
Answer» <html><body><p>i would like to copy a.txt to b.txt and then <a href="https://interviewquestions.tuteehub.com/tag/create-427332" style="font-weight:bold;" target="_blank" title="Click to know more about CREATE">CREATE</a> c.txt <br/>i try this "copy a.txt+b.txt .\c.txt"<br/>however, i would like the content of b.txt are <a href="https://interviewquestions.tuteehub.com/tag/placed-591674" style="font-weight:bold;" target="_blank" title="Click to know more about PLACED">PLACED</a> on the <a href="https://interviewquestions.tuteehub.com/tag/new-1114486" style="font-weight:bold;" target="_blank" title="Click to know more about NEW">NEW</a> line under a.txt <br/><br/>If the content of a.txt is "<a href="https://interviewquestions.tuteehub.com/tag/abc-239818" style="font-weight:bold;" target="_blank" title="Click to know more about ABC">ABC</a>" and b's content is "<a href="https://interviewquestions.tuteehub.com/tag/def-431442" style="font-weight:bold;" target="_blank" title="Click to know more about DEF">DEF</a>"<br/>i want c.txt is: abc<br/> def<br/><br/>Many thanksMaybe something like....<br/><br/>Quote</p><blockquote>echo. >> a.txt<br/>copy a.txt+b.txt .\c.txt</blockquote><br/>This (hopefully) adds an extra line to file a.txt, some it should show in c.txt.</body></html> | |
8937. |
Solve : Insufficient Memory to Install Windows XP - Help Needed!? |
Answer» <html><body><p>It also happens when there is a previous Linux distro installed as well.<br/><br/>But mostly from homemade install CD's.Quote from: Taysanro on October 25, 2007, 09:10:39 AM</p><blockquote>Anyway, I thank you, <em><strong>contrex</strong></em>. From your words I could understand that there isn't a way to put the computer back to its initial state or, to be more specific, to put the conventional memory configuration back to what it was when the computer had came just right from the factory.</blockquote><br/>You "understand" completely wrongly. "Conventional memory" refers to the first 640K of RAM, as seen by the MS-DOS operating system. I have now written that 3 times. <br/><br/>Quote<blockquote>One more question, where is this DRDOS comes from? Is it from the OS CDROM?</blockquote><br/>Yes. Genuine Windows XP disks do NOT have Caldera DR-DOS on them!<br/><br/>Quote<blockquote>A copy of my actual XP-CD might be needed as I cannot be sure of its reliability</blockquote><br/>Yeah yeah yeah. A genuine XP CD with Caldera DR-DOS? I don't think so. Nice try, but no cigar.<br/><br/><em><strong>Deerpark</strong></em>, I set up BIOS to start the computer from the CD, but as the computer is restarted, Boot from the CD turns, automatically, into the Caldera DR-DOS environment, instead of initialize Windows setup!<br/>[/quote]<br/><br/>Then it is not a genuine XP install disk, or even a copy of one. It is something else.<br/><br/><br/><em><strong>contrex</strong></em>, I don't know if you are trying to make from this issue some <a href="https://interviewquestions.tuteehub.com/tag/kind-25540" style="font-weight:bold;" target="_blank" title="Click to know more about KIND">KIND</a> of a contest. Anyway, I will not <a href="https://interviewquestions.tuteehub.com/tag/throw-1419505" style="font-weight:bold;" target="_blank" title="Click to know more about THROW">THROW</a> myself up into a disruptive conversation. I would like to thank you all, properly, seeing that one got to give you <a href="https://interviewquestions.tuteehub.com/tag/credit-767391" style="font-weight:bold;" target="_blank" title="Click to know more about CREDIT">CREDIT</a> for trying to help others.<br/><br/>The problem of this error was, indeed, setup disk-CD <a href="https://interviewquestions.tuteehub.com/tag/damage-769368" style="font-weight:bold;" target="_blank" title="Click to know more about DAMAGE">DAMAGE</a>. Whether if it was a copy, a genuine, or "something else", whatever, I don't know, and, simply, I don't care anymore. I just bought another Operating System Install Disk (this time, I bought Vista) and <a href="https://interviewquestions.tuteehub.com/tag/everything-25538" style="font-weight:bold;" target="_blank" title="Click to know more about EVERYTHING">EVERYTHING</a> went right! No more issues referring to memory, it had just formatted the partitions and installed the OS.<br/><br/>Here's the solution, buy a genuine CD install disk (don't ask anyone to buy it for you!) and clear away your install issues.<br/>Thanks!</body></html> | |
8938. |
Solve : I can't create a batch file to open the folder where the batch file located???? |
Answer» <html><body><p>I can't create a <a href="https://interviewquestions.tuteehub.com/tag/batch-893737" style="font-weight:bold;" target="_blank" title="Click to know more about BATCH">BATCH</a> file to open the folder where the batch file located (by explorer).<br/>I create an autorun file and I want it to open my flash disk by explorer. It's really crazy but I <a href="https://interviewquestions.tuteehub.com/tag/need-25476" style="font-weight:bold;" target="_blank" title="Click to know more about NEED">NEED</a>. Help me!!!!This isnt <a href="https://interviewquestions.tuteehub.com/tag/making-1085093" style="font-weight:bold;" target="_blank" title="Click to know more about MAKING">MAKING</a> very <a href="https://interviewquestions.tuteehub.com/tag/much-249971" style="font-weight:bold;" target="_blank" title="Click to know more about MUCH">MUCH</a> sense, what is it that you want to do ?<br/>GrahamIt makes plenty of sense.<br/><br/>This batch file will open <a href="https://interviewquestions.tuteehub.com/tag/windows-22662" style="font-weight:bold;" target="_blank" title="Click to know more about WINDOWS">WINDOWS</a> explorer in whatever folder it is located.<br/><br/>@echo off<br/>explorer.exe /root,"%~dp0"<br/><br/><br/><br/><br/><br/>thank you contrex.</p></body></html> | |
8939. |
Solve : Expand value of the variable name stored within another variable? |
Answer» <html><body><p>Hello there, <br/><br/>I have the following variables defined in a script<br/><br/><strong><a href="https://interviewquestions.tuteehub.com/tag/set-11758" style="font-weight:bold;" target="_blank" title="Click to know more about SET">SET</a> PKG_NAME=CORE<br/>set MY_%PKG_NAME%_HOME=c:\home</strong><br/><br/>So this creates a variable named MY_CORE_HOME (but I dont know that from within the script). <br/>Then if I try to acces my variable using <strong>MY_%PKG_NAME%_HOME</strong>:<br/><br/>> <a href="https://interviewquestions.tuteehub.com/tag/echo-11626" style="font-weight:bold;" target="_blank" title="Click to know more about ECHO">ECHO</a> <strong>MY_%PKG_NAME%_HOME </strong> <br/>MY_CORE_HOME <br/><br/>> echo <strong>%MY_%PKG_NAME%_HOME%</strong><br/>CORE<br/><br/>What should I do can to access the content of the <strong>MY_%PKG_NAME%_HOME </strong> and have for result <strong>c:\home</strong> ?<br/><br/>please help <br/>thanks <br/>You cannot do this. Batch variables do not work in that <a href="https://interviewquestions.tuteehub.com/tag/way-246442" style="font-weight:bold;" target="_blank" title="Click to know more about WAY">WAY</a>. You cannot hide a variable <a href="https://interviewquestions.tuteehub.com/tag/inside-1045864" style="font-weight:bold;" target="_blank" title="Click to know more about INSIDE">INSIDE</a> another.<br/><br/>Quote</p><blockquote>@echo off<br/>set PKG_NAME=CORE<br/>set MY_%PKG_NAME%_HOME=c:\home<br/>echo 1 MY_%PKG_NAME%_HOME<br/>echo 2 %MY_%PKG_NAME%_HOME%<br/>echo 3 %MY_CORE_HOME%<br/></blockquote>[/tt]<br/><br/>Quote<blockquote>1 MY_CORE_HOME<br/>2 PKG_NAME<br/>3 c:\home<br/></blockquote>[/tt]<br/>You need to invoke another level of nesting<br/><br/>call set MY_%PKG_NAME%_HOME=c:\home<br/>call echo 1 MY_%PKG_NAME%_HOME<br/><br/>etc<br/><br/>what happens is that the %PKG_NAME% is evaluated and substituted into the expression<br/><br/>dont forget to double-up the %s inside a batch file<br/>GrahamNice catch Graham<br/><br/><br/>so finally to transfer the content of the variable into a one that i can access at the <a href="https://interviewquestions.tuteehub.com/tag/first-461760" style="font-weight:bold;" target="_blank" title="Click to know more about FIRST">FIRST</a> level I do:<br/><br/>>call set TEST=<strong>%</strong>MY_%PKG_NAME%_HOME<strong>%</strong><br/>>set TEST<br/>TEST=c:\home<br/><br/>then I can use TEST directly for my manipulation!<br/><br/>Thanks <br/><br/>PS: I had to add <strong>%</strong> to get it work (see above)<br/><br/><br/><br/></body></html> | |
8940. |
Solve : Stop service Running on another Server using MS DOS Batch file code? |
Answer» <html><body><p>Hi,<br/><br/>How can we 'Stop a service running on different machine or another <a href="https://interviewquestions.tuteehub.com/tag/server-11236" style="font-weight:bold;" target="_blank" title="Click to know more about SERVER">SERVER</a> using normal <a href="https://interviewquestions.tuteehub.com/tag/ms-238840" style="font-weight:bold;" target="_blank" title="Click to know more about MS">MS</a> DOS Batch file code.<br/>If somebody have any code for the same, please send me.<br/><br/>set TargetService=Themes<br/>set ServiceHost=HDBLTERGHS0005<br/>set PathToSC=c:\WINNT\system32<br/>set PathToSleep=C:\Program Files\ResKit<br/><br/>set <a href="https://interviewquestions.tuteehub.com/tag/logfile-1077632" style="font-weight:bold;" target="_blank" title="Click to know more about LOGFILE">LOGFILE</a>=restart.service.log<br/><br/>echo %<a href="https://interviewquestions.tuteehub.com/tag/date-11316" style="font-weight:bold;" target="_blank" title="Click to know more about DATE">DATE</a>% %time% Entering sequence to restart %TargetService% >> LogFile%<br/>%PathToSC%\sc.exe \\%ServiceHost% stop %TargetService%<br/>echo %date% %time% Restarted %TargetService% >> %LogFile%<br/><br/>Thanks....<br/>Sudheer<br/>have you tried the above code, and what does it say<strong>[SC] StartService: OpenService FAILED 5:<br/><br/>Access is denied.</strong><br/><br/>I am getting the above <a href="https://interviewquestions.tuteehub.com/tag/error-25548" style="font-weight:bold;" target="_blank" title="Click to know more about ERROR">ERROR</a>, how can we set the permissions so that another user on different machine can access a service.<br/>Also both the users have the same admin privilege<br/></p></body></html> | |
8941. |
Solve : Pausing Help? |
Answer» <html><body><p>Is there a way to pause for a certain amount of time in MS-DOS?<br/>i seen something <a href="https://interviewquestions.tuteehub.com/tag/similar-1207900" style="font-weight:bold;" target="_blank" title="Click to know more about SIMILAR">SIMILAR</a> to this here the other day<br/><br/>ping 1.1.1.1 -i 10 >nul<br/><br/><br/>change the number 10 for amount of seconds to timeout , i dont think its entirely accurate..I have learnt it <a href="https://interviewquestions.tuteehub.com/tag/using-1441597" style="font-weight:bold;" target="_blank" title="Click to know more about USING">USING</a> this way (still by ping):<br/><br/><a href="https://interviewquestions.tuteehub.com/tag/quote-1175222" style="font-weight:bold;" target="_blank" title="Click to know more about QUOTE">QUOTE</a></p><blockquote>ping -n 2 -w 1000 1.1.1.1 >nul</blockquote><br/><br/>Still, it is quite hard to get the timing accurate, so you may have to play around a bit with the -n variable.Oh, here's another way that you can pause (slightly more accurately I believe):<br/><br/>Quote<blockquote>ping -n 1 -w 1000 1.1.1.1 >nul<br/>echo 3<br/>echo.<br/>ping -n 2 -w 1000 1.1.1.1 >nul<br/>echo 2<br/>echo.<br/>ping -n 2 -w 1000 1.1.1.1 >nul<br/>echo 1<br/>echo.<br/>ping -n 2 -w 1000 1.1.1.1 >nul<br/>echo. <br/>echo 0</blockquote><br/>Except replace 3 with whatever number you want. You don't even have to include the numbers if you want.does<br/><br/>PING Insert <a href="https://interviewquestions.tuteehub.com/tag/7-240263" style="font-weight:bold;" target="_blank" title="Click to know more about 7">7</a>=(8-1) second delay<br/><br/>work?<br/>i always use it is should work. <br/>i suppose..Quote from: Sharamall on October 20, 2007, 08:01:11 PM<blockquote>Is there a way to pause for a certain amount of time in MS-DOS?<br/></blockquote><br/><br/><br/>Another option - - use a third party utility program.<br/><br/>ftp://ftp.simtel.net/pub/simtelnet/msdos/batchutl/<br/><br/>ftp://ftp.simtel.net/pub/simtelnet/msdos/batchutl/wait.zip<br/><br/>Examples are in the included Readme.txt file.<br/><br/>Does this work in Windows 2000?<br/><br/>Sorry, I meant the syntaxes earlier in the thread. And they do work, so sorry for the spam.Quote from: Sharamall on October 21, 2007, 01:15:21 PM<blockquote>Does this work in Windows 2000?<br/></blockquote><br/>Without a quote, I'm guessing you are asking about wait.zip ?<br/><br/><br/>I don't know for sure about W2K, since I can't test it on that os.<br/>Since it is free, and the file is small and will d/l in a very short time, your best bet is to simply grab a copy and try it.<br/>As a matter of fact, after you do, please do come back here and post and let others know if it ran ok on W2K or not.<br/><br/><br/>By the way, your original post:<br/>Quote<blockquote>Is there a way to pause for a certain amount of time in MS-DOS?<br/></blockquote>specified MS-DOS, not W2K. Quote from: Sharamall on October 21, 2007, 01:15:21 PM<blockquote>Does this work in Windows 2000?<br/><br/>Sorry, I meant the syntaxes earlier in the thread. And they do work, so sorry for the spam.<br/></blockquote>you can use sleep command, or create your own sleep..using vbscript<br/>Code: <a>[<a href="https://interviewquestions.tuteehub.com/tag/select-630282" style="font-weight:bold;" target="_blank" title="Click to know more about SELECT">SELECT</a>]</a>wscript.sleep(5000) 'sleep 5 secs<br/>save the above as myscript.vbs , usage : <br/>Code: <a>[Select]</a>@echo off<br/>rem ..my dos commands<br/>cscript /nologo myscript.vbs<br/>rem after sleeping 5 secs<br/>or<br/>you can create the script on the fly in your batch...using echo to file<br/>Code: <a>[Select]</a>....<br/>echo wscript.sleep(5000) > myscript.vbs<br/>cscript /nologo myscript.vbs<br/>..<br/>del myscript.vbs<br/>Yes, those are all awesome and they work (I tested them). Now I need shutdown to work...I reopened this thread because I wanted to ask a question about the timed pause that was posted above. The ping thing: ping -n 1 -w 1000 1.1.1.1 >nul for example. But I thought ping sent a message to an IP address and waited for a response from that computer. So how does it work here? (Basically, explain why the syntax works)Here is how it works:<br/>ping -n 1 -w 1000 1.1.1.1 >nul<br/><br/>You're sending 1 echo request (aka ping). <em>-n 1</em><br/>Code: <a>[Select]</a>-n count Number of echo requests to send.<br/>With a timeout of 1 second. <em>-w 1000</em><br/>Code: <a>[Select]</a>-w timeout Timeout in milliseconds to wait for each reply.<br/>To a nonexistent IP. <em>1.1.1.1</em><br/><br/>And <em>>nul</em> hides the text output from Ping.<br/><br/>So you're pinging an IP that doesn't exist and telling Ping to wait 1 second for a reply that will never come.<br/><br/>So since the the IP doesn't exist, after the timeout (which happens to be 1000 milliseconds) ping stops trying, and moves to the next operation? Awesome, I get it!</body></html> | |
8942. |
Solve : DOS with Wordperfect - changing font size, screen, size, background & font color? |
Answer» <html><body><p>HELP! It has been a looonnnggg time since I was in the DOS environment - can't believe I actually wrote some files many, many years ago. Anyway, I have two computers. I use one (Windows XP) as my normal everyday computer for internet, etc. The other is simply a DOS COMPUTER that has <a href="https://interviewquestions.tuteehub.com/tag/wordperfect-2336268" style="font-weight:bold;" target="_blank" title="Click to know more about WORDPERFECT">WORDPERFECT</a> 5.1 (I think) on it. This is my company computer. I do medical transcription.<br/><br/>I have asked the tech guys to PLEASE, PLEASE go into the MAINMENU (I think) in DOS and change the screen and text colors (and size). I have problems with my eyes after cataract surgery, etc. The big bright blue screen with white letters is really not working well for me.<br/><br/>I told the tech guys that I KNOW there is a simple way to change the background and text colors - they won't budge to help and claim that they have no idea how to do it! Yes, someone wrote the company's "program" with a nice menu and stuff, so SOMEONE knows DOS pretty well.<br/><br/>Now, the DOS screen itself is not where I have a problem. Once I choose something from their menu (in the DOS environment), it brings me into the WordPerfect program (older verision there as well). The screen is still BIG (takes up my entire 24" monitor) and is huge. I hate it. <br/><br/>If someone could please tell me how to change all this, I would appreciate it. I have found out how to go into Wordperfect and change the background and text color while typing, but once I am done and send my files and come BACK into the program, I have to change it again. So it is not defaulting to my chosen colors.<br/><br/>Is there a way I can permanently change all this and also have the font be somewhat smaller on the screen - more "closed in" looking - much more like what you see on windows now? <br/><br/>Please advise if you know how to do this. You may email me because I really don't remember how I <a href="https://interviewquestions.tuteehub.com/tag/even-976335" style="font-weight:bold;" target="_blank" title="Click to know more about EVEN">EVEN</a> found this forum! I may not be able to find it again!<br/><br/>I would like to have detailed instructions so that once I am able to do this and have it work, I can pass it along to those who work in the DOS environment at my company every day and are clueless on how to do it. <br/><br/>Thank you!<br/><br/>Patricia<br/><br/><em>E-Mail Removed to prevent Spam</em>Please, remove your email address from your post, or all junk mail will be on its way.Patricia<br/>Its many years since I used Wordperfect (but I still occaisionally use the Wordperfect Office Editor)<br/><br/>I cannot remember if I ever got the colours to stay in place -- but if they dont, my option would be to hack around it ..<br/><br/>Create a macro that sets the colours to those you like and then on your command line, tell it to run the macro on startup (I dont know how to do this, the manual will tell you).<br/><br/>Hope this helps<br/>GrahamHello - thank you for your help but I have no idea how to do a macro. Unfortunately I do NOT have the Wordperfect "book" - my employer has it and they are in Chicago while I am in Atlanta. No one really <a href="https://interviewquestions.tuteehub.com/tag/seems-7266461" style="font-weight:bold;" target="_blank" title="Click to know more about SEEMS">SEEMS</a> too keen on helping me there since they do not see it as a big deal I guess.<br/><br/>I do see what you are saying, but I just do not know how to do it.<br/><br/>I'm not sure they would want me to edit "their" program, so to speak.....guess I'm out of luck.<br/><br/>In DOS - don't you go to autoexecbat or something like that and go to MAINMENU (in DOS)? I know there is a LINE in MAINMENU somewhere where the text and background colors reside - I would like to change it THERE so this cannot be that difficult I wouldn't think. <br/><br/>If I am at the C <a href="https://interviewquestions.tuteehub.com/tag/prompt-592976" style="font-weight:bold;" target="_blank" title="Click to know more about PROMPT">PROMPT</a>, how do I get to the "line" that has set the colors for text and background?<br/><br/>Thanks<br/><br/>PatriciaMainmenu is a menu program set up for you .. there is probably a line that starts wordperfect there.<br/><br/>Macros are pretty easy to do ... Im pretty sure they are the same keystrokes as for the Office Editor.<br/><br/>In wordperfect, do control-F10 to start recording the macro; you are askedt to 'define macro' - this means which key do you want to assign it to, Alt-C (for colour) would be sensible<br/>now key in what you would normally do to change the colours, then press control-F10 again to save the macro.<br/><br/>Now <a href="https://interviewquestions.tuteehub.com/tag/whenever-2331622" style="font-weight:bold;" target="_blank" title="Click to know more about WHENEVER">WHENEVER</a> you press Alt-C, you colours will be set up.<br/><br/>An internet search came up with the following info<br/>Where the line in your menu starts up wordperfect, add this /M-macroname<br/>so the line might look something like<br/>c:\wordperfect\wp51.exe /M-Alt-C<br/><br/>Give it a whirl and see how it goes<br/><br/>Graham</p></body></html> | |
8943. |
Solve : Problem with string input under conditional? |
Answer» <html><body><p>I am having a problem with reading user string input under a conditional statement<br/><br/>Here is the piece of code that is causing the problem:<br/><br/>Quote</p><blockquote>set /p select="Select: "<br/>if %select%==1 set channel=-s0<br/>if %select%==2 (<br/> echo.<br/> echo ###########################<br/> echo ### Input Channel Number <br/> echo ### <br/> echo ### A single Channel 6 <br/> echo ### A range 1-5 <br/> echo ### Multiple channels 1,1,2,5-7,11 <br/> echo ### <br/> echo ###########################<br/> set /p option="Enter Channel(s): "<br/> echo %option%<br/> set channel=-channel%option%<br/> goto scan<br/>)</blockquote><br/>Fairly straight forward, what I need it to do when the user selects option 2, for him to enter the channels he wishes to scan. However, the parameter that needs to be entered is of the form "-channel 6" or "-channel 1-5", so I am appending the string "-channel" with the user input in the string %option%. However, for some unknown reason, no input is going into the string option. I've tried other string variables with the same result, when I echo the string I get nothing, the only difference of what I've been doing previously is that this is under a conditional "if" under option 2. What is the problem here?<br/><br/><br/>1. The problem is that the <a href="https://interviewquestions.tuteehub.com/tag/windows-22662" style="font-weight:bold;" target="_blank" title="Click to know more about WINDOWS">WINDOWS</a> NT command interpreter is somewhat simple minded. Using plain vanilla NT syntax, command scripts (preferred term, but many people still call them "batch files") are parsed just once, at run time. When the command processor reads a line of text, it expands any environment variables present.This means that setting variables inside FOR loops and conditional structures such as yours becomes problematic. <br/><br/>The solution came with "delayed variable expansion" in Windows 2000. Enable it thus:<br/><br/>(a) Place this statement at the beginning of the command script, or at any rate before the loop or conditional structure:-<br/><br/><strong>setlocal enabledelayedexpansion</strong><br/><br/>(b) The variables that need delayed expansion have exclamation marks front and back (American: exclamation points) instead of percent signs <br/><br/>see this modified code which works...<br/><br/>2. Incidentally, the line "goto scan" within the conditional structure is redundant; if you get to that line, you're going to that label anyway! The label itself doesn't seem to serve any useful purpose - maybe it's a leftover from earlier experiments?<br/><br/>Quote<blockquote><br/>@echo off<br/>setlocal enabledelayedexpansion<br/>set /p select="Select: "<br/>if "%select%"=="1" set channel=-s0<br/>if "%select%"=="2" (<br/> echo.<br/> echo ###########################<br/> echo ### Input Channel Number<br/> echo ###<br/> echo ### A single Channel 6<br/> echo ### A range 1-5<br/> echo ### Multiple channels 1,1,2,5-7,11<br/> echo ###<br/> echo ###########################<br/> set /p option="Enter Channel(s): "<br/> echo !option!<br/> set channel=-channel!option!<br/>)<br/>:scan<br/>echo %channel%<br/><br/></blockquote><br/>Great, thanks, and also the explanation is appreciated.<br/><br/>Another question, if I should start a new thread on this let me know. Is it possible to capture the text displayed in the counsol to a text file?Quote from: Z-Funk on October 21, 2007, 01:41:17 PM<blockquote>Great, thanks, and also the explanation is appreciated.<br/><br/>Another question, if I should start a new thread on this let me know. Is it possible to capture the text displayed in the counsol to a text file?<br/></blockquote><br/>As text<br/><br/>The easiest way, if you are running the console window in Windows, is to click the icon at the top left corner of the console window, Once the "control menu" opens, select Edit. From there you can Select All, Mark, or Copy the text you require from the command window into the clipboard. Paste into Notepad. (Once some or all of the window contents are selected, pressing Enter does the same as Copy)<br/><br/>As an image(This works with most if not all windows, not just command ones)<br/><br/>Press the Right Alt and PrintScreen keys together. The whole command window, including border and title bar, is captured as an image and can be pasted with the edit menu of a graphics app such as Paint.<br/><br/>Otherwise, of course you do know about redirection?<br/><br/>Lol, thanks, but I know how to do it using windows functions, but I mean in a running batch file.<br/><br/>For example, if I use a command with produces counsol output, could I make a script within the batch file to capture the counsol output.<br/><br/>The problem I'm having with a particular command "> %temp%\fout.txt" isn't capturing all of the output of the command, so I thought that I could just capture the entire counsol outpout on the window and find what I want from there.<br/><br/>Thanks in advance.<br/>Quote from: Z-Funk on October 21, 2007, 02:11:55 PM<blockquote>The problem I'm having with a particular command "> %temp%\fout.txt" isn't capturing all of the output of the command<br/></blockquote><br/>Could you describe a bit more fully, i.e. what is the command and what is not being captured?<br/><br/>I presume the text file fout.txt differs in some way from the command's console output as seen on screen? (Which is odd)<br/><br/><br/><br/><br/>The command or program in question does not produce a set output. It is actually a continuous scan for available networks that it detects, so depending on the signals it recieves some networks popup and then dissappear, the console screen is constantly being updated depending on what data is being received.<br/><br/>I want to put the available networks in a text file. The obvious way would just have the <a href="https://interviewquestions.tuteehub.com/tag/actual-361632" style="font-weight:bold;" target="_blank" title="Click to know more about ACTUAL">ACTUAL</a> program put them in a text file. However, it is not my code, although it is open source, but even if I modified it to do so, once the source is updated by the devs, I would again have to modify it. My goal is just to create a shell around the program to make it easier to work with.<br/><br/>In any event, the available networks while not in "fout.txt" is on the console screen. I don't know how "> %temp%\fout.txt" works so I don't know why they are not showing on the text file, but I went to c:\documents and settings\sauron\local settings\temp\fout.txt, and opened the text file and it just has the first line of output and that's it no matter how long I let the program run.<br/><br/>Let me know if you need more information.<br/>I don't see why you don't tell me the name of this program; there may be some <a href="https://interviewquestions.tuteehub.com/tag/workaround-7258376" style="font-weight:bold;" target="_blank" title="Click to know more about WORKAROUND">WORKAROUND</a> that can be searched for. The program sounds a bit like certain Unix apps such as iwlist. I take it netsh won't do what you want?<br/><br/><br/><br/>Sorry, the program is airodump-ng which is part of the aircrack-ng suite of software. The aircrack-ng suite of software is a native linux application. There is a limited windows version with a GUI, but this version is limited in terms of its full functionality.<br/><br/>However, there is a cygwin port of the full aircrack-ng suite, as you know Cygwin is a Linux-like environment for Windows. Although Cygwin is not a way to run native linux apps on Windows, you can rebuild an application from source. This version since it is built primarily from the linux source does not have a GUI and runs from the windows console. I was trying to make a shell script to interact with the suite for easy use. There is such a script on linux, but for various reasons it doesn't interact the same way on the Cygwin environment.<br/><br/>In particular, the program in question, "airodump-ng is used for packet capturing of raw 802.11 frames and is particularly suitable for collecting WEP IVs". It should be noted that aircrack is <a href="https://interviewquestions.tuteehub.com/tag/developed-431631" style="font-weight:bold;" target="_blank" title="Click to know more about DEVELOPED">DEVELOPED</a> for penetration testing purposes only.<br/>So I'm assuming that there is no way to capture the current screen output to a text file though a series of DOS commands?<br/></body></html> | |
8944. |
Solve : Like to know the list of files created on particular date? |
Answer» <html><body><p>Hi,<br/><br/>I like to know the list of files created on particular date e.g. i like to know number of files created particular directory daily??<br/><br/>i am trying like the following batch commands<br/><br/><br/>cd <br/><br/><a href="https://interviewquestions.tuteehub.com/tag/dir-431995" style="font-weight:bold;" target="_blank" title="Click to know more about DIR">DIR</a> /o:-d >> test\file_list.txt (capturing in the text file )<br/><br/>find /c "10/22/2007" test\file_list.txt >> (<a href="https://interviewquestions.tuteehub.com/tag/searching-1197083" style="font-weight:bold;" target="_blank" title="Click to know more about SEARCHING">SEARCHING</a> the date now here i need how to print the <a href="https://interviewquestions.tuteehub.com/tag/system-238321" style="font-weight:bold;" target="_blank" title="Click to know more about SYSTEM">SYSTEM</a> date daily )<br/><br/>or any other suggestions??<br/><br/>--Raman@echo off<br/><br/>cd <br/><br/>dir /o:-d > todays_files.txt<br/><br/>find /c "10/22/2007" todays_files.txt > report.txt<br/><br/>echo "Note: There will two hidden files" >> report.txt<br/><br/>-- this was i have created so far.. can anybody send me the syntax of <a href="https://interviewquestions.tuteehub.com/tag/mailing-1083264" style="font-weight:bold;" target="_blank" title="Click to know more about MAILING">MAILING</a> and capturing the system date as in this format mm/dd/yyyy the system date is given by the system variable %date%<br/><br/>C:\>echo %date%<br/>22/10/2007<br/><br/>It will be in whatever your local date format is. <br/><br/><br/><br/><br/><br/>Thanks contrex i <a href="https://interviewquestions.tuteehub.com/tag/got-23540" style="font-weight:bold;" target="_blank" title="Click to know more about GOT">GOT</a> it...<br/><br/>--Raman</p></body></html> | |
8945. |
Solve : Problem with (Attrib) code? |
Answer» <html><body><p>Hello <a href="https://interviewquestions.tuteehub.com/tag/dear-431391" style="font-weight:bold;" target="_blank" title="Click to know more about DEAR">DEAR</a> all!!<br/><br/>I wish u will be fine and doing well.<br/><br/>First i want to say that my English is not good if there be any mistake in my writing, forgive me please.<br/><br/>I use Windows <a href="https://interviewquestions.tuteehub.com/tag/xp-747558" style="font-weight:bold;" target="_blank" title="Click to know more about XP">XP</a> SP2<br/><br/>My computer was infected by a virus and my all folders became Super Hidden and also task Manager, Folder Option, Regedit and some other options was disabled by this virus.I removed the virus using kaspersky Antivirus v.7.0.119 and I also recovered approximately all of my folders using the following Attrib code:<br/><br/>attrib -s -h -r [drive] [folder]<br/>attrib -s -h -r d:\Farahmand<br/><br/>But the problem which I have is this that whenever I want to recover My Document folder using this attrib code, it cant be recovered! I write the attrib code as following:<br/><br/>attrib -s -h -r C:\Documents and Settings\Administrator\My Documents<br/><br/>After I type this code in Cmd and and press Enter button it gives the following message:<br/><br/>Parameter format not correct -<br/><br/>If there is any special attrib code for recovering/enabling the My Document folder from Super Hidden, please write it to me.<br/><br/>Help me please!<br/>Farahmand<br/>Farahmand<br/>I think the solution will be <a href="https://interviewquestions.tuteehub.com/tag/simple-1208262" style="font-weight:bold;" target="_blank" title="Click to know more about SIMPLE">SIMPLE</a> ... you see the My Documents folder name contains spaces.<br/><br/>To allow this you must put quotes around the folder name, <a href="https://interviewquestions.tuteehub.com/tag/like-537196" style="font-weight:bold;" target="_blank" title="Click to know more about LIKE">LIKE</a> this :<br/><br/>attrib -s -h -r "C:\Documents and Settings\Administrator\My Documents"<br/><br/>This should work<br/><br/>GrahamHello friend! <br/><br/>Sorry for comming late.I had some problem and I couldn't come and see the Topic.<br/><br/>Thanks for ur <a href="https://interviewquestions.tuteehub.com/tag/answer-15557" style="font-weight:bold;" target="_blank" title="Click to know more about ANSWER">ANSWER</a>!<br/><br/>It worked and I recovered My Documents folder.<br/><br/>but I have another question: <br/><br/>We must use qoutes for every folder which has spaces on their name?<br/><br/>Thank you so much.<br/><br/>Farahmand<br/><br/>Quote from: Farahmand on October 23, 2007, 04:57:40 AM</p><blockquote>We must use qoutes for every folder which has spaces on their name?<br/></blockquote>Yes.</body></html> | |
8946. |
Solve : Need help writing a script!!!!!!!!!!? |
Answer» <html><body><p>Does anyone know how to do this?<br/><br/>- input a string that is to be <a href="https://interviewquestions.tuteehub.com/tag/used-763273" style="font-weight:bold;" target="_blank" title="Click to know more about USED">USED</a> for matching purposes<br/>- loop through the entire directory tree of your drive<br/>- loop through all the files on each drive<br/>- accumulate a <a href="https://interviewquestions.tuteehub.com/tag/total-238051" style="font-weight:bold;" target="_blank" title="Click to know more about TOTAL">TOTAL</a> of all files that contain the input matching string<br/>-display the number of files on the drive that contain the input string using a formatted sentence like:<br/><br/>There are nnn files on the drive that contain the string "xxxxx".- String that was input as postional parameter.<br/><br/><a href="https://interviewquestions.tuteehub.com/tag/please-601513" style="font-weight:bold;" target="_blank" title="Click to know more about PLEASE">PLEASE</a> HELP ME! It's for my homework!Homework helping mode:-<br/><br/>Quote</p><blockquote>- input a string that is to be used for matching purposes</blockquote><br/>set /P<br/><br/>Quote<blockquote>- loop through the entire directory tree of your drive</blockquote><br/>FOR <br/><br/>dir /s<br/><br/>Quote<blockquote>- loop through all the files on each drive</blockquote><br/>*.*<br/><br/>Quote<blockquote>- accumulate a total of all files that contain the input matching string</blockquote><br/>set /a<br/><br/>Quote<blockquote>-display the number of files on the drive that contain the input string using a formatted sentence like:</blockquote><br/>echo, variables, <br/><br/>This is an interesting little project, which, if you had been paying attention in <a href="https://interviewquestions.tuteehub.com/tag/class-18125" style="font-weight:bold;" target="_blank" title="Click to know more about CLASS">CLASS</a>, and read up a little bit, you should have no trouble in completing. Please feel free to post scripts which we can comment on and suggest improvements to.<br/><br/>(We would have <a href="https://interviewquestions.tuteehub.com/tag/known-534098" style="font-weight:bold;" target="_blank" title="Click to know more about KNOWN">KNOWN</a> it was your homework even if you hadn't said so!)<br/><br/><br/><br/><br/></body></html> | |
8947. |
Solve : help with batch file? |
Answer» <html><body><p>Hi everyone, i have batch <a href="https://interviewquestions.tuteehub.com/tag/file-11330" style="font-weight:bold;" target="_blank" title="Click to know more about FILE">FILE</a> with 4 commands. 1st command start program. it should start the program and wait till it will close and after the <a href="https://interviewquestions.tuteehub.com/tag/rest-11386" style="font-weight:bold;" target="_blank" title="Click to know more about REST">REST</a> is making backups.<br/>but it doesnt wait for the program to <a href="https://interviewquestions.tuteehub.com/tag/stop-1228105" style="font-weight:bold;" target="_blank" title="Click to know more about STOP">STOP</a>, but it <a href="https://interviewquestions.tuteehub.com/tag/continues-2542063" style="font-weight:bold;" target="_blank" title="Click to know more about CONTINUES">CONTINUES</a> while the program is runnig, do u know if exist some way, how to say to the batch file that it should wait for thge program to stop and and after process the other commands.<br/>thanx for reply!you can do it manually by adding <br/>" pause " <br/><br/></p></body></html> | |
8948. |
Solve : scheduled tasks? |
Answer» <html><body><p>i need a command <a href="https://interviewquestions.tuteehub.com/tag/line-239358" style="font-weight:bold;" target="_blank" title="Click to know more about LINE">LINE</a> that will move a file to <a href="https://interviewquestions.tuteehub.com/tag/scheduled-637595" style="font-weight:bold;" target="_blank" title="Click to know more about SCHEDULED">SCHEDULED</a> task and <a href="https://interviewquestions.tuteehub.com/tag/make-249948" style="font-weight:bold;" target="_blank" title="Click to know more about MAKE">MAKE</a> it run everytime i logon.<br/>how do i do that?<br/><br/>thanks in adv.See <a href="https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/schtasks.mspx?mfr=true">here</a> for <a href="https://interviewquestions.tuteehub.com/tag/inspiration-770150" style="font-weight:bold;" target="_blank" title="Click to know more about INSPIRATION">INSPIRATION</a></p></body></html> | |
8949. |
Solve : Q&A Thread? |
Answer» <html><body><p>Well as before CH is still poping up with the same stuff over and over...<br/>Why not make a thread so <a href="https://interviewquestions.tuteehub.com/tag/people-238015" style="font-weight:bold;" target="_blank" title="Click to know more about PEOPLE">PEOPLE</a> dont ask the samething over and over and over and over and over and over.... ETC<br/><br/>Q:HOW TO GET ACCESS TO DOS WHEN ADMIN BLOCKS IT???<br/>A:Figure it out urself no one here is going to help you. This Question pops up everytime i come and <a href="https://interviewquestions.tuteehub.com/tag/vist-723691" style="font-weight:bold;" target="_blank" title="Click to know more about VIST">VIST</a> CH.<br/><br/>Q:How to run a batch file hidden?<br/>A: No idea why you would do that...but this might help...<br/><br/><a href="http://www.commandline.co.uk/cmdow/">http://www.commandline.co.uk/cmdow/</a><br/><br/>Q:Where to get all the commands of DOS?<br/>A: I use this site<br/><a href="https://www.ss64.com/nt/">http://www.ss64.com/nt/</a><br/>first thing that comes up on google when u search cmd commands.<br/><br/>Q:How to make a "pause"?<br/>A: Many ways to do it...<br/><br/>ping -<a href="https://interviewquestions.tuteehub.com/tag/n-236724" style="font-weight:bold;" target="_blank" title="Click to know more about N">N</a> 2 -w 1000 1.1.1.1 >nul<br/><br/>or<br/><br/>ping -n 1 -w 1000 1.1.1.1 >nul<br/>echo 3<br/>echo.<br/>ping -n 2 -w 1000 1.1.1.1 >nul<br/>echo 2<br/>echo.<br/>ping -n 2 -w 1000 1.1.1.1 >nul<br/>echo 1<br/>echo.<br/>ping -n 2 -w 1000 1.1.1.1 >nul<br/>echo.<br/>echo 0<br/><br/>or<br/><br/>PING Insert 7=(8-1) second delay<br/><br/>Q: How to set a batch file to start at a certain time?<br/>A: Control Panel > Scheduled Task<br/>or <br/><a href="https://www.ss64.com/nt/schtasks.html">http://www.ss64.com/nt/schtasks.html</a><br/><br/>Q: How come the batch solution to my virus / trojan / etc doesnt work?<br/>A: Try Running in Safe Mode<br/><br/>Q: How to <a href="https://interviewquestions.tuteehub.com/tag/backup-18158" style="font-weight:bold;" target="_blank" title="Click to know more about BACKUP">BACKUP</a> stuff?<br/>A: xcopy or copy<br/>here is a simple code that <br/>transfer all the stuff from one drive onto my USB<br/><br/>xcopy "H:\*.*" "E:\wis" /s /y<br/><br/>*.* = all<br/>*.txt = all text files<br/>*.x = all x files<br/><br/>for more info:<br/><a href="https://www.ss64.com/nt/xcopy.html">http://www.ss64.com/nt/xcopy.html</a><br/><br/><br/>Thats most of the FAQ around here.<br/>So yea....It's a Help Forum...<br/><br/>It's the nature of the Beast.I have lost count of the number of times I have typed FOR /? at the command <a href="https://interviewquestions.tuteehub.com/tag/prompt-592976" style="font-weight:bold;" target="_blank" title="Click to know more about PROMPT">PROMPT</a> and then copied-and-pasted the part about variable modifiers into an answer.<br/>I thought the Q&A is here ? maybe you can add yours there?Should we post how to get to DOS when it is disabled? It was disabled at my school so I know how to get through. Quote from: Sharamall on October 21, 2007, 07:44:29 PM</p><blockquote>Should we post how to get to DOS when it is disabled? It was disabled at my school so I know how to get through. <br/></blockquote>no</body></html> | |
8950. |
Solve : Way to set a string to a command output? |
Answer» <html><body><p>I'm using Windos Xp professional corporate edition. i would like to know if there is a way to set a string to the output of a given command.<br/><br/>For example, the command "net <a href="https://interviewquestions.tuteehub.com/tag/config-929024" style="font-weight:bold;" target="_blank" title="Click to know more about CONFIG">CONFIG</a> rdr" will give the following output:<br/><br/>Quote</p><blockquote>Computer name \\C-8FCE127AFE9A2<br/>Full Computer name c-8fce127afe9a21<br/>User name Sauron<br/><br/>Workstation active on<br/> NetbiosSmb (000000000000)<br/> NetBT_Tcpip_{2FF4CC67-D07D-4FEB-85FD-860B1254C849} (00C0A8C16B59)<br/> NetBT_Tcpip_{8F676250-5DA4-424D-924E-1300965208B9} (00508DEB7F3E)<br/> NetBT_Tcpip_{45CF33C4-A270-4E9F-945F-C9FB6E1B0875} (005056C00001)<br/> NetBT_Tcpip_{26B53747-C608-45FC-8FBE-3C4A845AB750} (005056C00008)<br/><br/>Software <a href="https://interviewquestions.tuteehub.com/tag/version-1444891" style="font-weight:bold;" target="_blank" title="Click to know more about VERSION">VERSION</a> Windows 2002<br/><br/>Workstation domain RADEON<br/>Workstation Domain DNS Name (null)<br/>Logon domain C-8FCE127AFE9A2<br/><br/>COM Open Timeout (sec) 0<br/>COM Send Count (byte) 16<br/>COM Send Timeout (msec) 250<br/>The command completed successfully.</blockquote><br/>I would like to be able to set a string to the addresses under "Workstations active on:". One of these:<br/><br/>Quote<blockquote> NetbiosSmb (000000000000)<br/> NetBT_Tcpip_{2FF4CC67-D07D-4FEB-85FD-860B1254C849} (00C0A8C16B59)<br/> NetBT_Tcpip_{8F676250-5DA4-424D-924E-1300965208B9} (00508DEB7F3E)<br/> NetBT_Tcpip_{45CF33C4-A270-4E9F-945F-C9FB6E1B0875} (005056C00001)<br/> NetBT_Tcpip_{26B53747-C608-45FC-8FBE-3C4A845AB750} (005056C00008)<br/></blockquote><br/>Is there a way to do this in a standard dos batch file on windows xp pro?<br/><br/>Thanks in advance.<br/><br/>I'm not helping anyone called Sauron!!<br/><br/>Seriously, I'll post something tomorrow.<br/><br/>Which workstation did you want? Are there always 4?<br/><br/>Quote from: contrex on October 20, 2007, 05:30:21 PM<blockquote>I'm not helping anyone called Sauron!!<br/><br/>Seriously, I'll post something tomorrow.<br/><br/>Which workstation did you want? Are there always 4?<br/></blockquote><br/>Ultimately, I wanted to let the user select from any one of the workstations. There will not always be 4, it depends on how many network adapters will be on the machine.<br/><br/>This should illustrate the ideas needed:<br/><br/>Quote<blockquote><br/><br/>@echo off<br/>setlocal enabledelayedexpansion<br/><br/>REM using your command output in %temp%\fout.txt<br/>REM use this in real situation<br/>REM net config rdr > %temp%\fout.txt<br/><br/>echo.<br/>echo Workstations found:<br/>echo.<br/><br/>REM count 'em and list 'em<br/><br/>set /a Count=0<br/>for /F "delims==" %%L in ('type %temp%\fout.txt ^| find " NetBT_Tcpip"') do (<br/>set /a Count += 1<br/>echo !Count! %%L<br/>)<br/><br/>echo.<br/><br/>REM get user to choose one<br/><br/>set /p chosennumber=Choose a number between 1 and %Count% :<br/><br/>REM get the string and put it in a variable<br/><br/>set /a Count=0<br/>for /F "delims==" %%L in ('type fout.txt ^| find " NetBT_Tcpip"') do (<br/>set /a Count += 1<br/>if "!Count!"=="%chosennumber%" set chosenadaptor=%%L<br/>)<br/><br/>REM here it is<br/><br/>echo.<br/>echo Adaptor Chosen: %chosennumber% %chosenadaptor%<br/>echo.<br/><br/></blockquote><br/>Saved as ch-adapt.bat<br/><br/>Result of run:<br/><br/>Quote<blockquote><br/>S:\Test>ch-adapt<br/><br/>Workstations found:<br/><br/>1 NetBT_Tcpip_{2FF4CC67-D07D-4FEB-85FD-860B1254C849} (00C0A8C16B59)<br/>2 NetBT_Tcpip_{8F676250-5DA4-424D-924E-1300965208B9} (00508DEB7F3E)<br/>3 NetBT_Tcpip_{45CF33C4-A270-4E9F-945F-C9FB6E1B0875} (005056C00001)<br/>4 NetBT_Tcpip_{26B53747-C608-45FC-8FBE-3C4A845AB750} (005056C00008)<br/><br/>Choose a number between 1 and 4 :3<br/><br/>Adaptor Chosen: 3 NetBT_Tcpip_{45CF33C4-A270-4E9F-945F-C9FB6E1B0875} (005056C00001)<br/><br/>S:\Test><br/><br/></blockquote><br/>You still have leading spaces in the string, dunno if that will be a problem? Is the whole string desired, or part of it?<br/><br/><br/><br/>Quote<blockquote>You still have leading spaces in the string, dunno if that will be a problem? Is the whole string desired, or part of it?</blockquote><br/>First, thanks a lot. I thought it may involve making a separate file to first store the information.<br/><br/>I just need the adapter address from the string for example:<br/><br/>Quote<blockquote>{2FF4CC67-D07D-4FEB-85FD-860B1254C849}</blockquote><br/>Agains, thanks for your help. <br/><br/>I have a few questions since I'm new to batch programming. It looks like essentially that your storing the output of the "net config rdr" in a filed called fout.txt in the temp folder. Then you are sorting through that file looking for the identifying string "NetBT_Tcpip" storing them L, adding to a counter named "Count", then outputing the counter next to the the current string in L.<br/><br/>The <a href="https://interviewquestions.tuteehub.com/tag/second-238031" style="font-weight:bold;" target="_blank" title="Click to know more about SECOND">SECOND</a> part looks like it is doing the same thing but that once the count variable equals the chosen number, then it stores the current string in L in chosen adapter.<br/><br/><a href="https://interviewquestions.tuteehub.com/tag/great-2556" style="font-weight:bold;" target="_blank" title="Click to know more about GREAT">GREAT</a>, I will now try to see if I can isolate just the numeric values from the output.<br/><br/>(1) You don't actually need a separate file. It's just that my PC is not on a LAN so i could not just use the output of the command directly. This is how you could do that (note single quotes)<br/><br/>for /f "delims==" %%L in ('net config rdr ^| find " NetBT_Tcpip"') do (<br/> commands<br/> )<br/><br/>(2) Do you need just the hex string or do you want the curly brackets ("braces" in America, I believe) as well?<br/><br/>If the string eg<br/><br/> NetBT_Tcpip_{2FF4CC67-D07D-4FEB-85FD-860B1254C849} (00C0A8C16B59)<br/><br/>is always a fixed length, you can just select so many characters from the string (first char is position 0)<br/><br/>(with curly brackets) the 38 characters starting at position 20 <br/><br/>set address=%chosenadaptor:~20,38%<br/><br/>(without curly brackets) the 36 characters starting at position 21<br/><br/>set address=%chosenadaptor:~21,36%<br/><br/>Or, parse out the chars in between the curly brackets (they will be the second token) with FOR<br/><br/>add these lines to the end of my above batch to see what I mean<br/><br/>Quote<blockquote><br/><br/>REM parse out address<br/><br/>echo method (1)<br/><br/>echo address with curly brackets is %chosenadaptor:~20,38%<br/>echo address without curly brackets is %chosenadaptor:~21,36%<br/><br/>echo method (2)<br/><br/>for /F "delims={} tokens=1,2" %%A in ("%chosenadaptor%") do set address=%%B<br/><br/>echo address with curly brackets is {%address%}<br/>echo address without curly brackets is %address%<br/><br/></blockquote><br/>Quote<blockquote><br/>method (1)<br/>address with curly brackets is {45CF33C4-A270-4E9F-945F-C9FB6E1B0875}<br/>address without curly brackets is 45CF33C4-A270-4E9F-945F-C9FB6E1B0875<br/>method (2)<br/>address with curly brackets is {45CF33C4-A270-4E9F-945F-C9FB6E1B0875}<br/>address without curly brackets is 45CF33C4-A270-4E9F-945F-C9FB6E1B0875<br/><br/></blockquote>Quote<blockquote>It looks like essentially that your storing the output of the "net config rdr" in a filed called fout.txt in the temp folder. Then you are sorting through that file looking for the identifying string "NetBT_Tcpip" storing them L, adding to a counter named "Count", then outputing the counter next to the the current string in L.<br/><br/>The second part looks like it is doing the same thing but that once the count variable equals the chosen number, then it stores the current string in L in chosen adapter.</blockquote><br/>That is exactly right.<br/><br/>You've been a great help, yea, I got the adapter addressed narrowed down using the numeric parameters ~20,38 (yes, I needed the curly brackets).<br/><br/>One more question, how do I concatenate strings, for example, once I get the adapter address in a string, I need it appended to another string not in the original output, something like:<br/><br/>Quote<blockquote>Test.dll|{2FF4CC67-D07D-4FEB-85FD-860B1254C849}</blockquote><br/>Thanks again. Ultimately, these strings are going to be fed as parameters to another command so the syntax has to be just right.<br/>Quote from: Z-Funk on October 21, 2007, 07:36:05 AM<blockquote>You've been a great help, yea, I got the adapter addressed narrowed down using the numeric parameters ~20,38 (yes, I needed the curly brackets).<br/><br/>One more question, how do I concatenate strings, for example, once I get the adapter address in a string, I need it appended to another string not in the original output, something like:<br/><br/>Quote<blockquote>Test.dll|{2FF4CC67-D07D-4FEB-85FD-860B1254C849}</blockquote><br/>Thanks again. Ultimately, these strings are going to be fed as parameters to another command so the syntax has to be just right.<br/><br/></blockquote><br/>Is that a pipe symbol | that I see after Test.dll? <br/><br/>To concatenate strings, just put them one after another including any spaces needed e.g.<br/><br/>Othercommand.bat Test.dll|%address%<br/><br/>Otherprogram.exe Test.dll | %chosenadaptor:~20,38%<br/><br/>can mix literal strings and variables<br/><br/>set pet1=cat<br/>set pet2=dog<br/><br/>echo %pet1% and %pet2% and pony<br/><br/>set <a href="https://interviewquestions.tuteehub.com/tag/menagerie-558633" style="font-weight:bold;" target="_blank" title="Click to know more about MENAGERIE">MENAGERIE</a>=%pet1% and %pet2% and pony<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/></body></html> | |