Forum Topic Last Post
Share eMail Article To a Friend View Printable Version Subscribe to 'Dysfunktion CR3W'

su for windows, run programs in elevated mode..

Dysfunktion CR3W

Hye guys, just wanna share a simple code here. Its su for windows, just like the UNIX's su, to run any program in elevated mode. I created this to quickly run my tools under elevated mode.

 Here's the C# code. Just run it as usual,   su yourprogram parameters Have fun!!

 using System;
 using System.Collections.Generic;
 using System.Text;

 namespace su
 {
     class Program
     {
         public enum ShowCommands : int
         {
             SW_HIDE = 0,
             SW_SHOWNORMAL = 1,
             SW_NORMAL = 1,
             SW_SHOWMINIMIZED = 2,
             SW_SHOWMAXIMIZED = 3,
             SW_MAXIMIZE = 3,
             SW_SHOWNOACTIVATE = 4,
             SW_SHOW = 5,
             SW_MINIMIZE = 6,
             SW_SHOWMINNOACTIVE = 7,
             SW_SHOWNA = 8,
             SW_RESTORE = 9,
             SW_SHOWDEFAULT = 10,
             SW_FORCEMINIMIZE = 11,
             SW_MAX = 11
         }

         [System.Runtime.InteropServices.DllImport("shell32.dll")]
         static extern IntPtr ShellExecute(
             IntPtr hwnd,
             string lpOperation,
             string lpFile,
             string lpParameters,
             string lpDirectory,
             ShowCommands nShowCmd);

         static void Main(string[] args)
         {
             if (args.Length == 0) return;
             string param = "";
             for (int i = 1; i < args.Length; i++) param += args[i] + " ";
             ShellExecute(IntPtr.Zero, "runas", args[0], param, "", ShowCommands.SW_SHOWNORMAL);
         }
     }
 }

 Tag: runas elevated administrator mode su c#

Share eMail Article To a Friend View Printable Version Subscribe to 'Dysfunktion CR3W'

Malaysia Postcode Database / Viewer

Dysfunktion CR3W

hello guys, im sellin' Malaysia Postcode Database, price starting from RM50. Initial package consists of a viewer. if you want to use the database for your application, you can purchase it by adding additional RM50.

DH3C - Postcode Viewer

Check it out at https://kedai.yusri.com.my/v1

* data are currently based from Pos Malaysia
* requires Microsoft .NET Framework 4 Client Profile to run.
 

Tag: poskod postcode malaysia pos php database viewer malaysian carian posmalaysia

Share eMail Article To a Friend View Printable Version Subscribe to 'Dysfunktion CR3W'

Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime

Dysfunktion CR3W

If your application has a dependency on an assembly built in .NET 2 Framework you will see the error below if you try to run your application when it has been built in.NET 4.

Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.

I've encountered this error while using System.Data.SQLite.dll for my project. Since it was built on .Net 2 framework, it pops out the error.

To fix this, you need to add the useLegacyV2RuntimeActivationPolicy attribute to the application .CONFIG file in the same dir or your app, eg appname.exe.config. The config file should read as follows: 

<?xml version="1.0" encoding="utf-8" ?>
<configuration>

  <startup useLegacyV2RuntimeActivationPolicy="true">
            <supportedRuntime version="v4.0" />    
</startup>


  <runtime>
    <generatePublisherEvidence enabled="false" />
  </runtime>
</configuration>


Well this enables my .Net 4 application to use cross framework assemblies.

 

 

Share eMail Article To a Friend View Printable Version Subscribe to 'Dysfunktion CR3W'

Visual Studio 2010 Ultimate!

Visual Studio 2010

Well, 2 days after its official release, I have mine upgraded from Visual Studio 2010 Professional RC to Visual Studio 2010 Ultimate RTM. Hahaha why Ultimate? coz i hate limitations. Ultimate brings more functionality than professional.
 

Click to view expanded comparisons. 

Optionally you can view it from here
http://www.microsoft.com/visualstudio/en-us/productsYou can download it from here..
http://www.microsoft.com/visualstudio/en-us/download

# /boot/menu.conf

# /main/
 /home
 /mylife
 /DysfunktionCR3W
 /spaceXploration
 /life, engineered

# /interact/

 /my wishlist!
 /my travel map
 /mediagallery
 /my toolbox
 /syok shout/

# /stuff/

 /hmsecurity
 /n3wb0rn
 /slashdot
 /the broken
 /distrowatch
 /quantum computing
 /kernel

Shout Out~!

My Account





Sign up as a New User
Lost your password?


# /home/yusri/favlink

Slackware Linux
The linux distro i love!



SMK Sultan Badlishah

# /boot/boot.conf




Umbrella Corporation

# /etc/lic

License

Creative Commons License

WTFPL

Waktu Solat

#/adv


tweetshyt!