Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Script file to be made as .bat file

Posted on 2007-12-02
4
Medium Priority
?
1,054 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 375 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Loops Section Overview
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

879 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