Search Results

Search found 3546 results on 142 pages for 'dos batch'.

Page 25/142 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • How do I wait for a service/process to start before continuing a batch script?

    - by Shane McD
    I am writing a windows batch script to uninstall some software. However I need to wait after the uninstaller has finished for a service to be restarted before continuing with the next uninstall. I can make the script wait for the uninstaller to finsh using:- for /f "usebackq" %%M in ('tasklist /nh /fi "imagename eq %process_1%"') do if not %%M==%ignore_result% goto 1 But I cannot for the life of me figure out how to get the script to then wait for a service to start before continuing the script and running more uninstalls. I am open to any suggestions.

    Read the article

  • how to remove a few lines from a Unicode registry file using batch commands in Windows?

    - by Cosmin
    Hi. I have a program who's generating some data in registry. I save it with "reg export HKCU\Software\ProgramName\Data data.reg" (Unicode format). I need to take it to other computer and import it there so the program from that computer could use the data. But I have to remove some text lines from data.reg. The text lines are easy to find because they contain some strings. Now I'm doing this manually (using Wordpad) every few days but maybe there is another way... Oh and I can't install other programs on these computers (the access is restricted) so I have to use batch/cmd files. What I tried so far: - redirecting the export to "con" but is visual only not in a variable; - using "for /F ..." but this works only with ANSI and removes blank lines. Can somebody please help me...? Thank you.

    Read the article

  • How to detect invalid user input in a Batch File?

    - by user2975367
    I want to use a batch file to ask for a password to continue, i have very simple code that works. @echo off :Begin cls echo. echo Enter Password set /p pass= if %pass%==Password goto Start :Start cls echo What would you like me to do? (Date/Chrome/Lock/Shutdown/Close) set /p task= if %task%==Date goto Task=Date if %task%==Chrome goto Task=Chrome if %task%==Lock goto Task=Lock if %task%==Shutdown goto Task=Shutdown if %task%==Close goto Task=Close I need to detect when the user entered an invalid password, i have spent an hour researching but i found nothing. I'm not advanced in any way so try and keep it very simple like the code above. Please help me.

    Read the article

  • inconsistent ERRORLEVEL in a batch file

    - by Doron
    In a batch file, I have an inconsistent errorlevel behavior: The IP address 10.1.1.2 always replies. The following code always gives errorlevel 0 in one location (somewhere in the middle - exactly where i need it) inside the batch file. I copied only this snippet and placed it in the beginning and at the end of the batch file. In those locations, the result is always 1. Here is the code snippet: ping 10.1.1.2|Findstr /I /C:"timed out" /C:"host unreachable" echo %errorlevel% Any idea how to make it work also in the middle of the file? What am I doing wrong? I would hate to solve it with GOTOs(to the end of the file and back to where I need the result.)

    Read the article

  • Torque jobs does not enter "E" state (unless "qrun")

    - by Vi.
    Jobs I add to the queue stays there in "Queued" state without attempts to be executed (unless I manually qrun them) /var/spool/torque/server_logs say just 04/11/2011 12:43:27;0100;PBS_Server;Job;16.localhost;enqueuing into batch, state 1 hop 1 04/11/2011 12:43:27;0008;PBS_Server;Job;16.localhost;Job Queued at request of test@localhost, owner = test@localhost, job name = Qqq, queue = batch The job requires just 1 CPU on 1 node. # qmgr -c "list queue batch" Queue batch queue_type = Execution total_jobs = 0 state_count = Transit:0 Queued:0 Held:0 Waiting:0 Running:0 Exiting:0 max_running = 3 acl_host_enable = True acl_hosts = localhost resources_min.ncpus = 1 resources_min.nodect = 1 resources_default.ncpus = 1 resources_default.nodes = 1 resources_default.walltime = 00:00:10 mtime = Mon Apr 11 12:07:10 2011 resources_assigned.ncpus = 0 resources_assigned.nodect = 0 kill_delay = 3 enabled = True started = True I can't set resources_assigned to nonzero because of Cannot set attribute, read only or insufficient permission resources_assigned.ncpus. When I qrun some task, this goes to mom's log: 04/11/2011 21:27:48;0001; pbs_mom;Svr;pbs_mom;LOG_DEBUG::mom_checkpoint_job_has_checkpoint, FALSE 04/11/2011 21:27:48;0001; pbs_mom;Job;TMomFinalizeJob3;job 18.localhost started, pid = 28592 04/11/2011 21:27:48;0080; pbs_mom;Job;18.localhost;scan_for_terminated: job 18.localhost task 1 terminated, sid=28592 04/11/2011 21:27:48;0008; pbs_mom;Job;18.localhost;job was terminated 04/11/2011 21:27:48;0080; pbs_mom;Svr;preobit_reply;top of preobit_reply 04/11/2011 21:27:48;0080; pbs_mom;Svr;preobit_reply;DIS_reply_read/decode_DIS_replySvr worked, top of while loop 04/11/2011 21:27:48;0080; pbs_mom;Svr;preobit_reply;in while loop, no error from job stat 04/11/2011 21:27:48;0080; pbs_mom;Job;18.localhost;obit sent to server Scheduler log (/var/spool/torque/sched_logs/20110705): 07/05/2011 21:44:53;0002; pbs_sched;Svr;Log;Log opened 07/05/2011 21:44:53;0002; pbs_sched;Svr;TokenAct;Account file /var/spool/torque/sched_priv/accounting/20110705 opened 07/05/2011 21:44:53;0002; pbs_sched;Svr;main;/usr/sbin/pbs_sched startup pid 16234 qstat -f: Job Id: 26.localhost Job_Name = qwe Job_Owner = test@localhost job_state = Q queue = batch server = localhost Checkpoint = u ctime = Tue Jul 5 21:43:31 2011 Error_Path = localhost:/home/test/jscfi/default/0.738784810485275/qwe.e26 Hold_Types = n Join_Path = n Keep_Files = n Mail_Points = a mtime = Tue Jul 5 21:43:31 2011 Output_Path = localhost:/home/test/jscfi/default/0.738784810485275/qwe.o26 Priority = 0 qtime = Tue Jul 5 21:43:31 2011 Rerunable = True Resource_List.ncpus = 1 Resource_List.neednodes = 1:ppn=1 Resource_List.nodect = 1 Resource_List.nodes = 1:ppn=1 Resource_List.walltime = 00:01:00 substate = 10 Variable_List = PBS_O_HOME=/home/test,PBS_O_LANG=en_US.UTF-8, PBS_O_LOGNAME=test, PBS_O_PATH=/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games, PBS_O_MAIL=/var/mail/test,PBS_O_SHELL=/bin/sh,PBS_SERVER=127.0.0.1, PBS_O_WORKDIR=/home/test/jscfi/default/0.738784810485275, PBS_O_QUEUE=batch,PBS_O_HOST=localhost euser = test egroup = test queue_rank = 1 queue_type = E etime = Tue Jul 5 21:43:31 2011 submit_args = run.pbs Walltime.Remaining = 6 fault_tolerant = False How to make it execute jobs automatically, without manual qrun?

    Read the article

  • How to Automate .inf PnP Windows 7 Drivers with Wildcard?

    - by Dos_Probie
    I am trying to automate the PnP driver installs for Windows 7 with either of the below batch files via For loop and wildcard for the .inf file. The rundll32 batch reads and echos the correct .inf file but then gives me the "Error Installation failed" and with the pnputil batch it runs without any error put does not install. How can I correct the batch files to install the inf correctly? @echo off&color a&setlocal enabledelayedexpansion cd %~dp0 set PnP=rundll32 syssetup,SetupInfObjectInstallAction DefaultInstall 128 .\*.inf for /f "delims=" %%a in ('dir/b %PnP%') do ( echo == Installing PnP Drivers == "%%a" ::or set PnP=pnputil -i -a "*.inf" for /f "delims=" %%a in ('dir/b %PnP%') do ( echo == Installing PnP Drivers == "%%a" ping -n 3 localhost 1>nul start "" /wait %PnP%\%%a ) cls echo. * DONE * pause exit

    Read the article

  • How can I open a console application with a given window size?

    - by Oliver Salzburg
    The application I want to start is MongoDB. If I would start it normally, it looks like this: I don't like the amount of line breaks and I have a lot of screen space, so I would like to utilize said space to get rid of the line breaks. I can change the size of the console window with MODE, so I wrote a batch file like this: @ECHO OFF MODE con:cols=140 lines=70 %~dp0mongodb\bin\mongod --dbpath %~dp0data --rest So far, so good. When I start this batch file, I get a larger window, as desired. But when I now press Ctrl+C to exit MongoDB, I get the annoying prompt: Terminate batch job (Y/N)? Which is useless, because the command I just exited out of was the last command in the batch job anyway and no matter what I answer, the result is the same. So, how can I get a larger console window for the application without having that prompt when I hit Ctrl+C?

    Read the article

  • PING through batch file (looping problem)

    - by pradeetp
    I created a .BAT file in Windows 7 that has the following lines: PING XXX.XXX.XXX.XXX -t (XXX replaces the actual IP number). However, when I double click on this batch file, I can see the PING command repeatedly being executed in a loop. I even tried to rename the .BAT to .CMD but the result is the same. I want to avoid writing PING command through the Command Prompt, which is why I created the batch file. I don't know why the PING command is being continuously called when the same statement is put in a batch file.

    Read the article

  • How to remove the first and last character from a file using batch script?

    - by infant programmer
    This is my input file content which I am using to copy to the output file. #sdfs|dfasf|sdfs| sdfs|df!@$%%*&!sdffs| sasdfasfa|dfsdf|#sdfs| What I need to do is to omit the first character '#' and last character '|' in the output file. So the output will be, sdfs|dfasf|sdfs| sdfs|df!@$%%*&!sdffs| sasdfasfa|dfsdf|#sdfs Batch script is new to me, but I tried my best and tried these codes, :: drop first and last char @echo off > xyz.txt & setLocal EnableDelayedExpansion for /f "tokens=* delims=" %%a in (E:\abc1.txt) do ( set str=%%a set str=!str:~1! echo !str!>> xyz.txt ) and @echo off > xyz.txt setLocal EnableDelayedExpansion for /f "tokens=1,2 delims= " %%a in (E:\abc1.txt) do ( set /a N+=1 if !N! gtr 2 ( echo %%a >> xyz.txt ) else ( set str=%%a set str=!str:#=! echo !str! >> xyz.txt ) ) As you can see they are not able to produce the required output.

    Read the article

  • MBR Booting from DOS

    - by eflukx
    For a project I would like to invoke the MBR on the first harddisk directly from DOS. I've written a small assembler program that loads the MBR in memory at 0:7c00h an does a far jump to it. I've put my util on a bootable floppy. The disk (HD0, 0x80) i'm trying to boot has a TrueCrypt boot loader on it. It shows up the TrueCrypt screen, but after typing in the password it crashes the system. When I run my little utlility (w00t.com) on a normal WinXP machine it seams to crash immedealty. Apparently I'm forgetting some crucial stuff the BIOS normally does, my guess is it's something trivial. Can someone with better bare-metal DOS and BIOS experience help me out? Heres my code: .MODEL tiny .386 _TEXT SEGMENT USE16 INCLUDE BootDefs.i ORG 100h start: ; http://vxheavens.com/lib/vbw05.html ; Before DOS has booted the BIOS stores the amount of usable lower memory ; in a word located at 0:413h in memory. We going to erase this value because ; we have booted dos before loading the bootsector, and dos is fat (and ugly). ; fake free memory ;push ds ;push 0 ;pop ds ;mov ax, TC_BOOT_LOADER_SEGMENT / 1024 * 16 + TC_BOOT_MEMORY_REQUIRED ;mov word ptr ds:[413h], ax ;ax = memory in K ;pop ds ;lea si, memory_patched_msg ;call print ;mov ax, cs mov ax, 0 mov es, ax ; read first sector to es:7c00h (== cs:7c00) mov dl, 80h mov cl, 1 mov al, 1 mov bx, 7c00h ;load sector to es:bx call read_sectors lea si, mbr_loaded_msg call print lea si, jmp_to_mbr_msg call print ;Set BIOS default values in environment cli mov dl, 80h ;(drive C) xor ax, ax mov ds, ax mov es, ax mov ss, ax mov sp, 0ffffh sti push es push 7c00h retf ;Jump to MBR code at 0:7c00h ; Print string print: xor bx, bx mov ah, 0eh cld @@: lodsb test al, al jz print_end int 10h jmp @B print_end: ret ; Read sectors of the first cylinder read_sectors: mov ch, 0 ; Cylinder mov dh, 0 ; Head ; DL = drive number passed from BIOS mov ah, 2 int 13h jnc read_ok lea si, disk_error_msg call print read_ok: ret memory_patched_msg db 'Memory patched', 13, 10, 7, 0 mbr_loaded_msg db 'MBR loaded', 13, 10, 7, 0 jmp_to_mbr_msg db 'Jumping to MBR code', 13, 10, 7, 0 disk_error_msg db 'Disk error', 13, 10, 7, 0 _TEXT ENDS END start

    Read the article

  • Give write access to USB and Serial devices automatically

    - by Saeid87
    I am working with some USB and Serial micro-controllers. Everytime I plug a device I have to do the following command to give it write access, and also my password: sudo chmod 666 /dev/ttyUSB0 Can I set my Ubuntu to automatically give write access to pluged in devices? If not, how can I make a batch file that I can easily give the access to port I want for example if I run the following command it does the job: giveaccess -usb0

    Read the article

  • How to run a script on startup in XP?

    - by Daniel Williams
    Just want to run a DOS script to set some parameters. Where do I put the batch file? Clarification: I want to run some DOS commands when I start a DOC prompt, mainly to set some aliases. This is really what I am looking for, not really when logging in or starting the system. I apologize for not being more clear. For example I want to run: doskey ls=dir Just so I can type ls rather than dir.

    Read the article

  • How can I run a (16-bit) .COM executable that has been renamed to .COS?

    - by max16bit
    I'm trying to run a couple of 16-bit legacy DOS programs from a standard windows XP dos prompt. The problem is that the file extensions have been renamed from .COM to .COS and they are stored on read-only media and I can't copy them (special environment). Any tips on how to invoke such files despite the weird extension? If they had been 32-bit EXEs, it wouldn't have been an issue running them even without their proper extensions, but with these COM files, I'm unable to find a way to run them.

    Read the article

  • icacls batch file multiple directories with wildcards help needed

    - by user153521
    I have written the following batch file that does a great job combing through all folders beginning with the number 3 and applying folder permissions to any 2010 subfolder. Example of the batch filesis below: for /D %%f in (D:\Data\3*) do icacls "%%f\2010" /inheritance:r /grant:r "Domain Admins":(OI)(CI)F Question : How can I improve this script to allow for me to apply the permissions to a specific folder below ANY folder within the folders beginning with 3? here is an example of my failed attempt: for /D %%f in (D:\Data\3*) do icacls "%%f*\specificfolder" /inheritance:r /grant:r "Domain Admins":(OI)(CI)F

    Read the article

  • Xcopy batch file behavior

    - by piagetblix
    I have the following backup batch file: xcopy C:\test.txt \server\Data\user\"data test" /e /y /i The issue is why does it not only copy the file listed but proceeds to copy the whole root directory? When i remove the switches it only copies the file. There is nothing in the description of those switches that seems to cause the behavior... They are there because I'm picking up where someone else left and all the batch files use these 3 switches. Thanks

    Read the article

  • Several ways to call a windows batch file from another one or from prompt. Which one in which case?

    - by dim
    A windows batch file (called.bat or called.cmd) can be called from another batch file (caller.bat or caller.cmd) or interactive cmd.exe prompt in several ways: direct call: called.bat using call command: call called.bat using cmd command: cmd /c called.bat using start command: start called.bat I'm quite in trouble to differentiate their intended usage based on their help text: when to use which one? e.g. why I might use 'call' command instead of direct call. What's different? I'm interested on some summary report that analyze all 4 possibilities (and others if any missing) from various point of views: recommended use cases for which they are designed to fit, process spawning, execution context, environment, return code processing. Note: I'm using Windows XP SP3.

    Read the article

  • Ask How-To Geek: iPad Battery Life, Batch Resizing Photos, and Syncing Massive Music Collections

    - by Jason Fitzpatrick
    Christmas was good to many of you and now you’ve got all sorts of tech questions related to your holiday spoils. Come on in and we’ll clear up how to squeeze more life out of your iPad, resize all those photos, and sync massive music collections to mobile devices. Once a week we dip into our reader mailbag and help readers solve their problems, sharing the useful solutions with you in the process. Read on to see our fixes for this week’s reader dilemmas. Latest Features How-To Geek ETC How to Use the Avira Rescue CD to Clean Your Infected PC The Complete List of iPad Tips, Tricks, and Tutorials Is Your Desktop Printer More Expensive Than Printing Services? 20 OS X Keyboard Shortcuts You Might Not Know HTG Explains: Which Linux File System Should You Choose? HTG Explains: Why Does Photo Paper Improve Print Quality? Orbiting at the Edge of the Atmosphere Wallpaper Simon’s Cat Explores the Christmas Tree! [Video] The Outdoor Lights Scene from National Lampoon’s Christmas Vacation [Video] The Famous Home Alone Pizza Delivery Scene [Classic Video] Chronicles of Narnia: The Voyage of the Dawn Treader Theme for Windows 7 Cardinal and Rabbit Sharing a Tree on a Cold Winter Morning Wallpaper

    Read the article

  • Sending HTML Newsletters in a Batch Using SQL Server

    Sending a large volume of emails can put a strain on a mail relay server. However many people using SQL Server will need to do just that for things like newsletters, mailing lists, etc. Satnam Singh brings us a way to spread out the load by sending newsletters in multiple batches instead of one large process.

    Read the article

  • Batch normalize audio volume on .ogg-files

    - by Embridioum
    Are there any simple tools to normalize an .ogg-library of 10'000+ songs so that the volume is the same throughout all songs? Terminal or GUI doesn't matter, it only need to be simple. One caveat though, I don't want soft interludes/intermissions and ballads blown out of proportion. Preferably the process should find the overall gain of the album (I have all my CD's ripped into separate folders) and normalize the level thereafter.

    Read the article

  • A Batch of LinuxFest Northwest 2010 Videos at Montana Linux

    <b>Montana Linux:</b> "I recorded them with a Samsung SC-MX20 which is a very inexpensive / budget rig. The sound quality is fair to good considering the camera does not have the ability to use an external mic. The video quality is fair to good considering that most of the rooms had the lights turned off for viewing projected presentation slides."

    Read the article

  • Syncing between computers / batch download

    - by Eric
    I have synced files from two different devices. Now I want to copy to contents of the synced files to the other device. Using the web interface, it seems only possible to download one file at a time. Is there a way to setup automatic sync or to download all the files in a folder with one step? Thanks in advance for your time. I was using the web interface to ubuntu, but an answer for Ubuntu One would also be ok.

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >