Solved

Script file to be made as .bat file

Posted on 2007-12-02
4
1,038 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:Jeroen Rosink
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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I met Paul Devereux (@pdevereux) today when I responded to his tweet asking “Anybody know how to automate adding files from disk to a folder in #outlook  ?”.  I replied back and told Paul that using automation, in this case scripting, to add files t…
Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

770 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