Solved

Script file to be made as .bat file

Posted on 2007-12-02
4
1,046 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

617 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