Everything posted by gunsmokingman
-
{Batch] Find file on the CD-ROMs
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
-
{Batch] Find file on the CD-ROMs
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
-
help to IF NOT EXIST batch command
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
-
Terminal Users Count
That looks like a Powershell script, so it extension should be .ps1 and not a .vbs
-
Desktop Shortcut
You could use a VBS script to make the shortcut on the desktop using the RunOnceEx Method Save As MyUrl.vbs Example RunOnceEx Method
-
Where is the Registry Key Verification in Win7?
The VBS script I provided uses CreateObject("Microsoft.Update.Session"). Here is a Link for it some of it functions.
-
Where is the Registry Key Verification in Win7?
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
-
Want to find a folder through DOS
Here is how you would do it using VBS scripting.
-
vbs script to change documents paths do another location
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.
-
vbs script to change documents paths do another location
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.
-
Script to Change Computer Description
- Script to Change Computer Description
Here try this code and see what it does- vbs script to change documents paths do another location
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.- Get Key
gunsmokingman replied to gunsmokingman's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)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, " ")- Get Key
gunsmokingman replied to gunsmokingman's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)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- Get Key
gunsmokingman replied to gunsmokingman's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)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- vbs script to change documents paths do another location
Change This To This- vbs script to change documents paths do another location
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- vbs script to change documents paths do another location
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.- vbs script to change documents paths do another location
Post your bat files, so I can see what you are trying to do.- vbs script to change documents paths do another location
Change this alert("Changes successfully done") onclick=window.close() To this alert("Changes successfully done") window.close()- vbs script to change documents paths do another location
Windows 7 seems to be missing that feature.- vbs script to change documents paths do another location
Then Change If Obj.DriveType = 2 ThenTo this to list network drives If Obj.DriveType = 2 Or Obj.DriveType = 3 And Obj.IsReady Then- vbs script to change documents paths do another location
Here I change the HTA and added a Listbox that collects all local hard drives Save As ProLocChange_V1.hta- Get Key
gunsmokingman replied to gunsmokingman's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)This is how I do it in Vb.net - Script to Change Computer Description