Solved

Script file to be made as .bat file

Posted on 2007-12-02
4
1,033 Views
Last Modified: 2009-03-20
Hi,
I have vb script which disables usb, cd rom and floppy drive by editing registry.

I need to do some thing like i want to make it as a .bat and if i run that .bat file in any of the machine the script should execute or run and disable the usb,cd and floppy.

Dont give me any of the link, just tell me how to do that.
0
Comment
Question by:expertblr
4 Comments
 
LVL 12

Expert Comment

by:chandru_sol
ID: 20391383
Can you post your vbscript so that we can convert the same to bat?

regards
Chandru
0
 
LVL 33

Expert Comment

by:roos01
ID: 20391663
Why not call your vbs script using a bat file.

could be something like:
1. open notepad
2. past the path and filename of your vbs script like: C:\temp\test.vbs
3. save file as your bat-file

regards,
Jeroen
0
 
LVL 8

Expert Comment

by:deadite
ID: 20392493
I don't know the actual Registry Key and Values you need to set, but this is how you do it.  Use a bat file that writes a registry file, then silently imports it, and delete the registry file:
@Echo Off
 

:Create Temp Registry File

> "%Temp%\regfix.reg" ECHO Windows Registry Editor Version 5.00 

>> "%Temp%\regfix.reg" ECHO.
 

:Add Registry Key to Our Temp File

>> "%Temp%\regfix.reg" ECHO [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run] 
 

:Set Value For Above Key in Temp File

>> "%Temp%\regfix.reg" ECHO "CDROM"="disable"
 

:Import Our Temp Registry File

REGEDIT /S "%Temp%\regfix.reg"
 

:Delete Our Temp Registry File

DEL "%Temp%\regfix.reg"

Open in new window

0
 
LVL 11

Accepted Solution

by:
bsharath earned 125 total points
ID: 20393765
Check this...
Enable disable CDD and FDD drive remotely

http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Q_22757183.html

Disable Usb
http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Q_22756399.html

I use these they are excellent...
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This script will sweep a range of IP addresses (class c only, 255.255.255.0) and report to a log the version of office installed. What it does: 1.)      Creates log file in the directory the script is run from (if it doesn't already exist) 2.)      Sweep…
When you receive another warning that your shared drive is almost full and you have asked your users to clean out old files again and again, here is a single command that may help. This command will place all the files that have not been used rec…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now