Jump to content

gunsmokingman

Super Moderator
  • Posts

    2,296
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    Canada

Everything posted by gunsmokingman

  1. 1:\ Check to see if drive ready 2:\ Checks for file on drive Save as a VBS file Dim Fso :Set Fso = CreateObject("Scripting.FileSystemObject") Dim Chk, File, Obj '-> Path To File Without Drive Letter File = ":\SOME_FOLDER\FILE.NAME" Chk = False '-> Loop Threw The Drives For Each Obj In Fso.Drives '-> Drive Is Ready And Check To See File Exists On Drive If Obj.IsReady And Fso.FileExists(Obj.DriveLetter & File) Then File = Obj.DriveLetter & File Chk = True End If Next '-> Check The Results If Chk = True Then WScript.Echo "Confirm " & File Else WScript.Echo "Can Not Find File" End If
  2. Here is a VBS script to see if the optical drive is empty. Save as OpticalDriveChk.vbs Dim Fso :Set Fso = CreateObject("Scripting.FileSystemObject") Dim Chk, Drv, Obj Chk = False '-> Loop Threw The Drives For Each Obj In Fso.Drives '-> Check To See If The Drive Ready And It A Optical Type If Obj.IsReady And Obj.DriveType = 4 Then Drv = Obj.DriveLetter Chk = True End If Next '-> Check The Results If Chk = True Then WScript.Echo "Confirm " & Drv Else WScript.Echo "Empty Optical Drive" End If
  3. Maybe try this @Echo Off cwnd /HIDE @ start /wait wlm2009_416.exe xcopy "Windows Live Messenger.lnk" "%ALLUSERSPROFILE%\Desktop" /Y /E Set File="%programfiles%\Winamp\Plugins\gen_MSN.dll" If Not Exist %File% Goto Work1 If Exist %File% Goto TheEnd :Work1 xcopy "gen_MSN.dll" %File% goto TheEnd :TheEnd Exit
  4. That looks like a Powershell script, so it extension should be .ps1 and not a .vbs
  5. You could use a VBS script to make the shortcut on the desktop using the RunOnceEx Method Save As MyUrl.vbs Example RunOnceEx Method
  6. The VBS script I provided uses CreateObject("Microsoft.Update.Session"). Here is a Link for it some of it functions.
  7. Here try this VBS Script and see if it will do what you want. I have included the VBS file, you will have to change it name from ListAllUpdates.vbs.txt to ListAllUpdates.vbs
  8. Here is how you would do it using VBS scripting.
  9. Please read the code, it only checks for Fat and only has place holder code for the format. This would be the reason it is not working, you will have to add your own code. jaclaz I thought you would have notice that was missing from the code.
  10. Here is a problem if the drive is not formatted in any filesystem, then my script wont pick up the drive. I think you would have to use the diskpart to perform what you need. I have no experience at using diskpart, so I can not help you on this part of the project.
  11. I am kinda of lost as to why you want to format! In my testing with a drive that had no filesystem EG Raw Disk, the hta does not pick it up. The hta picks up only Fixed Hard drives that have a filesystem EG Fat or NTFS. If all you want to do is make sure that the drive is NTFS and not Fat then try this hta. I have tested this to see if it would work at picking up the fat drive, and asking to convert to NTFS. You will still have to add the code for formatting the drive to NTFS.
  12. Thanks Yzöwl Here is the line that is causing problems Which means that it might fail on this line also Could you run this script and post it results and also change this to test both Test One Tme.Value = Obj.InstallDate For Each Col In Split(Tme.GetVarDate, " ") Test Two Tme.Value = Obj.LastBootUpTime For Each Col In Split(Tme.GetVarDate, " ")
  13. I have tested this on Windows 7 x64 and it works. This is for people who want a simple script that gets the OS key, install date, last boot, system uptime. Save As Oskey.vbs
  14. I just tried this script on Win7 x64 and it reports the correct Key. If you are going to use WMI to read the registry you should read This Link
  15. I am going to post 2 HTA one so you can work out the format cmd. Change This To Any Drive Letter To Test This Save As DemoDriveFormat.hta Updated HTA 1:\ Wont List %SystemDrive% In Listbox 2:\ Demo Code For Formatting Only
  16. Here is what I like about HTA I have now added a self close function to it. This HTA displays a Bar Graph that counts down from 30 to Zero then closes.
  17. Change this alert("Changes successfully done") onclick=window.close() To this alert("Changes successfully done") window.close()
  18. Then Change If Obj.DriveType = 2 ThenTo this to list network drives If Obj.DriveType = 2 Or Obj.DriveType = 3 And Obj.IsReady Then
  19. Here I change the HTA and added a Listbox that collects all local hard drives Save As ProLocChange_V1.hta
×
×
  • Create New...