Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Update your Win 7 installation media.

09 Apr 2019   #211
SIW2

Microsoft Community Contributor Award Recipient

Vista x64 / 7 X64
 
 

Form:

BROW <variable name>, [[* | &] initial path],[prompt text],[extension name],[notation]


Examples:

1. To select a File:

BROW SOMEVARIABLE,Windows 7.iso,Some message Here,*.ISO|*.ISO|All|*.*||

2. To select a folder

BROW ANOTHERVARIABLE,*C:\Windows,Some Message Here


3. To save a file

BROW DIFFERENTVARIABLE,&Whateverx64.iso,Select Iso Destination SOME MESSAGE ,*.ISO|*.ISO||


My System SpecsSystem Spec
.
09 Apr 2019   #212
Paul Black

[1] Win 7 HP SP1 64-bit [2] Vista HB SP2 32-bit [3] Linux Mint 18.3
 
 

Hi SIW2,

Quote   Quote: Originally Posted by SIW2 View Post
You can see for yourself by using this batch:

Code:
@echo off
echo. &echo.
echo Path of this batch is  %~dp0
echo. &echo.
SET TP=%~dp0
echo The value of the variable TP is %TP%
echo. &echo.
SET TP=%TP:~0,-1%
echo Now the value of the variable TP is %TP%
echo. &echo.
cd /d "%TP%"
pause
That's strange. I just used the logic in a batch file to run system specifications...

Code:
@echo off
systeminfo > %~dp0\My_System_Specs.txt
.. and it worked with the \ included!
My System SpecsSystem Spec
09 Apr 2019   #213
SIW2

Microsoft Community Contributor Award Recipient

Vista x64 / 7 X64
 
 

Your Getfolder.ini
Code:
ENVI TFOLDERPATH=d:\
BROW TFOLDERPATH,,PLEASE BROWSE TO YOUR WINDOWS 7 INSTALLATION FILES,exe 
EXEC =!CMD.EXE /C ECHO set folderpath="%TFOLDERPATH%">"%CurDir%\setfolderpath.cmd"
ENVI TFOLDERPATH=
Try this:

BROW TFOLDERPATH,*, PLEASE BROWSE TO YOUR WINDOWS 7 INSTALLATION FILES FOLDER
My System SpecsSystem Spec
.

09 Apr 2019   #214
SIW2

Microsoft Community Contributor Award Recipient

Vista x64 / 7 X64
 
 

Quote:
.. and it worked with the \ included!
Yes, it does. It seems to work in that case even though there are two \\.
My System SpecsSystem Spec
09 Apr 2019   #215
Paul Black

[1] Win 7 HP SP1 64-bit [2] Vista HB SP2 32-bit [3] Linux Mint 18.3
 
 

Hi SIW2,

Quote   Quote: Originally Posted by SIW2 View Post
Yes, it does. It seems to work in that case even though there are two \\
I checked and the two \\ don't actually appear and don't seem to have an affect because the .txt file gets created successfully with the correct information!

Thanks for replying.
My System SpecsSystem Spec
09 Apr 2019   #216
SIW2

Microsoft Community Contributor Award Recipient

Vista x64 / 7 X64
 
 

Try it without \ like this:

Code:
@echo off
systeminfo > %~dp0My_System_Specs.txt
Quote:
I checked and the two \\ don't actually appear
Where are you expecting the \\ to appear?

If you echo it you will see them

echo %~dp0\My_System_Specs.txt

Update your Win 7 installation media.-2019-04-09_232919.jpg

Some things work OK with \\ for example 7zip seems to handle it fine, but not everything does.


My System SpecsSystem Spec
09 Apr 2019   #217
Megahertz07

Windows 7 HP 64
 
 

Quote   Quote: Originally Posted by SIW2 View Post
1. The %~dp0 variable in a batch file will expand to the drive letter and path of that batch file.

If the batch is on my desktop %~dp0 returns this:

C:\Users\SIW2\Desktop\


2. SET TP =%~dp0

