Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - How to isable floppy disk (drive A:)?

Reply
 
Old 03-23-2009   #1 (permalink)
Luka1993


 
 

How to isable floppy disk (drive A:)?

Hi!

I was wondering how to disable a floppy disk from vbscript or command line.
Devcon is not what i want because i need to disable all floppys with a click
or just disable drive A.

Thank you in advance!

My System SpecsSystem Spec
Old 03-23-2009   #2 (permalink)


VISTA home prem 32bit SP2 --- XP Pro SP3 32bit
 
 

Re: How to isable floppy disk (drive A:)?

Quote  Quote: Originally Posted by Luka1993 View Post
Hi!

I was wondering how to disable a floppy disk from vbscript or command line.
Devcon is not what i want because i need to disable all floppys with a click
or just disable drive A.

Thank you in advance!
only way I know is to go to device manager and disable floppy disk drives.
My System SpecsSystem Spec
Old 03-23-2009   #3 (permalink)


Vista Ultimate 64 bit
 
 

Re: How to isable floppy disk (drive A:)?

Quote  Quote: Originally Posted by Luka1993 View Post
Hi!

I was wondering how to disable a floppy disk from vbscript or command line.
Devcon is not what i want because i need to disable all floppys with a click
or just disable drive A.

Thank you in advance!
Hi Luka1993,

May I ask why you want to do that? May be there is a way around it such as most people intend to minimize boot time such will skip checking all drives before hit the HDD. They simply can change boot sequence so the booting go directly to the HDD. Press F8, I believe, when booting to go to menu where to make change.

Hope this helps.

Bruce
My System SpecsSystem Spec
Old 03-23-2009   #4 (permalink)
Luka1993


 
 

Re: How to isable floppy disk (drive A:)?

Hi!

Thank you for replying. I don't want to do this manually.

I want to disable the floppy because i have a script that causes a no disk
errorbox if the floppy is enabled. (the disk checks all drives for a file).

Do you know a way to skip the floppy and search from drive C to X instead of
all? Because im not a programmed or a coder :S...

Here is the code:

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("Wscript.Shell")
Set colDrives = objFSO.Drives
Set objEnv = objShell.Environment("PROCESS")

For Each objDrive in objFSO.Drives
If objFSO.FileExists(objDrive.DriveLetter & ":\flashdrive.txt") Then
strPath = objDrive.Driveletter & ":"
sPathSpec = strPath & "\SYSTEM\LOGS"
CreateObject("Wscript.Shell").CurrentDirectory = sPathSpec
objShell.Run strPath &
"\SYSTEM\PROGRAM\USB\DISK\INFO\PROGRAM\something.exe"
End If
Next
My System SpecsSystem Spec
Old 03-23-2009   #5 (permalink)
James Whitlow


 
 

Re: How to isable floppy disk (drive A:)?

"Luka1993" <Luka1993@xxxxxx> wrote in message
news:79C4A575-674B-4B45-9FC3-78EE8C553DC7@xxxxxx
Quote:

> Hi!
>
> Thank you for replying. I don't want to do this manually.
>
> I want to disable the floppy because i have a script that causes a no disk
> errorbox if the floppy is enabled. (the disk checks all drives for a
> file).
>
> Do you know a way to skip the floppy and search from drive C to X instead
> of
> all? Because im not a programmed or a coder :S...
>
> Here is the code:
>
> Set objFSO = CreateObject("Scripting.FileSystemObject")
> Set objShell = CreateObject("Wscript.Shell")
> Set colDrives = objFSO.Drives
> Set objEnv = objShell.Environment("PROCESS")
>
> For Each objDrive in objFSO.Drives
> If objFSO.FileExists(objDrive.DriveLetter & ":\flashdrive.txt") Then
> strPath = objDrive.Driveletter & ":"
> sPathSpec = strPath & "\SYSTEM\LOGS"
> CreateObject("Wscript.Shell").CurrentDirectory = sPathSpec
> objShell.Run strPath &
> "\SYSTEM\PROGRAM\USB\DISK\INFO\PROGRAM\something.exe"
> End If
> Next
Bruce, use the 'IsReady' property. Modified code below. What exactly are you
trying to do on line 11?

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("Wscript.Shell")
Set colDrives = objFSO.Drives
Set objEnv = objShell.Environment("PROCESS")

For Each objDrive in objFSO.Drives
If objDrive.IsReady Then
If objFSO.FileExists(objDrive.DriveLetter & ":\flashdrive.txt") Then
strPath = objDrive.Driveletter & ":"
sPathSpec = strPath & "\SYSTEM\LOGS"
CreateObject("Wscript.Shell").CurrentDirectory = sPathSpec
objShell.Run strPath &
"\SYSTEM\PROGRAM\USB\DISK\INFO\PROGRAM\something.exe"
End If
End If
Next


My System SpecsSystem Spec
Old 03-23-2009   #6 (permalink)
Luka1993


 
 

Re: How to isable floppy disk (drive A:)?

Thank you James!!!!

The line 11 is for changing the directory. But i am not sure if it is
necesary, Your code worked and the error was gone too !
My System SpecsSystem Spec
Old 03-24-2009   #7 (permalink)


VISTA home prem 32bit SP2 --- XP Pro SP3 32bit
 
 

Re: How to isable floppy disk (drive A:)?

Quote  Quote: Originally Posted by Luka1993 View Post
Thank you James!!!!

The line 11 is for changing the directory. But i am not sure if it is
necesary, Your code worked and the error was gone too !

Right on James !!!!!!!
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Floppy Disk Drive Letter Vista hardware & devices
Pen drive/USB flash drive showing as floppy disk Vista General
USB External Floppy Disk Drive-New Purchase Recommendation Vista hardware & devices
usb floppy disk drive drivers Vista hardware & devices
Floppy disk drive doesn't appear in the My Computer folder Vista hardware & devices


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46