Solved

Script file to be made as .bat file

Posted on 2007-12-02
4
1,041 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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

828 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