Search Results

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

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

  • While running a batch file in Windows 7 with Admin rights from a thumb drive, how can I get the file path back to the thumb drive?

    - by Jeremy DeStefano
    I have a piece of software that is being distributed to several departments for installation onto Windows 7 laptops. They install software from the thumb drive and then they have to run a script to properly configure the software. Because the script is changing registry files and program files, it requires Admin rights. When running as Admin, it drops into the System32 folder and I no longer have an easy scriptable way to access files that need to be copied from the thumb drive, simply because I don't know for sure what drive letter its going to use on the various machines. Previous installations were on Windows XP and the command window file path stayed within the script folder. I've found similar questions here and I have already tried Relative Paths, but it can't seem to find the proper folder on the thumb drive or I can't seem to find the proper way to format it.

    Read the article

  • Best way of implementing a batch like operation in a RESTful architecture?

    - by Nirav
    Hello, We have a predominantly RESTful architecture for our product. This enables us to nicely implement almost all of the required functionality, except this new requirement thats come in. I need to implement a page which lets the user to large scale DB operations synchronously. They can stop the operation in between, if they realized they made a mistake (rather than waiting for it to complete and doing an undo operation) I was wondering if some one could give some pointers as to what would be the best way to implement such a functionality? Cheers! Nirav

    Read the article

  • Batch file conversion to vbscript

    - by blademasterson
    I need to convert a batch file to vbscript but am unfamiliar with both. If I can understand what is going on in the batch file I can work out the vbscript easy enough. Problem is the batch file runs a few cscript commands which is supposed to have a syntax of cscript [script name] [host options] [script arguments] However whomever wrote the batch file doesn't use it in a standard manner so if someone could explain the use of the command I can work out the rest. Sample line: Filename and actual url's removed for safety sake cscript file.vbs -a -r url -h url -o raw

    Read the article

  • batch file that detects keystrokes. how?

    - by daniel11
    im designing a collection of video games for the command line (such as deal or no deal, tic tac toe, racing, maze puzzle, connect four, wack a mole, etc.) however it would really make things easier for me if i could make it so that when the user makes a selection (such as what direction to move in the game) , that as soon as they press the arrow keys then it carries out the IF statements that follow. Instead of having to press enter after each selection. something like... :one1 set /p direction1= : IF %direction1%== {ARROW KEY LEFT} goto two2 IF %direction1%== {ARROW KEY RIGHT} goto three3 IF %direction1%== {ARROW KEY UP} goto four4 IF %direction1%== {ARROW KEY DOWN} goto five5 goto one1 Any Ideas?

    Read the article

  • Best way to split a string by word (SQL Batch separator)

    - by Paul Kohler
    I have a class I use to "split" a string of SQL commands by a batch separator - e.g. "GO" - into a list of SQL commands that are run in turn etc. ... private static IEnumerable<string> SplitByBatchIndecator(string script, string batchIndicator) { string pattern = string.Concat("^\\s*", batchIndicator, "\\s*$"); RegexOptions options = RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Multiline; foreach (string batch in Regex.Split(script, pattern, options)) { yield return batch.Trim(); } } My current implementation uses a Regex with yield but I am not sure if it's the "best" way. It should be quick It should handle large strings (I have some scripts that are 10mb in size for example) The hardest part (that the above code currently does not do) is to take quoted text into account Currently the following SQL will incorrectly get split: var batch = QueryBatch.Parse(@"-- issue... insert into table (name, desc) values('foo', 'if the go is on a line by itself we have a problem...')"); Assert.That(batch.Queries.Count, Is.EqualTo(1), "This fails for now..."); I have thought about a token based parser that tracks the state of the open closed quotes but am not sure if Regex will do it. Any ideas!?

    Read the article

  • interactive window to execute dos commands in visual studio

    - by Anirudh Goel
    Hi, I know using External Tools options i can run a batch script or a cmd prompt. But here is what i need to do I want to be able to call a dos prompt inside visual studio, which must be interactive. That way i won't be outside visual studio and can run all my dos commands in it. Is it possible? Or can i extend the command window and capture the commands which are typed and process them using my custom code? Thanks

    Read the article

  • interactive window to execute dos commands in visual studio

    - by Anirudh Goel
    Hi, I know using External Tools options i can run a batch script or a cmd prompt. But here is what i need to do I want to be able to call a dos prompt inside visual studio, which must be interactive. That way i won't be outside visual studio and can run all my dos commands in it. Is it possible? Or can i extend the command window and capture the commands which are typed and process them using my custom code? Thanks

    Read the article

  • Web request returns "DOS"

    - by jlezard
    I am getting a "DOS" instead of the html string .... let getHtmlBasic (uri :System.Uri ) = use client = new WebClient() client.DownloadString( uri) let uri = System.Uri( "http://www.b-a-r-f.com/" ) getHtmlBasic uri This gives a string, "DOS" Lol what the ? All other websites seems to work ...

    Read the article

  • executing batch files sequentially

    - by sushant
    dim shell,x,y x="D:\d" y="c.bat " & x set shell=createobject("wscript.shell") shell.run y shell.run "a.bat" set shell=nothing when i run this script, it runs both batch files simultaneously. what i need is that it should run the first batch file(c.bat) and after it is completely executed, it should execute other(a.bat) what i need works if i make another batch file and use: call c.bat call a.bat

    Read the article

  • how to make the batch file wait until another batch file completes execution?

    - by Arunachalam
    how to make the batch file wait until another batch file completes execution? let me explain with an example. echo hi >r.txt echo some piece of code >>r.txt start ar.bat echo some piece of coe >>ar.txt i want the code after start ar.bat to execute after this batch file exits .. i have tried without start it works but i want to run it in a seperate window ..is there any function to check whether that window which is running ar.bat is present ?

    Read the article

  • passing variable from vbscript to batch file

    - by sushant
    i am using vbscript to call a batch file. my script looks like: dim shell set shell=createobject("wscript.shell") shell.run "a.bat" set shell=nothing my batch file is simple and looks like: D: cd D:\d winzip32.exe -min -a D:\a i want to pass a variable from a script to the batch file. lets say the destination folder. how do i do that? any help is very much appreciated.

    Read the article

  • Accessing the database and sending an email in a symfony batch script

    - by morpheous
    I am running Symfony 1.3.2 on Ubuntu. I need to write a batch script that can: Access the database using the ORM Send email(s) IIRC, this was in a previous cookback, but I thing that was for an earlier version of Symfony (the API may have changed since). Does anyone know how I may access the database via the ORM layer in a batch script and also how to send out email(s) in a batch script?

    Read the article

  • How do I understand the 3 lines batch script?

    - by Runner
    ECHO @ECHO OFF ^& (IF EXIST "%%~dp0%~n1.swf" (DEL "%%~dp0%~n1.swf")) ^& %mxmlcPath% %opts% -file-specs "%%~dp0%~nx1" ^& (IF EXIST "%%~dp0%~n1.swf" (CALL "%%~dp0%~n1.swf") ELSE (PAUSE)) > "%~dpn1.bat" REM Immediately execute the generated bat @ECHO on CALL "%~dpn1.bat" It's really a mess for me(like ECHO @ECHO OFF,what's that intended for?), can someone elaborate it?

    Read the article

  • How to handle carriage return with windows batch script?

    - by eric2323223
    Hi, I want to use bat to automate some of my work. It should first look up the value of a certain registry key, and then copy some files to the directory that included in the registry key value. I used reg query command to look up registry, such as: REG QUERY "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v PROCESSOR_ARCHITECTURE The result seems contains carriage return and I need to remove it, I've tried some solutions but all failed. Could anyone help me?

    Read the article

  • How would I write this shell script as a Windows batch script?

    - by Jeremy Banks
    I haven't had a chance to test this script, I'm just using it as a suitable pseudocode. It's just supposed to copy all files in the current directory into a timestamped subdirectory. ID="$(date +%Y%b%d%H%M%S)" COMMITABLE="$(ls | egrep --invert-match ^(STATES|PARENT)\$)" STATE_PATH="$(pwd)/STATES/$ID" mkdir --parents "$STATE_PATH" cp $COMMITABLE "$STATE_PATH" ln -s "$STATE_PATH" PARENT

    Read the article

  • using a batch file, how can i delete all files not in the windows dir?

    - by simondo
    i have a litle project for which i would like to remove all files outside of and not needed by the c:\windows operating system. therefore i need to create a list of what i want to keep i.e. boot.ini c:\windows etc and then delete everything else. i have seen examples using forFile, but i can be sure that extension will be on the machine. does anyone have any ideas how i can create the exclude list and then do the delete?

    Read the article

  • how to copy files without showing dos window

    - by vinaym
    I have the following code to copy files sprintf(command, "copy /Y %s %s", sourceFile, targetFile); system(command); It works except for the dos window showing up which is very annoying. I am trying to use CreateProcess() (with an #ifdef for WINNT), but not sure how to setup the command line for the same. Any other options for copying files in C (on windows) without showing dos window?

    Read the article

  • What is the proper way to test is variable is empty in a batch file, If NOT "%1" == "" GOTO SomeLabe

    - by blak3r
    I need to test if a variable is set or not. I've tried several techniques but they seem to fail whenever %1 is surrounded by quotes such as the case when %1 = "c:\some path with spaces". IF NOT %1 GOTO MyLabel // This is invalid syntax IF "%1" == "" GOTO MyLabel // Works unless %1, otherwise fatally kills bat execution IF %1 == GOTO MyLabel // Gives an unexpected GOTO error. According to this site. These are the support IF syntax types. So, I don't see a way to do it. IF [NOT] ERRORLEVEL number command IF [NOT] string1==string2 command IF [NOT] EXIST filename command

    Read the article

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