Jump to content
Sign in to follow this  
JScript

Windows (Funções para o Sistema Operacional.)

Recommended Posts

Windows (Funções para o Sistema Operacional.)

 

Conteúdo

  • Linha de comando (CmdLine)
  • Arquivos e pastas
  • Registro (Regedit)
  • Informações do sistema
  • Configurações do SO
  • Gerencimento de contas do SO
  • Like 1

Share this post


Link to post
Share on other sites

_GetDefBrowser

; Check to see which browser is the default.

MsgBox(4096, "Default browser", "My default browser is: " & _GetDefBrowser())

Func _GetDefBrowser()
Local $sRegRead = RegRead("HKCR\http\shell\open\command", "")
Return StringRegExpReplace($sRegRead, "(.*?\x22)(.*?[\\/])*(.*?)(\x22.*?\z)", "$3") ; << Credits to SmOke_N
EndFunc ;==>_GetDefBrowser
  • Like 1

Share this post


Link to post
Share on other sites

_TruncatePath

[autoit];Author: JScript - Snippet Version No. = 1.0

;Snippet was Created Using AutoIt Version = 3.3.8.1, Creation Date = 22/05/12.

 

ConsoleWrite("The truncated path: " & _TruncatePath(@SystemDir & "\Config\ProFiles", 140) & @CRLF)

 

Func _TruncatePath($sPath, $iValue)

Local $sRet = DllCall("Shlwapi.dll", "BOOL", "PathCompactPath", "int", 0, "str", $sPath, "uint", $iValue)

Return $sRet[2]

EndFunc ;==>_TruncatePath[/autoit]

Share this post


Link to post
Share on other sites
_CipherEncriptDecript
;Author: Belini- Snippet Version No. = 1.0
;Snippet was Created Using AutoIt Version = 3.3.9.2, Creation Date = 10/12/12.

#include <Process.au3>

If Not FileExists(@ScriptDir & '\PASTA TESTE') Then DirCreate(@ScriptDir & '\PASTA TESTE')

_CipherEncriptDecript(@ScriptDir & '\PASTA TESTE', "E"); "E" encripta "D" decripta

Func _CipherEncriptDecript($file = "", $opt = "E")
	Local $Comando

	If $opt = "E" Then
		$Comando = "cipher /E " & StringReplace($file, " ", '" "') ; Encripta.
		_RunDos($Comando)
	Else
		$Comando = "cipher /D " & StringReplace($file, " ", '" "') ; Decripta.
		_RunDos($Comando)
	EndIf
EndFunc   ;==>_CipherEncriptDecript
  • Like 1

Share this post


Link to post
Share on other sites
Sign in to follow this  

×