This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 5951. |
Solve : reg export? |
|
Answer» I need to export HKCU\Control Panel from a command line. I know I can run REG EXPORT |
|
| 5952. |
Solve : Some noob questions? |
|
Answer» yarr! How do I do this: yarr! How do I do this:what you NEED is converting to uppercase. Quote 2. How do I check every IP who is conneckted with me. (Like I talk with someone on MSN how do I check him/her IP?try netstat /? Quote How do I check every IP who is conneckted with me. (Like I talk with someone on MSN how do I check him/her IP?I don't think you would be able to see someones IP address on MSN because I think it goes through their servers first. Well you might be able to use the taskkill command or something to kill iexplore.exe Quote Sounds devious.....So does almost everything he posts... :-/Changing the background of Windows Desktop requires extensive commands You must find current background rename it to something else * copy the new desktop background to the current location then the desktop itself must refresh... Due to the nature of this post, I will not give the exact commands (it does sound devious, but I will not say that it is) some * I dont know if there is a command to rename files in DOS, the basic part is that you are replacing the current file. hehu are u just trying to get some devious things off this forum because that wont happen every post of yours has something evil in itQuote from: lordoftheplat on March 28, 2007, 04:05:59 AM hehu are u just trying to get some devious things off this forum because that wont happen every post of yours has something evil in itI am afraid I agree with lordoftheplat |
|
| 5953. |
Solve : Batch file noob needs help? |
|
Answer» Hi, |
|
| 5954. |
Solve : MS-DOS Application Start Minimized? |
|
Answer» Hello everyone, I figured it out. What was the issue? (could be good for others who may encounter similar ISSUES)I had the /MIN at the end of my statement... moved it to the correct location and it all worked.ok. Thanks.Ok I got eveything I need except for one issue... Here's my Code now.. @echo off start /MIN "" "Q:\Program Files\Microsoft Office 2003\OFFICE11\OUTLOOK.EXE" %* start "" "Q:\Program Files\BPI_Apps\enhpurch.exe" ping 192.168.23.1 -n 180 tskill OUTLOOK This works great the first time... when I run it a second I'm getting a prompt for safe mode for outlook. So my question is as follows, is there any other way to close outlook GRACEFULLY ? So this safe mode option will be disabled.Is outlook actually still trying to process anything (emails, calendars, etc), or is it just sitting idle when tskill closes it?Sitting IDLEI hate to be of no use, but I'm not aware of another command to kill an app in dos that will close the program PROPERLY. Anyone else? |
|
| 5955. |
Solve : Corrupt file and dos problems? |
|
Answer» Hi, I came across this forum while googling for some help on the following issue. Because you used the registry file created by Setup, this registry does not know that these restore points exist and are available. A new folder is created with a new GUID under System Volume Information and a restore point is created that includes a copy of the registry files that were copied during part one. This is why it is important not to use the most current folder, especially if the time stamp on the folder is the same as the current time.well nope i didn't go through it all cause i thought it was pointless anyway considering that there are some major mistakes in the way the guide describes the commands I'm losing my hope this is where i quited copy c:\windows\repair\system c:\windows\system32\config\system copy c:\windows\repair\system\software c:\windows\system32\config\software copy c:\windows\repair\system\sam c:\windows\system32\config\sam copy c:\windows\repair\system\security c:\windows\system32\config\security copy c:\windows\repair\system\default c:\windows\system32\config\default the bolded part shouldn't be there cause there is no 'system' folder under the 'repair' one. so i didn't include those words. Quote did you copy registry backups from your System Volume Information folder?i'm not sure i got this. the only copy said to be done (apart from the backup of the corrupt files) is this one right above. i have no idea on how or where to search for other files whatsoever... Yes the part you've bolded is a mistake (I've never noticed that before)... but the registry backups you NEED is in c:\windows\repair. If you don't want to follow the guide and you just want to backup your files instead, I suggest you remove the hard drive from the system and install it as a a slave in another system. Another option, as you mentioned yourself earlier, is to download a Linux live CD and use it to access your files. Ubuntu is my live cd of choice. |
|
| 5956. |
Solve : linking batch files? |
|
Answer» what I’m trying to do is to create a system variable LEJOS_HOME = c:\lejos and in the next step I’m added %LEJOS_HOME%/bin to the END of the system variable PATH but it cant be added until LEJOS_HOME exists and for some reason it wont exist until the batch is closed, also having them in 2 different batch files and calling each on MANUALLY will work but having them called one after another from a 3rd batch file will not work. is there any way to have a batch file close it self then call the next one? or any other suggestions?Quote from: ahamelin on February 05, 2008, 09:11:34 AM ... is there any way to have a batch file close it self then call the next one? Regarding just this part of your post: Yes. Don't use the call command. Simply have batch1 execute batch2 the same as it would any other program. When this happens, batch1 ceases to RUN, and batch2 takes over - unlike when batch2 is run with the call command. The call command allows batch1 to continue to run, and batch 2 to run within it. When batch2 ends, control reverts back to batch1 on the same line as batch2 ended. Example: Code: [Select]rem save this and name it batch1.bat @echo off cls echo This is batch1 echo. pause call batch2 echo. pause echo Now back in batch1 echo. pause Code: [Select]@echo off rem save this and name it batch2.bat echo Now in batch2 echo. You'll see what happens with the above two silly and simple batch files. Now edit batch1.bat to: Code: [Select]@echo off cls echo This is batch1 echo. pause batch2 echo. pause echo Now back in batch1 echo. pause and you'll see that the last part of batch1 is never run. Quote what I’m trying to do is to create a system variable LEJOS_HOME = c:\lejos and in the next step I’m added %LEJOS_HOME%/bin to the end of the system variable PATH but it cant be added until LEJOS_HOME exists and for some reason it wont exist until the batch is closed I'm not sure it works that way. Code: [Select]@echo off set lejos_home=c:\lejos path=%path%;%lejos_home% The new path will be in effect until the window closes. Perhaps if you posted your code it will be easier to see what you've done. all RIGHTY willy W's way of doing it the second batch file just runs in the command prompt that the first one did so the command prompt is not closing there for the variables are not being set permanently so that doesn't work but thanks anyways ^.^ and for sidewinder (lover the halo reference ) i will post my code and try to make it a little more clear what I'm trying to do thanks again batch file 1 Code: [Select]@ECHO OFF CLS ECHO Starting the batch file WindowsXP-KB838079-SupportTools-ENU.exe cd MINDSTORMS NXT Driver v1.02 setup.exe cd .. xcopy /s /i lejos_nxj\*.* c:\lejos_nxj copy LeJOSNXTExtension.jar C:\BlueJ\lib\extensions ECHO Now run Step2: PAUSE EXIT batch 2 Code: [Select]@ECHO OFF SETX LEJOS_HOME "C:\lejos_nxj" -m ECHO Now run Step3: PAUSE EXIT batch 3 Code: [Select]@ECHO OFF SETX Path "%PATH%;%LEJOS_HOME%\bin" -m ECHO Now run Step4: PAUSE EXIT there are actually 4 batch files , these are the first 3, but i just mentioned the 2nd and 3rd because they were the easyest to describe. anyways the 2nd and 3rd ones could probably be fixed by also using a set .... as well as the setx so they get set locally as well as in the system , setx sets the system variables in the system but CMD can not see that variable until the cmd that set them is closed. and you need the windows update that's installed in the first batch file to get setx working in the first place. any ideas?I probably would combine all the batch files, use set locally for the run, and use setx at the end of the file to get the values in the machine environment. This would allow you to build all the environment strings so that this line would work: SETX Path "%PATH%;%LEJOS_HOME%\bin" -m Hope this helps. |
|
| 5957. |
Solve : How can i get diffrenene between two times using batch files???? |
|
Answer» Hi, |
|
| 5958. |
Solve : Save? |
|
Answer» Hey echo file.txt>%0I think I see what you were trying to do, but you had your redirection the wrong way. > is to OUTPUT TO a file < is to read FROM a file Look up the syntax on the SET COMMAND. Specifically SET /P. There are even some examples on this forum on using SET /P in a batch file to set a variable from a file.ok well I tryed Code: [Select]@echo off set /a ex=0 set /a ex=%ex% + 1 echo %ex% pause>nul echo %ex%>file.txt set /p ex2=file.txt<%0 echo %ex2% pause>nul and it ended up with 1 [emailprotected] off I think this is because it's copying ECHO is off. into the file.txt im not sure about the [emailprotected] off thing |
|
| 5959. |
Solve : Parse a string in a batch file? |
|
Answer» All, |
|
| 5960. |
Solve : Arkanoid II - DOS Game running too slow in Windows XP? |
|
Answer» Hello, I have the old Arkanoid II (The Revenge of DOH) on a floppy disk, I installed it on WINDOW XP awhile back. I can play it, but the problem is it runs too slow. I EVEN copied Autoexec.nt and CONFIG.nt and it still runs too slow. What changes do I need to make to my Autoexec and/or Config files to make the game go faster? I don't want to speed it up too fast, but just enough to play the game. |
|
| 5961. |
Solve : HELP!!!! WANA KNO A COMMAND? |
|
Answer» THEIR IS COMMAND U ENTER IN MS DOS THAT VIEWS THE KEYSTROKES U ENTERED IN YOUR COMPUTER!!!! DOES ANY1 KNO THIS COMMAND AND CAN TELL ME PLZ?Quote THEIR IS COMMAND U ENTER IN MS DOS THAT VIEWS THE KEYSTROKES U ENTERED IN YOUR COMPUTER!!!! DOES ANY1 KNO THIS COMMAND AND CAN TELL ME PLZ? Please don't type in all caps. Please don't use SILLY abbreviations. I know of no command in MS-DOS that "views" keystrokes. there isn't any....what you are looking for is a spyware program....a keylogger. google for one. A quick note: Keyloggers, though not illegal, do disrespect peoples privacy. FIND it in your right mind "do onto others as they do to you" Other than that, DOS does have the command doskey, but doskey does not log WINDOWS, only DOS commands. It should be loaded into your autoexec.bat file (not suggested for Windows 2000 and up) |
|
| 5962. |
Solve : Force delete a network drive? |
|
Answer» hi all, The device is being accessed by an active process. More help is available by typing NET HELPMSG 2404. is there a way to force delete it as at this point in my batch file (the end) nothing is using it and I want rid. any ideas??Quote is there a way to force delete it as at this point in my batch file (the end) nothing is using it If there were nothing using the mapped drive there would be no reason to force it! The net USE command does not have a force switch. You might consider using VBScript to create a NETWORK object. The network object has a RemoveNetworkDrive method which has a force argument. Google might ALSO help for a 3RD party solution. Good luck. cheers, I have just this minute fixed it. Earlier in the batch i had mapped T: I have then used this over and over again, I have set the working directory to withing that drive and hadn't come out of it. The running process was the batch it's self, and a simple 'C:' before 'net use /delete t:' did the trick. cheers again. (umm, hidesight is good.......... ) |
|
| 5963. |
Solve : What is my fault?? |
|
Answer» Hello |
|
| 5964. |
Solve : Having trouble finding and moving files? |
|
Answer» Hi, What I tried was thisyou can't do that with move command check the help, type move /? on the command prompt. move only moves a directory path or file(s) (with wildcards support). the output of the "dir" command list out a list of files which the move command cannot process. you got to have a for loop to loop over these files and use the move command to move each individual files to the new location. well i realised that when it game error messages. now i am using xcopy to copy the files as sort of a physical log. then i want it to replace the *.exe files with a special one I have prepared earlier. the replace command wont let you replace specific files, not EVEN ONES with the *. So i am trying to use a for command to get the name of the executable that has been copied, rename the special .exe with that name and move the renamed special exe into the original path the name came from. Unfortunatley i dont understand the for command one bit, and need some help |
|
| 5965. |
Solve : I used "MOVE" wrong... help!? |
|
Answer» I used a batch file to move files from LOCAL to another, but forgot to create the folder that they were going into. Now they are all in one file... can i save those files? please tell me i can!!I don't see it was possible, and i was eager to know if it was possible.... I used a batch file to move files from local to another What do you mean, local drive to another local drive If you can access the files then you can copy/move/delete/save them. Please read this.. move C:\test\*.* c:\test2 so the files (a lot of files) END up to become test2 (one file only); that is what i UNDERSTAND from the text, am i right? I would prefer to use copy and del the original file after succesfully copying, unless you have space constraints on your hard drive I tried it. Quote C:\>move C:\test\*.* C:\test2 There must have only been one file in c:\test |
|
| 5966. |
Solve : "delayed environment variable expansion" & "setlocal"? |
|
Answer» Recently Dark Blade posted a very interesting batch file USING the "set /p num= "......" command How does "delayed environment variable expansion" & "setlocal" tie in with the set/p command.Delayed expansion wouldn't have anything to do with the set /p unless the set /p was used inside of a FOR loop. The SETLOCAL command doesn't have much to do with set /p either except it would clean up / reset the variable(s) after the script has finished executing. I think your main question is how set /p works and what it does? The /P is basically a way for a batch script to Prompt a user for input. Without any parameters the SET command will simply assign a value t a variable. With SET /P the SET command will ask the user to input some text and then assign that entered text as the value for the variable. Example: Set the environment variable NAME: Code: [Select]set Name=llmeyer echo Name is %Name%Here the variable Name is hard coded with llmeyer Or for an interactive script you can do: Code: [Select]set /p Name=Enter your name: echo Name is %Name% In both of these cases, the environment variable "Name" would be set when the script was finished. To see what effect SETLOCAL has on the script, you can use Code: [Select]setlocal set /p Name=Enter your name: echo Name is %Name%When the script was finished the environment variable of "Name" would have the same value as before you ran the script, or if it was null / not set (which it probably would be unless you had something that already set it) then it would be null again at the end of the script. Is that what you were LOOKING for?Thank you both for your help. I am at work right now and can't check out the code from the batch file right now. If I had to guess, I strongly suspect that one of my mistakes was including spaces. I'll try to go back over my test file and sort it out, using the information and suggestions you provided. I'll let you know in the next couple of days how it works out. Thanks again.If you are still having problems, post your code so we can help you see where the problem is.I really do appreciate your help. I haven't had time to even look at the batch file I was working on. It may be a few days, but I have copied the text from the thread and will get back to it. I will try to work it out myself, with the help already provided, but if I get too bogged down, I will be back with the problem code. If I get it sorted out, I'll let you know also. Thanks again!Hey Guys, I finally got back to the set /p = ... problem I was having, and Dias de VERANO, you were right on with the "no spaces between the value name & the equals sign" suggestion. Thanks!!! I wasted quite a bit of time on that one. GuruGary, thanks for clarifying the "delayed environment variable expansion" & "setlocal" usages for me. I am so far behind the times. Back in 1995, I learned the CHOICE - IF ERRORLEVEL method in DOS 6.22 batch file programming. Now, in Windows XP, it seems choice is gone, with the set /p apparently filling the void. From reading a number of other threads, I can see that set/p is very powerful, but I can't understand Microsoft's logic in dropping the choice command? What if I want to write a batch file that is backward compatible, from Vista to Win 98??? Thanks again!Quote from: llmeyer1000 on March 03, 2008, 08:11:48 AM
Me too. Quote ... What if I want to write a batch file that is backward compatible, from Vista to Win 98??? Visit: http://hp.vector.co.jp/authors/VA007219/dkclonesup/choice.html Lots to read there. You can download an executable there that will run under XP. Can't remember if it is choice.exe there, or choice.com. Maybe both are there. No matter... you can grab it, and put it in a dir in your path. |
|
| 5967. |
Solve : What are batch? |
|
Answer» I was readin and brushing up on batch files and i was WONDERING what is the difference between a batch and a program i mean they both do the same and work the same ways basicly.Can any one GIVE me a little insite on thisYes, programming is programming....but there are lots of things which cannot be done in batch scripting such as complex mathematical calculations. |
|
| 5968. |
Solve : Cannot format in MS DOS prompt shows bad command or file name? |
|
Answer» I have been given an old laptop to practice with It has a 4.5GB HD and 64MB memory it had windows 98 and a lot of rubbish on it so I INSTALLED XP SP2 on it however this uses all of the space so I want to try linux & learn a little about this system. |
|
| 5969. |
Solve : 105 homework? |
|
Answer» I am new so I don't know if this is the right place to post this ? but here goes. What is the name of the single directory when a floppy disk or logical drive is first formatted? so why is CMD and Batch considered DOS? By whom? Quote from: WillyW on March 02, 2008, 04:50:35 PM Quote from: gamerx365 on March 02, 2008, 03:53:39 PMhmmm i dunno but thats pretty much all thats discussed here...Quote from: gamerx365 on March 02, 2008, 05:07:47 PMso why is CMD and Batch considered DOS? Quote from: WillyW on March 02, 2008, 04:50:35 PMQuote from: gamerx365 on March 02, 2008, 03:53:39 PMhmmm i dunno but thats pretty much all thats discussed here...so why is CMD and Batch considered DOS? Bingo! You're right there. That is because so many people USED WinXP as compared to MS-DOS. Most of the posters asking questions are using WinXP. Many of them have probably never even used good ol' MS-DOS. What they are doing is calling the command LINE interface within XP, "Dos". The commands are almost the same. It has been repeated so much that it is becoming the norm, even though it is incorrect. Now ALONG comes you, and assume - reasonably so - that what you are seeing is correct. What is happening, is that those that hang out here and try to answer questions have LEARNED..... learned that the poster is probably really not using MS-DOS at all, but is probably using the command line in WinXP.... and, since CH is all about trying to provide some help, they interpret and proceed to try to offer whatever help they can. Answering the poster's question with some help is more important and friendlier than a lecture. Technically, under WinXP I suppose it should be referred to as "the command line interface". But we could hope for that until we are blue in the face, and I'll be that it will still be called "Dos". Here ya go - want to see what appeared on the screen when you typed help at the prompt under DOS 6.22? http://www.vfrazee.com/ms-dos/6.22/help/index.htm and those are click-able links. Enjoy! hmm I see what you mean. So basically since not so many people have been using DOS, they just call CMD DOS because they are similar. hmm. Alot of those commands look like CMD but I also see a bunch in there that i dont know. but surely this is way more off topic than other posts in this board right? I mean a floppy disk isn't very closely related to DOS or CMD.Quote from: gamerx365 on March 02, 2008, 05:35:21 PM hmm I see what you mean. So basically since not so many people have been using DOS, they just call CMD DOS because they are similar. I think so. Quote hmm. Alot of those commands look like CMD but I also see a bunch in there that i dont know. but surely this is way more off topic than other posts in this board right? I mean a floppy disk isn't very closely related to DOS or CMD. ? ? Are you referring to the original poster's first question? If so, re-read it. He didn't ask about a floppy disk. And he wasn't sure where to ask it. This is not an unreasonable place to ask it. Since the question had a simple answer, in the spirit of providing help, it looks to me like patio simply provided the answer. At that point, it was done. Meanwhile he's been abducted...Quote from: WillyW on March 02, 2008, 05:43:18 PM Quoteyeah well the root of a formatted floppy, basically it was a question about a floppy disk. anyway I was just SAYING that it doesnt belong here. yeah i can imagine not knowing where to post so Ill let it slide this time lol.hmm. Alot of those commands look like CMD but I also see a bunch in there that i dont know. but surely this is way more off topic than other posts in this board right? I mean a floppy disk isn't very closely related to DOS or CMD. |
|
| 5970. |
Solve : Batch file command help? |
|
Answer» So what I'm wondering if there is any BATCH commands I can use to CHECK if another batch file is currently RUNNING and if said batch file is actually running, close/exit it. |
|
| 5971. |
Solve : At command? |
|
Answer» HEY, I was wondering, how can i SET an AT command to where it starts SOMETHING when I log into my name on the COMPUTER, not someone elses. I know hot to set it at specific times but it does it on which ever name is logged on. Thanks for the help!You can start a batch or other process automatic at logon, by navigating to and replacing youruserprofile as shown with your actual PROFILE name in the C:\documents and settings\youruserprofile\start menu\programs\startup\ and place your executable or shutcut there to run upon logon for just that user. If you place this in the ALL USERS profile, it will execute for all users who logon to that system. Has to be a Windows OS system for the above to work, if logging in under a different os reply back with OS. I am assuming you are running Windows.Ok thanks! |
|
| 5972. |
Solve : cmdstuff? |
|
Answer» Command | USE |
|
| 5973. |
Solve : Using Ms-dos to create? |
|
Answer» I am wondering if it is possible to MAKE a batch file that will create another batch file and at the same TIME write the contents of that batch file? I am semi new to ms-dos so I hope you understand.Do you mean create it on disk and also write it on SCREEN? |
|
| 5974. |
Solve : win 98 install? |
|
Answer» i get an error message when trying to install 98 after typeing steup windows SETUP requires'largest executable program size' to be at LEST 442368 BYTES to run what now ? |
|
| 5975. |
Solve : REALLY NEED HELP? |
|
Answer» When I type in the word "BATCH" (without quotes) in the command prompt it says "idk lol" and when I make a batch file that says: |
|
| 5976. |
Solve : how can install win98 se? |
|
Answer» hi, i have a computer 80 gb present i USE windows xp.i want use windows98 se.i have GENUINE software c.d. of win98se. how can i load/install win98se ?please give me step by step information when power on to compleate installation.Why do you want to do this ? You will need to format your disk as it is ALMOST certainly NTFS and you will need FAT This will remove XP from your computer. Boot the pc with the Win98 CD in the drive and follow instructions GrahamYou can use free Microsoft Virtual PC 2007: HTTP://www.microsoft.com/windows/products/winfamily/virtualpc/overview.mspx, and install Windows 98 on virtual partition. Works well. |
|
| 5977. |
Solve : Show and Edit User Accounts? |
|
Answer» any one know if i can make it show a list of the user account and there passwords on MS DOS?This sounds slightly devious...Nope, you can't do that with DOS.This isny devious. My son made a acc on the comp and demoted me so im not a admin and he "forgot" the pass and i have done everything to get the pass from him.Quote Nope, you can't do that with DOS.if you go to command prompt and type 'net user' then you can view all accounts on that computer.maybe u could edit the password? using ms-dos i think it allows u to do that because i just done it by accidentlol, what code did you use?You can change the password for a user. Note: You MUST be on an Administrator account. Type this into the command prompt, net user username * Of course you change where it says username to the user you want to change the password of. Then you will be asked "type a password for the user:" so type a password in and hit enter. Then you will be asked again to confirm the password, so confirm it, press enter and the password will be changed. You should see "the command completed successfully". Note: when you type in the password you are chaging it to, you do not see what you are typing, not even asterisks (*****) are SHOWN as you type - Hope this helps net user administrator 'password' but you have to have administration rights but if u want to view a password you probobly have to go in on hacking using some brute force attack program and it will take about 15 days to figure out the password depending on ure cpu and how manny letters the password may be so have fun do what ever. and there is a program THATS called rainbow crack if some one know how that works pm me please =) 8-) have fun every one!Quote This isny devious. My son made a acc on the comp and demoted me so im not a admin and he "forgot" the pass and i have done everything to get the pass from him. Take the computer to a shop and have the operating system reinstalled. Everything will be lost, but so what. Now assign yourself as the sole admin and remember your password. If you were the admin, you could, of course, re-assign passwords or delete accounts or do anything you want except one: to find out someone's password. I don't think this is even possible. Passwords are stored as a hash of some kind. With a whole lot of hacking (if you know the hash value, which you can theoretically find if you are admin), you can write a program to continually test sequences. You may find the following are valid passwords: v3KKmer9, bcc/[emailprotected], 0e3lss, ..... They can all be used, as they generate the same hash. If you run long enough and produce a list a peruse it as a human, you may recognize something like "MomIsABitch". If so, remember, if you snoop you must prepare yourself for the worst. A peeping tom sees people do stuff that is not disgusting because it was not meant to be seen. Mac Using the "net" command won't work since you need to be logged on to an account with administrative privileges, and that's EXACTLY what Schlynn is trying to do. No way is taking the computer to a shop necessary and you certainly don't need to reformat and reinstall Windows. What needs to be done is you need to start Windows in Safe Mode. To do that, you need to quickly press the F8 key after your BIOS screen goes away and right before the Windows boot screen appears. If you do it correctly, you should see a menu of boot options. You want to select plain 'ol Safe Mode and hit ENTER. A bunch of text will fly through the screen, don't worry these are just low-level drivers and services needed to run Windows. When the Welcome Screen appears, select the account ADMINISTRATOR and log in. Ignore any warnings about Safe Mode and messages about wanting to start System Restore. Now you should be able to go to the Control Panel and reset the usernames and passwords. If the Administrator account has been passworded, go here and follow their instructions.Quote This isny devious. My son made a acc on the comp and demoted me so im not a admin and he "forgot" the pass and i have done everything to get the pass from him. there are plenty of boot disks out there that will grant you admin rights on windows boxes ... hit google up for them. |
|
| 5978. |
Solve : Xcopy vs Copy with UNC paths? |
|
Answer» USERS have shortcut on their desktop that points to a simple bat file (see below) The batch file creates a new folder on USER's hard drive, if needed, then COPIES an Access front-end file (.MDB) from a network folder down to the hard drive. I was using xcopy so that it only COPIED the file, IF I had made a change. I recently had to change to using UNC paths and now that XCopy doesn't seem to work. I can only get it to work for the users with a straight copy. XCopy works fine on my PC. Just before the copy is executed there is a message that "UNC Paths are not supported" Am I doing something wrong? Is there a delay with the xcopy on the network that I need to "pause" or something? Any help is appreciated. TJ --------- @Echo Off Rem Check for local copy of XYZ.mdb - if not found, create directory and copy file. if not exist "C:\TEST1\XYZ.mdb" mkdir "C:\TEST1" if not exist "C:\TEST1\XYZ.mdb" copy "\\PBNTFS99\SHR_access\CLO\XYZ.mdb" "C:\TEST1\XYZ.mdb" /y Rem xcopy the latest version from server to hard drive xcopy "\\PBNTFS99\SHR_access\CLO\XYZ.mdb" "C:\TEST1\XYZ.mdb" /y /d start /max /HIGH C:\TEST1\XYZ.mdb ------- I had to change the xcopy line to the following to get it to work: copy "\\PBNTFS99\SHR_access\CLO\XYZ.mdb" "C:\TEST1\XYZ.mdb" /y Try mapping the network drive first before your copy .. then deleting the drive after the copy IE: @Echo Off Net Use :V \\PBNTFS99\SHR_access\CLO Rem Check for local copy of XYZ.mdb - if not found, create directory and copy file. if not exist "C:\TEST1\XYZ.mdb" mkdir "C:\TEST1" if not exist "C:\TEST1\XYZ.mdb" copy "V:\\PBNTFS99\SHR_access\CLO\XYZ.mdb" "C:\TEST1\XYZ.mdb" /y Rem xcopy the latest version from server to hard drive xcopy "V:\\PBNTFS99\SHR_access\CLO\XYZ.mdb" "C:\TEST1\XYZ.mdb" /y /d start /max /HIGH C:\TEST1\XYZ.mdb Net Use :V /delete ------- I had to change the xcopy line to the following to get it to work: copy "\\PBNTFS99\SHR_access\CLO\XYZ.mdb" "C:\TEST1\XYZ.mdb" /y |
|
| 5979. |
Solve : random rename help? |
|
Answer» Ok, so I was trying to make a BATCH file to rename all pictures in a folder to a random number between 1 and 29, the only problem is, it'll only rename one picture and it says "A duplicate file name exists, or the file cannot be found. So I tried to do a loop code but it did the same thing, except it repeated that message over and over and over. Here is the code. Ok, so I was trying to make a batch file to rename all pictures in a folder to a random number ... Is RENAMING the goal here, or is randomness via a batch file more important? For what it is worth: Irfanview has a batch rename function. It is a very nice program for handling pictures, etc. Irfanview is free. http://www.irfanview.com Thanks Sidewinder, your solution did the trick to all but one picture, but then all I had to do was change one picture's name to the number that wasn't on there lol.learning.... |
|
| 5980. |
Solve : DOS Batch? |
|
Answer» Sorry if I seem annoying or anything... but I'm sure that Try not using quotes on the passed parameter, you're using short names anyway so they're not required. All I am doing is dragging the file I want deleted to the shortcut to the batch file, the quotes on the passed parameters is what DOS spits out as an echo to the commands in the batch file. THUS: cmd = Set newname=%RANDOM%.%RANDOM% echo = D:\Documents and Settings\user>Set newname=725.23907 cmd = ren %1 %newname% echo = C:\Documents and Settings\user>ren "C:\Documents and Settings\user\desktop\test.txt" 725.23907 cmd = DEL %~d1%~p1%newname% echo = C:\Documents and Settings\user>DEL C:\Documents and Settings\user\desktop\725.23907 The system cannot find the file specified. What's interesting is that when the REN cmd is issued the echo uses qoutes on the parameters while when the DEL cmd is issued it does not. Bones92, Quote I ran it from cmd.exe, if that makes a difference...Not sure what you mean here, does cmd.exe need to be called from within a batch file? Or ae you saying you types cmd,exe in the run field to open a DOS window? I BELIEVE the dos batch file does use cmd.exe for exicution.Well at least we're on the same page: Code: [Select]Set newname=%RANDOM%.%RANDOM% ren %1 %newname% DEL %~d1%~p1%newname% pause exit Quote All I am doing is dragging the file I want deleted to the shortcut to the batch file That information would have been helpful from the beginning especially Quote i used shout names to shorten what I had to type.Please read this. A quick FIX would be to insert the quotes regardless of short or long file names: Code: [Select]Set newname=%RANDOM%.%RANDOM% ren %1 %newname% DEL "%~d1%~p1%newname%" pause exit When Windows 3000 arrives it will probably still support batch code. OH Sweet Jesus! That's it! Can all the DOS echo responses be piped to a single txt file? For future debugging this would be helpful . Beautiful job, wish I could have saved us some time, but I am sorta new with this stuff. Thanks for your efforts Quote When Windows 3000 arrives it will probably still support batch code. Don't plan on sticking around to find out! Yeah it seems the only way it will keep a log of its self is if u put an output code (echo %whatever% >> log.txt) and if u click on batch file rather than just drag and drop, but then it only keeps a log of the click, nothing is deleted. Oh and I was wondering how to change it to where it uses the files actual name as a variable apposed to renaming it to random numbers?DragonMaster, Quote I was wondering how to change it to where it uses the files actual name as a variable apposed to renaming it to random numbers? I'm a bit perplexed as to why you would want to do that??? I think this might work though: Code: [Select]Set newname=%1 DEL %newname% exitYeah that worked lol, thanks Ionic! |
|
| 5981. |
Solve : CHDIR IN XP USING UNC? |
|
Answer» I am trying to use UNC to do a chdir. When using xp, I get message saying "CMD does not support UNC paths as current directory" |
|
| 5982. |
Solve : Running MS Dos full screen? |
|
Answer» This is probably a simple question for some of you EXPERTS out there.
By "MS Dos program" are you referring to your game? or to the command prompt itself? If you open a command prompt by itself - no game running - just the C:\> prompt , then hold down Alt and hit Enter , what happens? Does the 'dos window' become full screen? (If it does, and you want to get it back to a window, just repeat the Alt-Enter ) When I run the exe file for game I get an error, "This system does not support FULLSCREEN mode. Choose "Close" to terminate the application." Then you can close or ignore the error. If I ignore the error it just asks the same question over and over. I've also tried to adjust the settings in the properties file but it has no effect. I'm THINK that the new MS DOS just won't open full screen like the old one would.Quote
So did you try just OPENING a command prompt window? What happened when you tried Alt-Enter? Quote When I run the exe file for game I get an errorWere you executing the .exe through command.com or Windows explorer? If you want to try something different you might give [highlight]DOSBox[/highlight] a try, but I don't know if it will work on Vista. Download: http://dosbox.sourceforge.net/news.php?show_news=1Thanks guys! Doxbox works perfect. |
|
| 5983. |
Solve : how do i turn off log in as i cant get into pc now.........details below? |
|
Answer» ive just tired setting up my FRIENDS pc with admin log in details when i TURNED off the pc to reboot and show her how to use this it said the old owner (even thought id changed this in control panel) and then to enter password the old owner didnt have password protection on pc and when i tried to change to her name the keyboard just beeps and doesnt delete his name or even let me put password in just beeps ive got it to come up were it says |
|
| 5984. |
Solve : Running batch file commands one at a time? |
|
Answer» windows xp 2002: When I run the batch file below, the programs X.exe, Y.exe, and Z.exe are all started in separate windows. I don't use XP, so I can't say for sure if that is normal or not. But I don't think it is. At least not without the use of the start command, and your text of your batch file says that you are not using it. I don't KNOW why you are getting separate windows. Based on your batch file, I would say that you would not. Quote What I want is (1) run X.exe and wait until it's done (2) delete junk files from X.exe (3) run Y.exe and wait until it's done (4) delete junk files from Y.exe....so on. Which is exactly what your batch file looks like. That is, it runs line-by-line, in order. |
|
| 5985. |
Solve : Attrib - hide files? |
|
Answer» Hey, I have an autorun and icon for my USB memory stick and i WANT to hide those files. I changed them to hidden but because i want to show hidden files for my computer, i can STILL see those files. |
|
| 5986. |
Solve : help with IF statement? |
|
Answer» Hi guys, The GTR, LSS EQU etc tests are arithmetic tests, and give unexpected results when used to compare strings, for example "2" GTR "101" will return true because ASCII string comparisons stop if the first character of either string is greater than the other, and 2 has a higher ASCII code than 1. I understand what you mean about those co-op's being numerical so having strange results with stings. How would I convert the %newdateP% (which is in 11/02/2008 12:16 format) to 11022008 then??? cheers for the help.Assuming your regional settings are UK format (from your example I think that is safe), use this : Set Today=%Date:~6,4%%Date:~3,2%%Date:~0,2% Change Date to newdateP in each of the 3 occurrences above for your code. Grahamsorry. I'm not sure i get it. that line you've posted will make a variable 'today' with todays date in the right format. yes??SORRY, I wasnt as clear as I could have been - I just pasted an example from a bit of code Im working on. Change your line Code: [Select]if /i "%newdateP%" GTR "%oldprice%" (goto update) to Code: [Select]if /i "%newdateP:~6,4%%newdateP:~3,2%%newdateP:~0,2%" GTR "%oldprice:~6,4%%oldprice:~3,2%%oldprice:~0,2%" (goto update) note - its is just 1 line above, ignore the wrapping on the screen Graham gpl has noted correctly that for a numerical date comparison to work, the date number has to be in the format YYYYmmDD with the year first thus Quote OK. I've cheated..... I have some UNIX tools installed on this machine so I've used 'sed' and 'cut' to take the date from the format the it is currently in and rearrange to the YYYYmmdd format. Although my if statement still seems to to 'update' even if both variables that it's compairing are the same. (and no I'm not using GEQ or LEQ co-op's) I'll post some code. (it bit look abit complex............) hey, I managed to get it working!! Turns out it was a SIMPLE mistake. nevermind, it's all working now. cheers for your input guys. |
|
| 5987. |
Solve : Writing Backup Batch File? |
|
Answer» I need some help in writing a batch file to back up like *.jpg *.wmv *.jif from the C: DRIVE to a flash drive with either current day or USER imput date for any files newer than that date. I am using XP. |
|
| 5988. |
Solve : restore files deleted in dos? |
|
Answer» Does anyone know if it is possible to restore files that I deleted with the "delete" or "erase" command? in Dos? I am using Dos 6.2 within a Windows XP computer. |
|
| 5989. |
Solve : Just wandering if...? |
|
Answer» ... You can add a music FILE to a batch file so it isn't 2 separate files. If you can't do it then how do i do it? |
|
| 5990. |
Solve : Welcome banner? |
|
Answer» Let's say I have a .TXT file, with 20 welcome messages, and when I start my computer, i want that a .BAT file , can take a message from that TXT file (let's say i want that .BAT file take that message from the .TXT after 1 minut) , and put it in a CMD, give an "Enter" , and after that the CMD will close it himself . i also have a problem like this: *censored* Hijacker....... |
|
| 5991. |
Solve : Stuck!? |
|
Answer» Ok, I was wondering how to get the reply from this PING to be output to a text file: Ok, I was wondering how to get the reply from this ping to be output to a text file Try using redirection: Code: [Select]ping -n 1 xxx.xxx.xxx.xxx > ping.txt Code: [Select]ping -n 1 xxx.xxx.x.x | find /i "reply from" > ping.txt Redirection can be a double edged sword. Some programs query the user for additonal information. The query can get buried in the redirected output. yup that got it! thanks! |
|
| 5992. |
Solve : FIND? |
|
Answer» how can i find in |
|
| 5993. |
Solve : Help about extract on DOS ...? |
|
Answer» hi |
|
| 5994. |
Solve : format cmd seems stuck? |
|
Answer» I use a laptop running XPSP3, but this concerns an external hard drive about which I know nothing other than it is 120Gb. |
|
| 5995. |
Solve : T2000SX? |
|
Answer» I have a really old laptop which I want to fix. I got it going, which was cool. I rebooted it to test it, but to my dismay I got an error message I have never got before: "PLACE system disk in drive." "Place system disk in drive."The BIOS is unable to find any operating system to load. One will need to be installed. Quote from: Bones92 on January 28, 2008, 10:28:48 PM I downloaded a few boot disks, but they didn't work.Why? What happens you use a boot disk?Bones Just checking ... when you downloaded the boot disks, did you just copy them on to a floppy ?? What you need to do is to save them to your hard disk, then execute them; this will then write the disk image on to the floppy, which should then be bootable GrahamQuote from: Bones92 I have a really old laptop which I want to fix. I got it going, which was cool. I rebooted it to test it, but to my dismay I got an error message I have never got before: "Place system disk in drive." Please post your hardware setup and check if your floppy disk drive will accept 1.44 disks, some fitted in older model laptops will only run from 720's Checked all these THINGS, and yes I used a disk image program to make the floppy disk images to become boot disks. Yes, its a 1.44 floppy disk drive. And it just ignored the boot disks, which is another first for me. If I put them in when it wanted a system disk it ignored them, and if I put them in before booting it up, I still got the same error message. Thanks for the responces, any other ideas?You could (and I dont know how on your machine) go into the cmos setup - it USUALLY tells you as it does the power-on routines how to access it. There you may well find an option that lets you change the order of disk drives that it checks for the boot process - make sure it goes to the floppy first GrahamAh, thats the problem. The only (and I mean only) way to get into BIOS and CMOS on a t2000sx is to create a cmos checksum error. Which is a major problem in my opinion. And a stupid DESIGN of computer.I assume you have searched -- I found one page where someone said he had managed to force a cmos error (but alas didnt go into any detail) Another site - http://209.167.114.38/support/techsupport/tsbs/all/-TSB000733.htm Suggests holding ESC when rebooting Good luck with it, it sounds like a beast of a machine! GrahamOk, i'll try it. I'll get back to you on that one. |
|
| 5996. |
Solve : Is it possible to change file metadata using MS-DOS? |
|
Answer» I have a requirement to change the "Title" field of a few thousand JPG files. Each file will have a different title. When I try to access the spreadsheet after a failure I'm told ADMIN has a lock on it and I can only go in on a read-only basis. Normally when I post a script, I leave out the error trapping so as to reduce the code clutter. Unfortunately this can backfire if the script aborts, leaving objects hanging around in the system. This is not always fatal, but when the object is an automation server like Excel, it can create conflicts. The usual solution is to use the task manger to clean out the running instances of the objects. Of course if I hadn't gotten ahead of myself the script would have worked the first time out. This corrected script version should fix you right up: Code: [Select]Set dso = CreateObject("DSOFile.oleDocumentProperties") Set xlApp = CreateObject("Excel.Application") Set xlBook = xlApp.Workbooks.Open("c:\scripts\book1.xls") 'path to spreadsheet Set xlSheet = xlBook.Worksheets("Sheet1") Set objRange = xlsheet.UsedRange rowCount = objRange.Rows.Count For k = 1 To rowCount strFile = xlApp.Cells(k,1) dso.Open(strFile) dso.SummaryProperties.Title = xlApp.Cells(k,2) dso.Save dso.Close() Next xlApp.Quit Set xlSheet = Nothing Set xlBook = Nothing Set xlApp = Nothing Good luck. That works a treat! Thanks a lot Sidewinder, you've saved me a whole world of pain. Ian. |
|
| 5997. |
Solve : uploading...?? |
|
Answer» I know this might just sound very weird to do, and i seriously dont know if this is possible but could i make my batch file upload a .txt or two to a hosting website? preferably freewebs.com but also I have my lightstormlabs.com and i could use that also. What I am trying to do is make kind of a chat type of thing. It goes along with a game im working on and there would be a separate batch file for the chat, allowing you to type something and press enter, it will be sent to all the other players with their console open and also on your own. But in the game window, using the same technique, you could see who is on. so what you want to do is send file a. to the ftp server, and have file a or file b downloaded locally? @ftp -i -s:"%~f0"&GOTO:EOFmore info here: http://www.dostips.com/DtTipsFtpBatchScript.php#Batch_FtpBatch DOS IT HELP? |
|
| 5998. |
Solve : Making a DOS Rescue disk...? |
|
Answer» Hey all. |
|
| 5999. |
Solve : creating new files?? |
|
Answer» why does it matter?QUOTE why does it matter? Are you on a dial-up connection?no...why?Quote no...why? Many are. It would be MUCH more courteous to them if they did not have to wait while a huge picture file is loaded. People come here for advice, help, tips, - to learn something. What does that picture file - not just once, but on every post - OFFER to them? Quote Quoteno...why? i suppose they could read the WORDS and not look at the picture?Quote
Read what I wrote again. Quote QuoteThe page won't LOAD anyone elses posts until the post it's downloading finishes. People on Dial-up would have to wait for your picture to load.Quoteno...why? |
|
| 6000. |
Solve : Help with xcopy please? |
|
Answer» I am trying to BACKUP a directory on my C:\ drive to a REMOVEABLE external drive F:\ |
|