Search found 4314 matches

by Squashman
28 Mar 2012 05:39
Forum: DOS Batch Forum
Topic: Exit /B %ERRORLEVEL% ???
Replies: 17
Views: 39290

Re: Exit /B %ERRORLEVEL% ???

But does the command EXIT /B 1 set the errorlevel or it uses the errorlevel? Does this answer your question H:\>cmd.exe Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. H:\>exit /b 1 H:\>echo %errorlevel% 1 H:\>cmd.exe Microsoft Windows XP [Version 5.1.2600] (C) Copyr...
by Squashman
28 Mar 2012 05:32
Forum: DOS Batch Forum
Topic: Split string to characters
Replies: 32
Views: 43568

Re: Split string to characters

Get the String Length which I believe we have a function already written for in our Library here and then use a For /L loop and use string parsing to echo each character individually.
by Squashman
23 Mar 2012 10:13
Forum: DOS Batch Forum
Topic: batch file to uninstall any version of a software
Replies: 11
Views: 10323

Re: batch file to uninstall any version of a software

Little revision to the code above as far as getting the uninstall string. @echo off For /F "Tokens=*" %%I In ('Reg Query HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall^|Findstr /I /C:"{26A24AE4-039D-4CA4-87B4-"') Do ( For /F "skip=2 Tokens=2*" %%J In ('Reg Que...
by Squashman
23 Mar 2012 09:49
Forum: DOS Batch Forum
Topic: batch file to uninstall any version of a software
Replies: 11
Views: 10323

Re: batch file to uninstall any version of a software

Foxidrive, I think this is what he is trying to do. For /F "Tokens=*" %%I In ('Reg Query HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall^|Findstr /I /C:"{26A24AE4-039D-4CA4-87B4-"') Do ( For /F "Tokens=4*" %%J In ('Reg Query "%%I" /V UninstallString')...
by Squashman
22 Mar 2012 17:02
Forum: DOS Batch Forum
Topic: Renamig File with Underscores
Replies: 2
Views: 2462

Re: Renamig File with Underscores

Just a little tweaking of the script in this thread should do the trick for you.
viewtopic.php?f=3&t=3087
by Squashman
22 Mar 2012 16:08
Forum: DOS Batch Forum
Topic: map network
Replies: 7
Views: 5815

Re: map network

I thought xcopy could use UNC paths so why bother doing the drive mapping?

But you could also use the pushd with the unc path and then use the xcopy command after that.
by Squashman
22 Mar 2012 06:57
Forum: DOS Batch Forum
Topic: Resetting the incoming parameter in a batch file
Replies: 3
Views: 3838

Re: Resetting the incoming parameter in a batch file

IF slick run is always sending a $w$ to your batch file then you could use the SHIFT command to get ride of the initial $w$.
by Squashman
21 Mar 2012 06:03
Forum: DOS Batch Forum
Topic: Removing Glitched Folder
Replies: 4
Views: 3720

Re: Removing Glitched Folder

You weren't perhaps screwing around with Making directories at the command line and using ALT characters. Specifically ALT-255. Whatever ALT character you used to create the folder from the command line you need to use to delete the folder from the command line.
by Squashman
21 Mar 2012 05:48
Forum: DOS Batch Forum
Topic: PAUSE SCRIPT In WIN 7 & WIN XP Issues....
Replies: 4
Views: 4960

Re: PAUSE SCRIPT In WIN 7 & WIN XP Issues....

The PAUSE command does not take any command line arguments. It requires the users to press a key to continue. Windows Vista & 7 have the TIMEOUT command. That would allow you to pause the script for a set amount of time. Your other option is to use the PING trick. ping -n 2 -w 60 127.0.0.1>NUL
by Squashman
19 Mar 2012 07:36
Forum: DOS Batch Forum
Topic: Regarding pdf
Replies: 1
Views: 2321

Re: Regarding pdf

Not without some 3rd party software.
by Squashman
08 Mar 2012 14:18
Forum: DOS Batch Forum
Topic: Enable/Disable TCP/IP from Command Prompt
Replies: 9
Views: 13085

Re: Enable/Disable TCP/IP from Command Prompt

Give this a try.
netsh int ipv4 uninstall
netsh int ipv4 install
by Squashman
08 Mar 2012 14:08
Forum: DOS Batch Forum
Topic: Enable/Disable TCP/IP from Command Prompt
Replies: 9
Views: 13085

Re: Enable/Disable TCP/IP from Command Prompt

Well you could use Netsh to change the IP address to some non routable IP address on your network and then change it back to whatever when needed.
http://www.petri.co.il/configure_tcp_ip_from_cmd.htm
by Squashman
08 Mar 2012 09:45
Forum: DOS Batch Forum
Topic: Enable/Disable TCP/IP from Command Prompt
Replies: 9
Views: 13085

Re: Enable/Disable TCP/IP from Command Prompt

netsh interface set interface "Interface name" DISABLED
by Squashman
08 Mar 2012 06:41
Forum: DOS Batch Forum
Topic: batch write file name in file
Replies: 8
Views: 6809

Re: batch write file name in file

ralfs_k wrote:works great but how to add that line at the top of file not end?

Just knew you were going to say that next after I read your initial question. That would have been nice to know before hand.
by Squashman
07 Mar 2012 12:47
Forum: DOS Batch Forum
Topic: Admin password "HELP"
Replies: 3
Views: 3460

Re: Admin password "HELP"

%echo% is not your variable. You are using %cho%

I wouldn't use the same variable name for both of your questions. If you just hit enter on the second question which asks for the user name the variable cho is still defined as yes.