elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.


Tema destacado: Estamos en la red social de Mastodon


  Mostrar Mensajes
Páginas: 1 ... 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 [869] 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 ... 1254
8681  Programación / Scripting / Re: [batch]no me funciona porque razones en: 21 Julio 2013, 02:52 am
· No estás usando la sintaxis correcta:

Código
  1. choice /B /C:1234 /N /S Mensaje
http://help.fdos.org/en/hhstndrd/batch/choice.htm

· Los errorlevel son numéricos, no letras.
Por ejemplo, al apretar la "X" será errorlevel "21".


Corrige la sintaxis del comando, elimina toda esta cantidad de condicionales además del goto:

Código
  1. goto lista

...Y simplifícalo por esto:
Código
  1. GOTO :%ERORLEVEL%

Saludos
8682  Programación / .NET (C#, VB.NET, ASP) / Re: Necesito que alguien me compile un proyecto de C# en: 21 Julio 2013, 02:34 am
¿Por qué no usas la que figura en la descarga de ese mismo post?

¿¡ Te puedes creer que me he leido las instrucciones como 10 veces... y no habia leido esa maldita url de descarga !?  >:D
...De todas formas el artículo es del año 2010, es una versión un poco obsoleta :P.

Ahora me sabe mal el doble esfuero que has hecho jeje, muchas gracias por darte cuenta de eso y por compilarlo NovLucker.

Por fin puedo usar esta lib en x64...

Saludos!
8683  Programación / .NET (C#, VB.NET, ASP) / Re: "Acceso denegado al Registro solicitado." (System.Security.Security.Exception) en: 21 Julio 2013, 02:20 am
A pesar de tus esfuerzos el segundo código a mi no me funciona, me da el mismo error que comentas en el primer código.

He probado decenas de códigos, he estudiado un poco sobre RegistryKeyPermissionCheck ,RegistryRights ,SetAccessControl ,RegistryAccessRule , y RegistryKey

Incluso he probado un código koreano!... pero nada ha valido la pena, parece algo de locos intentar modificar los permisos de una clave en .NET, Google no tiene la respuesta.

A mi me habría gustado solucionar tu problema porque también me serviría para mi en un futuro, pero parece muy dificil conseguirlo, así que quizás quieras mirar esta alternativa que hice:
-> http://foro.elhacker.net/net/libreria_de_snippets_posteen_aqui_sus_snippets-t378770.0.html;msg1872406#msg1872406

Saludos.
8684  Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets !! (Posteen aquí sus snippets) en: 21 Julio 2013, 02:15 am
No apruebo el uso de aplicaciones commandline a menos que sea para situaciones complicadas y tediosas como esta...

...Una class para usar SETACL para modificar el propietario de una clave de registro y para modificar los permisos de la clave:

PD: a ver si alguien nos sorprende con un código nativo...  :silbar:

Código
  1. #Region " SETACL Helper "
  2.  
  3.  
  4. ' [ SETACL Helper ]
  5. '
  6. ' // By Elektro H@cker
  7. '
  8. '
  9. ' INSTRUCTIONS:
  10. ' 1. Add the "SETACL.exe" in the project.
  11. '
  12. ' Examples :
  13. '
  14. ' SETACL.Set_Owner("HKCU\Test", True)
  15. ' SETACL.Set_Permission("HKCU\Test\", SETACL.SETACL_Permission.full, False)
  16.  
  17.  
  18. Public Class SETACL
  19.  
  20.    ' <summary>
  21.    ' Gets or sets the SETACL executable path.
  22.    ' </summary>
  23.    Public Shared SETACL_Location As String = ".\SetACL.exe"
  24.  
  25.    ' <summary>
  26.    ' Gets or sets the SETACL logfile filename.
  27.    ' </summary>
  28.    Public Shared SETACL_Logfile As String = ".\SetACL.log"
  29.  
  30.  
  31.    Public Enum SETACL_Permission
  32.  
  33.        ' <summary>
  34.        ' Create link
  35.        ' </summary>
  36.        create_link
  37.  
  38.        ' <summary>
  39.        ' Create subkeys
  40.        ' </summary>
  41.        create_subkey
  42.  
  43.        ' <summary>
  44.        ' Delete
  45.        ' </summary>
  46.        delete
  47.  
  48.        ' <summary>
  49.        ' Enumerate subkeys
  50.        ' </summary>
  51.        enum_subkeys
  52.  
  53.        ' <summary>
  54.        ' Notify
  55.        ' </summary>
  56.        notify
  57.  
  58.        ' <summary>
  59.        ' Query value
  60.        ' </summary>
  61.        query_val
  62.  
  63.        ' <summary>
  64.        ' Read control
  65.        ' </summary>
  66.        read_access
  67.  
  68.        ' <summary>
  69.        ' Set value
  70.        ' </summary>
  71.        set_val
  72.  
  73.        ' <summary>
  74.        ' Write permissions
  75.        ' </summary>
  76.        write_dacl
  77.  
  78.        ' <summary>
  79.        ' Take ownership
  80.        ' </summary>
  81.        write_owner
  82.  
  83.  
  84.        ' <summary>
  85.        ' Read (KEY_ENUMERATE_SUB_KEYS + KEY_EXECUTE + KEY_NOTIFY + KEY_QUERY_VALUE + KEY_READ + READ_CONTROL)
  86.        ' </summary>
  87.        read
  88.  
  89.        ' <summary>
  90.        ' Full access
  91.        ' (KEY_CREATE_LINK + KEY_CREATE_SUB_KEY +KEY_ENUMERATE_SUB_KEYS + ...
  92.        ' ...KEY_EXECUTE + KEY_NOTIFY + KEY_QUERY_VALUE + KEY_READ + KEY_SET_VALUE + ...
  93.        ' ...KEY_WRITE + READ_CONTROL + WRITE_OWNER + WRITE_DAC + DELETE)
  94.        ' </summary>
  95.        full
  96.  
  97.    End Enum
  98.  
  99.    ' <summary>
  100.    ' Checks if SETACL process is avaliable.
  101.    ' </summary>
  102.    Public Shared Function Is_Avaliable() As Boolean
  103.        Return IO.File.Exists(SETACL_Location)
  104.    End Function
  105.  
  106.    ' <summary>
  107.    ' Takes ownership of a registry key.
  108.    ' </summary>
  109.    Public Shared Sub Set_Owner(ByVal RegKey As String, ByVal Recursive As Boolean, Optional ByVal UserName As String = "%USERNAME%")
  110.  
  111.        If RegKey.EndsWith("\") Then RegKey = RegKey.Substring(0, RegKey.Length - 1)
  112.  
  113.        Dim Recursion As String = "No" : If Recursive Then Recursion = "Yes"
  114.  
  115.        Dim SETACL As New Process(), SETACL_Info As New ProcessStartInfo()
  116.  
  117.        SETACL_Info.FileName = SETACL_Location
  118.        SETACL_Info.Arguments = String.Format("-on ""{0}"" -ot reg -ownr ""n:{1}"" -rec ""{2}"" -actn setowner -silent -ignoreerr -log ""{3}""", RegKey, UserName, Recursion, SETACL_Logfile)
  119.        SETACL_Info.CreateNoWindow = True
  120.        SETACL_Info.UseShellExecute = False
  121.        SETACL.StartInfo = SETACL_Info
  122.        SETACL.Start()
  123.        SETACL.WaitForExit()
  124.  
  125.        If SETACL.ExitCode <> 0 Then
  126.            ' Throw New Exception("Exit code: " & SETACL.ExitCode)
  127.            MsgBox(IO.File.ReadAllText(SETACL_Logfile))
  128.        End If
  129.  
  130.    End Sub
  131.  
  132.    ' <summary>
  133.    ' Sets the user permission of a registry key.
  134.    ' </summary>
  135.    Public Shared Sub Set_Permission(ByVal RegKey As String, ByVal Permission As SETACL_Permission, ByVal Recursive As Boolean, Optional ByVal UserName As String = "%USERNAME%")
  136.  
  137.        If RegKey.EndsWith("\") Then RegKey = RegKey.Substring(0, RegKey.Length - 1)
  138.  
  139.        Dim Recursion As String = "No" : If Recursive Then Recursion = "Yes"
  140.  
  141.        Dim SETACL As New Process(), SETACL_Info As New ProcessStartInfo()
  142.  
  143.        SETACL_Info.FileName = SETACL_Location
  144.        SETACL_Info.Arguments = String.Format("-on ""{0}"" -ot reg -ace ""n:{1};p:{2}"" -rec ""{3}"" -actn ace -silent -ignoreerr -log ""{4}""", RegKey, UserName, Permission, Recursion, SETACL_Logfile)
  145.        SETACL_Info.CreateNoWindow = True
  146.        SETACL_Info.UseShellExecute = False
  147.        SETACL.StartInfo = SETACL_Info
  148.        SETACL.Start()
  149.        SETACL.WaitForExit()
  150.  
  151.        If SETACL.ExitCode <> 0 Then
  152.            ' Throw New Exception("Exit code: " & SETACL.ExitCode)
  153.            MsgBox(IO.File.ReadAllText(SETACL_Logfile))
  154.        End If
  155.  
  156.    End Sub
  157.  
  158. End Class
  159.  
  160. #End Region
8685  Programación / .NET (C#, VB.NET, ASP) / Re: Necesito que alguien me compile un proyecto de C# en: 20 Julio 2013, 17:20 pm
Todavía nadie ha podido compilar el proyecto para "anycpu" y "x64"... si hay alguien que quiera colaborar... please.
8686  Programación / .NET (C#, VB.NET, ASP) / Re: Necesito que alguien me compile un proyecto de C# en: 20 Julio 2013, 16:03 pm
Gracias por intentarlo omarhack, me voy a conectar ahora, no se si estarás,
ya hablamos...
8687  Programación / .NET (C#, VB.NET, ASP) / Re: Necesito que alguien me compile un proyecto de C# en: 20 Julio 2013, 14:16 pm
voy a intentarlo a veeer :P

a ver a veeeeer  >:D
8688  Programación / .NET (C#, VB.NET, ASP) / Re: Necesito que alguien me compile un proyecto de C# en: 20 Julio 2013, 12:09 pm
Me generas mucho spam xDDD pero sabes que agradezco la intención ;)
8689  Programación / .NET (C#, VB.NET, ASP) / Re: Necesito que alguien me compile un proyecto de C# en: 20 Julio 2013, 11:37 am
se puede ejecutar C++/C en VS2012?

http://msdn.microsoft.com/en-us/library/vstudio/hh409293.aspx

Saludos...
8690  Programación / .NET (C#, VB.NET, ASP) / Re: Necesito que alguien me compile un proyecto de C# en: 20 Julio 2013, 11:31 am
Tu usas el mismo VS2012 que yo, creo... A mi si se me abren ya que se me compilen es otra cosa... :xD

Si usaste mi instalador con las opciones por defecto entonces vas a ser incapaz de abrir un proyecto donde se maneje C/C++ ya que hay que elegir esos paquetes manualmente en el instalador (si se quieren instalar), en cambio los proyectos CSharp puro si que puedes abrirlos y además compilarlos.
Páginas: 1 ... 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 [869] 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 ... 1254
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines