I got a batch file question. I am deploying many Computers in a local hospital, I want to auto insert text via batch file into the run command search field. I have the run command working so all i need to know is how to insert test.
Here is what I have so far:
@echo off
set /p printer=Enter Printer Name text:
hostname
@echo off
rundll32.exe shell32.dll #61
pause
This is the print server location I would like to open:
rundll32 printui.dll,PrintUIEntry /c\\COMPUTERNAME /ga /n \\PRINTERNAME/j"LanMan Print Servers"
The idea is a user runs the batch, and types in the printer name.
then an explorer window opens up to the printserver folder.
thats it.
I would like the Hostname to auto fill in the //COMPUTERNAME\
Any help would be appreciated
Thanks
Auto insert text in Run Command via Batch
Moderator: DosItHelp
-
- Posts: 24
- Joined: 06 May 2014 09:55
- Location: North West Indiana
Re: Auto insert text in Run Command via Batch
Do you search something like the following?
(The echo is just for debugging, remove it if the resulting instruction is, what you need.)
penpen
Code: Select all
echo rundll32 printui.dll,PrintUIEntry /c\\%COMPUTERNAME% /ga /n \\%printer%/j"LanMan Print Servers"
penpen