Means set TP to the drive letter and path of the batch file ( TP is the variable which i use to express This Path) OK

3. SET TP=%TP:~0,-1%

means remove the last character from %TP%. It removes the backslash.
~0,-1 means last character minus 1?

So now if you echo the variable %TP%, it returns this:

C:\Users\SIW2\Desktop

4. cd /d "%TP%"
OK

Means change directory to TP (this path)
Thanks
My System SpecsSystem Spec
09 Apr 2019   #218
Megahertz07

Windows 7 HP 64
 
 

Quote   Quote: Originally Posted by SIW2 View Post
Your Getfolder.ini
Code:
ENVI TFOLDERPATH=d:\
BROW TFOLDERPATH,,PLEASE BROWSE TO YOUR WINDOWS 7 INSTALLATION FILES,exe 
EXEC =!CMD.EXE /C ECHO set folderpath="%TFOLDERPATH%">"%CurDir%\setfolderpath.cmd"
ENVI TFOLDERPATH=
Try this:

BROW TFOLDERPATH,*, PLEASE BROWSE TO YOUR WINDOWS 7 INSTALLATION FILES FOLDER
Thanks a LOT
My System SpecsSystem Spec
09 Apr 2019   #219
Paul Black

[1] Win 7 HP SP1 64-bit [2] Vista HB SP2 32-bit [3] Linux Mint 18.3
 
 

Hi SIW2,

Quote   Quote: Originally Posted by SIW2 View Post
Try it without \ like this:

Code:
@echo off
systeminfo > %~dp0My_System_Specs.txt
Where are you expecting the \\ to appear?

If you echo it you will see them

echo %~dp0\My_System_Specs.txt

Attachment 407761

Some things work OK with \\ for example 7zip seems to handle it fine, but not everything does.
I did try systeminfo > %~dp0My_System_Specs.txt [I should have said] and it did also work.
My System SpecsSystem Spec
09 Apr 2019   #220
SIW2

Microsoft Community Contributor Award Recipient

Vista x64 / 7 X64
 
 

I already said it I know that works. But if you echo it as in my post,

Quote:
echo %~dp0\My_System_Specs.txt
you will see there are two \\.

\\ is OK for some applications, but not for all.

Quote:
Some things work OK with \\ for example 7zip seems to handle it fine, but not everything does.
That is why it is common practice to remove the \ from %~dp0
My System SpecsSystem Spec
Reply

 Update your Win 7 installation media.




Thread Tools




Similar help and support threads
Thread Forum
TEST -Update 7 installation media
Anyone who wants to give this a try: 1. Put your win7 dvd in the drive, rt click it and select COPY. Then rt click your partition (e.g. C ) and PASTE. It will take a few mins and you should have afolder on c containing the installation files, like this: 2. Install WUD - tiny program:
Installation & Setup
Windows Media Player will not update media library
I am a music downloader. It used to be that WMP12 would update the mp3 music folders to where the folder contents would read as follows: 01 'Track Name' 02 'Track Name' 03 'Track Name' and so on... This is no longer the case. WMP will not update my media library files, although it...
General Discussion
How to get installation media?
Hi, I've got an HP Pavilion laptop that came with Windows 7 installed as a Vista upgrade. I'd like to blow it away, repartition the disk for dual boot with Linux, and do a clean install of Windows 7. The only problem (I think) is that I don't have the installation media. I've searched online...
Installation & Setup
Bad installation media I think
Remember me? I'm the one with the pirated W7 Ultimate. I finally bought a genuine W7 Ultimate disk from Newegg for the tune of $310. Still working with MasterCard to get my money back. It looks favorable. When I went to do a clean install the auto-boot worked but it hung up with a blue screen...
Installation & Setup
media smart server update corrupted media center
I have 4 computers all running windows 7-3 in 32 and 1 in 64. All were working fine and no issues with my mediasmart 470 server. I only have one computer with console running. The other day pp3 came out and has made a mess of my computer that has connector to server. It seems to have corrupted...
Media Center


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 18:00.
Twitter Facebook