Jump to content

gunsmokingman

Super Moderator
  • Posts

    2,296
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    Canada

Everything posted by gunsmokingman

  1. 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.
  2. Without knowing what type of code you are trying to run we can not help you.
  3. 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
  4. Cluberti provided the Reg Key paths from this VBS Script, I just used the Reg Key Path in my app.
  5. 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
  6. You can also run it from Cmdline.txt Example CmdLine.txt PlayMusic.cmd
  7. I dont know if this is what you want 1:\ In Microsoft visual basic 2008 express toolbar open the Project 2:\ From The Project ToolBar Select Add Reference This will open a dialog where you can add various objects to your project, from this dialog.
  8. 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)
  9. 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
  10. 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.
  11. 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
  12. Try this script, it will only list the folders in C:\Users and produce a text file with the results. Save As ListUserFolders.vbs
  13. It would only be possible if you provided us with more information.
  14. If anyone has any suggestion as to improvements please post them here
  15. I made this on Windows 7 so i was not thinking about the framework version.
  16. I have updated this app and started a new Thread New App New Source Code
  17. I have made this Vb.net app to run either Makecab or Expand, this app now displays the output of either function. New Source Code MakeCabAndExpand.exe
  18. Or you could try this script to take ownership of the file Save As OwnTheFile.vbs
  19. I was just showing how easy it was to write something up, why use a 3rd party app when a few lines of code will do.
  20. Thank you for that information, but you check which version of net with this VBS script. Save As NFWVersion.vbs
  21. Hello and welcome to MSFN
  22. 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
×
×
  • Create New...