Content Type
Profiles
Forums
Events
Everything posted by gunsmokingman
-
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
-
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
-
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
gunsmokingman replied to bbbngowc's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
That looks like a Powershell script, so it extension should be .ps1 and not a .vbs -
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?
gunsmokingman replied to didadocom's topic in Windows 7
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?
gunsmokingman replied to didadocom's topic in Windows 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 -
Here is how you would do it using VBS scripting.
-
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 -
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