Content Type
Profiles
Forums
Events
Everything posted by gunsmokingman
-
Here try this HTA that uses vbs script to makecab files. MakeCab
-
how to make my own shell32.dll....
gunsmokingman replied to diesel_98a's topic in Wallpapers & Icons
Resource Hack the shell32.dll, use Repalcer to change the shell32.dll then run the cmd. Doing it this way means you do not have to use 3rd party apps for your icons. -
how to make my own shell32.dll....
gunsmokingman replied to diesel_98a's topic in Wallpapers & Icons
Just replace the Shell32.dl_ in the XPCD\i386 Folder Here is a cmd that will makecab the shell32.dll in %Systemdrive%\windows\system32, then checks If this folder exist %systemdrive%\ShellFiles if it not there then it makes the folder, then moves the makecab shell32.DL_ to %systemdrive%\ShellFiles -
How to get parent path in .bat?
gunsmokingman replied to Rico.JohnnY's topic in Unattended Windows 2000/XP/2003
Try this VBS script it start a cmd promt that passes the Current Directory to it. Save As ComspecTest.VBS -
Try this vbs script Save As CheckAndCopy.VBS Const OverWriteExiting = True this a varible that cannot be change threw the script, this over write the existing file in the target location Dim Var1, Var2 Varible1 = "YOUR_WHAT_EVER_HERE" Varible2 = "YOUR_WHAT_EVER_HERE" This is like the set in cmd promt.You are declairing the varibles for the script here. These can be any name you want. They can be almost any thing you want. Set Fso = CreateObject("Scripting.FileSystemObject") Set Act = CreateObject("Wscript.Shell") These are object that the script uses, they act like cmd promt various cmds eg copy, delete etc Note : For Every If there has to be a End If If Fso.FolderExists("YOUR_WHAT_EVER_HERE") Then This checks for the file or folder exists this is where the script run it cmd if true Else Act.Popup "Error Missing File Or Folder", 7,"Error Missing", 0 + 32 This is what the script does if it false Act.Popup "Completed The Copy Of" & vbcrlf & "YOUR_WHAT_EVER_HERE", 7,"Completed Copy", 0 + 32 This is a timed messagebox made with the Act object Fso.CopyFile ("YOUR_WHAT_EVER_HERE") , ("YOUR_WHAT_EVER_HERE") , OverwriteExisting Fso.CopyFolder ("YOUR_WHAT_EVER_HERE") , ("YOUR_WHAT_EVER_HERE"), OverwriteExisting The Copy Cmd for The Script
-
copy subfolders in a batch
gunsmokingman replied to eyeball's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
Here is a vbs script that will do the same thing, but it checks for the folder first is there then if it there it copies it. Note: Please note there are quotes around the "path and name " -
Here are 2 VBS script One for adding A User this also requires a password and user group. The other is to delete a User account. Notes This deletes the file comment out if you are not using SFX file Dim Fso : Set Fso = CreateObject("Scripting.FileSystemObject") If Fso.FileExists("MkLocalUserAccount.vbs") Then : Fso.DeleteFile("MkLocalUserAccount.vbs") : End If Save As MkLocalUserAccount.vbs Notes This deletes the file comment out if you are not using SFX file Dim Fso : Set Fso = CreateObject("Scripting.FileSystemObject") If Fso.FileExists("DeleteLocalUser.vbs") Then : Fso.DeleteFile("DeleteLocalUser.vbs") : End If Save As DeleteLocalUser.vbs Here is a link to a HTA that I made that can add and remove User Accounts ManageUserTool.exe DeleteLocalUser.exe MkLocalUserAccount.exe
-
If Statements in a script
gunsmokingman replied to eyeball's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
This VBS script check for TFile, this would be the Path and File name varible. If The Tfile is found it has a message box that popups up and confirms the Tfile it will then start the copy of the file. If it not there then it will popup a error message. -
I do not know if this will work since I do not have a pen drive. This is a VBS that uses the FileScriptingObject to list the drives Save As Whatever.VBS This color text are for either the file or folder you want copy remove all 4 of these '''' to make active. These check to see if they exists This color text is where you add your own to go locations and file or folder for target Example Where the file or folder goes to EndLoc = "C:\SOMEFOLDER\NEXTFOLDER This is for the drive letter Example File Target = "SOMEFILE.EXE" In the script this tranlates to Drv & "\SOMEFILE.EXE" Example Folder Target = "\FOLDER_001\FOLDER_002" In the script this tranlates to Drv & "\FOLDER_001\FOLDER_002"
-
Reading SID from registry
gunsmokingman replied to HPeron's topic in Unattended Windows 2000/XP/2003
Here a VBS script that makes a text file with all the user accounts info. Save As UserAccountInfo.VBS Dim Act, Fso, Break, Ts, VarLoc, S_5 : S_5 = Space(5) : strComputer = "." Set Act = CreateObject("Wscript.Shell") Set Fso = CreateObject("Scripting.FileSystemObject") Break = Chr(171)& "-----------------------------------------"& Chr(187) With Act VarLoc = Array(.ExpandEnvironmentStrings("%USERPROFILE%\Desktop"),.CurrentDirectory,_ .ExpandEnvironmentStrings("%UserName%"),.ExpandEnvironmentStrings("%USERPROFILE%\Desktop\AccountReport.txt")) End With Set Ts = Fso.CreateTextFile(VarLoc(3)) Ts.WriteLine S_5 & Date() & " < ----- > " & Time() & " < ----- > " &_ "User Running The script : " & VarLoc(2) & vbCrLf & S_5 & "Script Ran From : " & VarLoc(1) & vbCrLf & S_5 & Break Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colItems = objWMIService.ExecQuery("Select * from Win32_UserAccount Where LocalAccount = True") For Each objItem in colItems Ts.WriteLine S_5 & "Account Type: " & objItem.AccountType & vbCrLf & S_5 & "Caption: " & objItem.Caption Ts.WriteLine S_5 & "Description: " & objItem.Description & vbCrLf & S_5 & "Disabled: " & objItem.Disabled Ts.WriteLine S_5 & "Domain: " & objItem.Domain & vbCrLf & S_5 & "Full Name: " & objItem.FullName Ts.WriteLine S_5 & "Local Account: " & objItem.LocalAccount & vbCrLf & S_5 & "Lockout: " & objItem.Lockout Ts.WriteLine S_5 & "Name: " & objItem.Name & vbCrLf & S_5 & "Password Changeable: " & objItem.PasswordChangeable Ts.WriteLine S_5 & "Password Expires: " & objItem.PasswordExpires Ts.WriteLine S_5 & "Password Required: " & objItem.PasswordRequired Ts.WriteLine S_5 & "SID: " & objItem.SID & vbCrLf & S_5 & "SID Type: " & objItem.SIDType Ts.WriteLine S_5 & "Status: " & objItem.Status & vbCrLf & S_5 & Break Next Ts.Close Act.Run(Chr(34) & VarLoc(3) & Chr(34)) -
Are you online at T-12?
gunsmokingman replied to BoardBabe's topic in Unattended Windows 2000/XP/2003
Start this cmd from cmdlines.txt it will open msfn main page at the time the cmdlines.txt is process. -
batch cleanup question
gunsmokingman replied to tkmadison's topic in Unattended Windows 2000/XP/2003
This will run the cleanup.cmd after you have finished installing app and have rebooted. Ok, so if I have a small batch at the end of my ROE that is simply a reboot command, I can add this code as is and it will add my cleanup.cmd to ROE? Sounds good. I'll have to give it a try. As long as you have the cmd in this location %systemdrive%\Install\cleanup.cmd then it will run after the reboot -
Add new users via batch
gunsmokingman replied to reganetal's topic in Unattended Windows 2000/XP/2003
Read this thread it may help you User Account Thread Batch -
batch cleanup question
gunsmokingman replied to tkmadison's topic in Unattended Windows 2000/XP/2003
Try this add this to the end of your RunOnceEx.cmd This will run the cleanup.cmd after you have finished installing app and have rebooted. -
copy shortcut to quick launch fails?
gunsmokingman replied to hamohd70's topic in Unattended Windows 2000/XP/2003
Here is a example vbs script that copies to the quick launch. 1:\ Make A Text File 2:\ Copies The Text File To Quick Launch 3:\ Checks To See if It Copy to Quick Launch 4:\ Run The Made Text File If It Found If Not Found A Message Box Will Appear. 5:\ It Then Check For The Text Files Then delets the text files. Save This As WHATEVER_YOU_WANT.VBS Here Is A 2 Line VBS File That Copies To The Quick Launch Then It Deletes The Source Files. Save File As COPY_WHATEVER.VBS This Text Color Is The Name Of File To Copy Replace With Your File Name. This Is Set To Run In The Same Directory. You Can Add A Full Path to The file Also Exaple C:\Install\MyShortcuts\Name_Of_File -
Change Administrator password
gunsmokingman replied to bujo696's topic in Unattended Windows 2000/XP/2003
Here is a simple VBS Script That changes the user who is log on pass word. Save as ChangePassWord.Vbs This is a HTA that uses VBS script to change the pass word this looks a lot better but the code is longer. Save As ChangePassWord.hta I included the HTA I made in to a SFX file. ChangePassWord.exe -
Set Auto Arrange icons on the desktop
gunsmokingman replied to crestj's topic in Unattended Windows 2000/XP/2003
This is a script some else used to sort the desktop icons. -
No I just wrote that script up.
-
Here is a VBS script that will run your batch completly hidden. Save As WHATEVER_YOU_WANT.Vbs
-
Do you have a cmdlines.txt file in you %OEM% folder. That used at the 12 min mark. My cmdlines.txt
-
[Q] How to run a .cmd from html?
gunsmokingman replied to esp's topic in Unattended Windows 2000/XP/2003
You could instead of HTML make it a HTA instead as this will run commands. This HTA uses Jscript and VBS Script to run it functions This is a HTA that has 6 Radio Buttons that runs winamp this uses Jscript. The Exit button is VBS script it deletes the hta in %systemdrive%\Winamp_Radio.HTA if it exists then it taskkill Mshta.exe Save As Winamp_Radio.HTA I haved added this a SFX file. -
Installing autosort.vbs?
gunsmokingman replied to DaRKNeSS666NL's topic in Unattended Windows 2000/XP/2003
No I was using the text file that you posted. That was using C:\ I change that to a varible AppData, this allows the drive to be either D:, E:\ etc plus I added a clean up part to the script. I aslo notice that the sleep was at the end of the run command which on my machine will not run like that. This part is the varible Appdata, this will always pass the drive and User name back to the script.