By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,106 Members | 2,679 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,106 IT Pros & Developers. It's quick & easy.

Need excel to execute a script as a macro to open a folder on a network computer

P: 1
I need excel to execute the following .bat file, except fill in corresponding ip address information that is located in cells B8-B66.

@ECHO OFF
ECHO.
ECHO *************************************************
ECHO ** This Batch file allows you to connect to a c$
ECHO ** of another Computer
ECHO *************************************************
ECHO.
SET /P IP=[Please Enter the IP Address of the Host:]
ECHO.
SET /P NAME=[Please Enter your Account Name:]
ECHO.
ECHO.
NET.EXE USE \\%IP%\IPC$ /USER:pc\%NAME% /PERSISTENT:NO
START /WAIT \\%IP%\C$
NET.EXE USE \\%IP%\IPC$ /DELETE

End result will be - you click on a button in excel next to the ip of the computer you want to look at, and it will execute the bat which will open the corresponding C$ drive of that IP, asking for the username and password
Aug 8 '12 #1
Share this Question
Share on Google+
1 Reply


ryno du preez
P: 91
Hi
Do you want the bat file to read the IP from the excel sheet ?
Sep 17 '12 #2

Post your reply

Sign in to post your reply or Sign up for a free account.