napster100

Honorable
Aug 13, 2013
27
0
10,590
Because I fix many computers and laptops for people, I like to give them peace of mind by installing the latest updates too. I've made a batch that installs the Standalone Packages that I've downloaded but I have to type the full path of where they are located, so if I could type the short path ie "security updates\Windows6.1-KB2476490-x86.msu" because the batch file is located at the parent directory of all the folders I have there.

Currently I'm having to put "G:\Software\Updates\Windows 7\Windows 7 Service Pack 1 x86 ENU\Security Updates\Windows6.1-KB2476490-x86.msu" and when I plug it into a different computer, the drive letter may be different thus having to change all 100+ locations to the correct drive letter in the batch every time.

Thanks for your time and help.

Regards, Chris
 
Solution
How difficult is to open that batch file in a Notepad, and replace all occurrences of "G:\" with "F:\"?
Another idea: Edit your batch file to start with path only, without drive letter. When you need to start the batch, open command prompt, change current drive to where you've mounted your CD/flash key, and execute the batch from here.
How difficult is to open that batch file in a Notepad, and replace all occurrences of "G:\" with "F:\"?
Another idea: Edit your batch file to start with path only, without drive letter. When you need to start the batch, open command prompt, change current drive to where you've mounted your CD/flash key, and execute the batch from here.
 
Solution