Search found 34 matches

by Docfxit
04 Dec 2019 21:35
Forum: DOS Batch Forum
Topic: Show drive letter of DVD drive
Replies: 2
Views: 119

Re: Show drive letter of DVD drive

That worked perfect.

Thank you very very much,

Docfxit
by Docfxit
04 Dec 2019 19:15
Forum: DOS Batch Forum
Topic: Show drive letter of DVD drive
Replies: 2
Views: 119

Show drive letter of DVD drive

I would like to find the drive letter of the DVD drive. With this code in a batch file running in Win7 The Echo %%1 is not showing the drive The line Set DVDDrive=%%1 is showing %1 instead of the drive letter. setlocal for /f "skip=1 tokens=1,2" %%i in ('wmic logicaldisk get caption^, drivetype') do...
by Docfxit
25 Oct 2019 18:32
Forum: DOS Batch Forum
Topic: Find not working
Replies: 2
Views: 2941

Find not working

I have a bat file with this code: type "%~dp0BootFixerTest.txt" |find /i "Windows installations: 0" >nul || goto :Done Pause This is the file called BootFixerTest.txt it's looking at: Scanning all disks for Windows installations. Please wait, since this may take a while... Successfully scanned Windo...
by Docfxit
20 Oct 2019 20:05
Forum: DOS Batch Forum
Topic: Trying to run Powershell
Replies: 0
Views: 7665

Trying to run Powershell

I have a batch script to create an entry in Task Schedule, that seems to work except nothing gets written to the $Logfile. I am running this with the Administrator user. (Not a user that has administrator privileges) @ECHO On :: This script name is Reset-AppX.cmd ::Create for log file in Fix-Sysprep...
by Docfxit
12 Jul 2019 11:40
Forum: DOS Batch Forum
Topic: Calling a bat file with a parameter
Replies: 3
Views: 2549

Re: Calling a bat file with a parameter

Ok. So it's not working. I would like to get it working.
Yes I would like to automatically choose option one.
Do you know how to get it to accept option one on the next re-boot?

Thanks,
Docfxit
by Docfxit
11 Jul 2019 10:57
Forum: DOS Batch Forum
Topic: Calling a bat file with a parameter
Replies: 3
Views: 2549

Calling a bat file with a parameter

I'm trying to call a bat file with a parameter. The bat file does get called. The parameter doesn't. Set "RunFile=IPAddressSet.bat 1" REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" /V "Set IP Address" /t REG_SZ /F /D "%~dp0%RunFile%" This is the bat file I am calling: @ECHO off cal...
by Docfxit
02 Apr 2019 09:52
Forum: DOS Batch Forum
Topic: Ipconfig doesn't work inside a bat file
Replies: 18
Views: 2998

Re: Ipconfig doesn't work inside a bat file

I changed it to this: @Echo Off echo. echo IP INFORMATION ipconfig/all | find "IP Address" ipconfig/all | find "IPv4 Address" ipconfig/all | find "Subnet Mask" ipconfig/all | find "Default Gateway" ipconfig/all | find "Host Name" ipconfig/all | find "DNS Suffix Search List" ipconfig/all | find "Phys...
by Docfxit
02 Apr 2019 09:02
Forum: DOS Batch Forum
Topic: Ipconfig doesn't work inside a bat file
Replies: 18
Views: 2998

Re: Ipconfig doesn't work inside a bat file

Things you still could try: - Run ping with the fully qualified path. That is, C:\Windows\System32\ping.exe. I have changed the bat file to this: @echo. @echo IP INFORMATION @ipconfig/all | find "IP Address" @ipconfig/all | find "IPv4 Address" @ipconfig/all | find "Subnet Mask" @ipconfig/all | find...
by Docfxit
01 Apr 2019 17:02
Forum: DOS Batch Forum
Topic: Ipconfig doesn't work inside a bat file
Replies: 18
Views: 2998

Re: Ipconfig doesn't work inside a bat file

I did run SFC /scannow. It did find problems. I did reboot. I ran SFC /scannow again. I received: Windows Resource Protection did not find any integrity violations. I did re-boot. I ran Winsock reset with: @Echo Off netsh winsock reset catalog netsh int ip reset resetlog.txt ipconfig /release ipconf...
by Docfxit
01 Apr 2019 09:38
Forum: DOS Batch Forum
Topic: Ipconfig doesn't work inside a bat file
Replies: 18
Views: 2998

Re: Ipconfig doesn't work inside a bat file

I changed it to Ping.exe. That didn't fix it. I noticed that machine has PROMPT=$P$G when I run SET in a cmd window. The other machine doesn't. I don't know if that might have something to do with it. I don't know where that comes from. It's not in the Environment Variables.

Docfxit
by Docfxit
31 Mar 2019 20:50
Forum: DOS Batch Forum
Topic: Ipconfig doesn't work inside a bat file
Replies: 18
Views: 2998

Re: Ipconfig doesn't work inside a bat file

This is the output I get:

Code: Select all

C:\Users\MyUserName>where ping
C:\Windows\System32\PING.EXE
Thanks,
Docfxit
by Docfxit
31 Mar 2019 20:11
Forum: DOS Batch Forum
Topic: Ipconfig doesn't work inside a bat file
Replies: 18
Views: 2998

Re: Ipconfig doesn't work inside a bat file

On the bad computer this is what I am getting now: IP INFORMATION IPv4 Address. . . . . . . . . . . : 192.168.168.7(Preferred) Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.168.168 Host Name . . . . . . . . . . . . : DocfxitLT Physical Address. . . . ....
by Docfxit
31 Mar 2019 20:06
Forum: DOS Batch Forum
Topic: Ipconfig doesn't work inside a bat file
Replies: 18
Views: 2998

Re: Ipconfig doesn't work inside a bat file

You are a genius. That fixed the find immediately. I removed "C:\Programs\cygwin\bin" out of the environment path since it has it's own Environment entry.
Thank you very much for finding the fix for me.

You're great,

Thanks,
Docfxit
by Docfxit
31 Mar 2019 14:43
Forum: DOS Batch Forum
Topic: Ipconfig doesn't work inside a bat file
Replies: 18
Views: 2998

Ipconfig doesn't work inside a bat file

When I run my batch file it shows me: IP INFORMATION find: 'IP Address': No such file or directory find: 'IPv4 Address': No such file or directory find: 'Subnet Mask': No such file or directory find: 'Default Gateway': No such file or directory find: 'Host Name': No such file or directory find: 'DNS...
by Docfxit
11 Mar 2019 18:52
Forum: DOS Batch Forum
Topic: Get PID from port
Replies: 5
Views: 1253

Re: Get PID from port

I don't know what you are expecting. First of all you should enclose the search string into quotes for the findstr command. And instead of "80" you should rather look for ":80\>" where \> marks the right word boundary as explained in the help of findstr. For your command that would mean findstr ":%...