Content Type
Profiles
Forums
Events
Everything posted by gunsmokingman
-
Change This Act.RegWrite(A2(0),Dir) To This Act.RegWrite A2(0),Dir The only downside is that an executable is a lot larger than a script (gosh: even an "Empty" form doing nothing, compiled under Delphi is around 400kB in size) The hta which has a GUI is only 4.42 kb, I could do this in VB.net at around 100 kb or less.
-
Here try this VBS script, Inputbox to get a drive letter. Very nice of you for us (rather oldish) "script-kiddies". Since you are a programmer, why not showing it? Please post the source code AND the compiled version of an utility capable of doing this in (your choice): 1.C 2.C+ 3.C++ 4.C# 5.Delphi I would like to see this also, being that your a programmer. Here is a HTA version of the above script Save As ProLocChange.hta
-
Get Key
gunsmokingman replied to gunsmokingman's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
Cluberti provided the Reg Key paths from this VBS Script, I just used the Reg Key Path in my app. -
About cmd's 'start "" /wait' command
gunsmokingman replied to Martin H's topic in Unattended Windows 2000/XP/2003
Then explain why this cmd waits until notepad is closed before the message appears. Perhaps I have been reading this wrong, but this Cmd script from what I read should not wait for notepad to close before the message appears. That is not the case it waits until notepad closes before the message appears. @Echo OffCLSMode 55,9 Echo.Start /wait notepadCLSEcho.Echo This does not show until Notepad is closedpause -
Integrating a mp3 into Xp
gunsmokingman replied to titishor's topic in Unattended Windows 2000/XP/2003
You can also run it from Cmdline.txt Example CmdLine.txt PlayMusic.cmd -
Set pagefile in XP with vbs
gunsmokingman replied to jwall's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
Line 46 of my code is this Obj.Shutdown(6) I have listed the values that go with the shutdown method perhaps try for a forced reboot Obj.Shutdown(2 + 4) Or just an normal reboot Obj.Shutdown(2) -
Set pagefile in XP with vbs
gunsmokingman replied to jwall's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
Perhaps Try This Script To See If It Does What You Want. -
Code Repository
gunsmokingman replied to Gouki's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
Here are four examples of a HTA that self closes and displays a bar graph of the count down Code Only For Count Down Fixed Sized Bar Graph There will be a error in the text display of Demo_CountUpVaribleSizeGraph.hta Change This To This DemoHtaCountBarGraph.zip -
Yzöwl, there was a reason why I did not use the Win_32 Product to list version of net installed, it did not return any results on my computer. My script I guessed at Reg key for netframework 1 and netframework 1.1, the rest of the keys are from my Windows 7 x64. If anyone with netframework 1 or netframework 1.1 installed could post the correct key path and value that would help.
-
You could add the extra code here '-> Delete Code Here Ts.WriteLine "Deleted This Folder." & vbCrLf & Obj.PathChange to this '-> Delete Code Here Act.Run("takeown /A /f " & Chr(34) & Obj.Path & chr(34)),1,True Act.Run("icacls " & Chr(34) & Obj.Path & chr(34) & " /grant administrators:F"),1,True Ts.WriteLine "Deleted This Folder." & vbCrLf & Obj.Path
-
Scripts?
gunsmokingman replied to Monic's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
It would only be possible if you provided us with more information. -
Makecab Expand Tool
gunsmokingman replied to gunsmokingman's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
If anyone has any suggestion as to improvements please post them here -
Makecab Expand Tool
gunsmokingman replied to gunsmokingman's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
Thank you -
Makecab Expand Tool
gunsmokingman replied to gunsmokingman's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
I made this on Windows 7 so i was not thinking about the framework version. -
Code help need please.
gunsmokingman replied to Worf's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
I have updated this app and started a new Thread New App New Source Code -
Or you could try this script to take ownership of the file Save As OwnTheFile.vbs
-
I wrote up this VBS script and it should do what you want, I have it so it will just display the results. If you get the results you want I will add the cmd that you need to run. Save CheckIpRunCmd.vbs Dim Wmi :Set Wmi = GetObject("winmgmts:\\.\root\CIMV2") Dim Ip, Z1, Z2 '-> Loop To Get Local Machine IP For Each Obj in Wmi.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration") If not isNull(Obj.IPSubnet) Then If not isNull(Obj.IPAddress) Then Z1 = Join(Obj.IPAddress, ",") If Len(Z1) <= 15 Then Ip = Z1 ElseIf Len(Z1) >= 16 Then '-> Vista And Win 7 Return Ipv4 And Ipv6 This Gets Ipv4 Address Z2 = Split(Z1, ",") Ip = Z2(0) End If End If End If Next '-> Compare IP If Ip > "192.168.10.1" And Ip < "192.168.10.255" Then WScript.Echo "Confirm Ip " & Ip & vbCrLf & "Run Cmd 1" ElseIf Ip > "192.168.20.1" And Ip < "192.168.20.255" Then WScript.Echo "Confirm Ip " & Ip & vbCrLf & "Run Cmd 2" ElseIf Ip > "192.168.30.1" And "Ip" < "192.168.30.255" Then WScript.Echo "Confirm Ip " & Ip & vbCrLf & "Run Cmd 3" Else WScript.Echo "Ip Address Is Not Within Search Range" & vbCrLf & "Ip Address " & Ip End If