Author Topic: I need help in C# any guru here? :)  (Read 2168 times)

Offline Lagi

  • "Unnecessary manager of irregular transactions"
  • Honored member
  • MonsterKill Member
  • *
  • Topic Author
  • Posts: 2539
  • Country: hu
  • Karma: +226/-135
  • Awards Winner of 1 Signature of the Week Contest [COMMON] Winner of 5 Photoshop Challenge Contests [EPIC] Hacks staff member [RARE] Forum staff member [RARE] 1st place on GFX Ladder 2015 [UNIQUE] Mirana Wars Winner [RARE] Junior Tournament Member [RARE] Violinist - Music Quiz #1 [EPIC] Drummer - Music Quiz #2 [RARE] Trumpeter- Music Quiz #3 [COMMON] 2nd Place of GFX Special Event #1 [UNIQUE]
    • View Profile
    • Awards
I need help in C# any guru here? :)
« on: September 25, 2013, 19:52 »
I have a total simple program, that has 1 button, which i want to run an exe as a process, with elevated admin rights. I spent an hour by now to google out the working soultion for that, but everywhere i see the same solutions and still dont work. Help me im getting mad :D

the code:
Spoiler for Hiden:
using System;
using System.Diagnostics;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Process gcxstart = new Process();
            gcxstart.StartInfo.FileName = @"d:\test\launch.exe";
            gcxstart.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
            gcxstart.StartInfo.Verb = "runas";
            gcxstart.Start();
        }
    }
}

I have no idea why everybody can have it working with the .verb = "runas" method and mine still dont want to work.
OS: win7
Visual studio 2008 C# express edition

Please help me before i cut my veins  ::)
I know what I stand for;
I STAND FOR ME!!!

Þetta er það lengsta sem ég fer.
Aldrei aftur samur maður er.
Ljóta leiðin heillar nú á ný,
daginn sem ég lífið aftur flý.



Offline Lagi

  • "Unnecessary manager of irregular transactions"
  • Honored member
  • MonsterKill Member
  • *
  • Topic Author
  • Posts: 2539
  • Country: hu
  • Karma: +226/-135
  • Awards Winner of 1 Signature of the Week Contest [COMMON] Winner of 5 Photoshop Challenge Contests [EPIC] Hacks staff member [RARE] Forum staff member [RARE] 1st place on GFX Ladder 2015 [UNIQUE] Mirana Wars Winner [RARE] Junior Tournament Member [RARE] Violinist - Music Quiz #1 [EPIC] Drummer - Music Quiz #2 [RARE] Trumpeter- Music Quiz #3 [COMMON] 2nd Place of GFX Special Event #1 [UNIQUE]
    • View Profile
    • Awards
Re: I need help in C# any guru here? :)
« Reply #1 on: September 25, 2013, 19:58 »
I forgot to tell that no errors at building and the button works, runs the launch.exe, but not in elevated admin rights, but i must run it in admin
I know what I stand for;
I STAND FOR ME!!!

Þetta er það lengsta sem ég fer.
Aldrei aftur samur maður er.
Ljóta leiðin heillar nú á ný,
daginn sem ég lífið aftur flý.



Offline Lagi

  • "Unnecessary manager of irregular transactions"
  • Honored member
  • MonsterKill Member
  • *
  • Topic Author
  • Posts: 2539
  • Country: hu
  • Karma: +226/-135
  • Awards Winner of 1 Signature of the Week Contest [COMMON] Winner of 5 Photoshop Challenge Contests [EPIC] Hacks staff member [RARE] Forum staff member [RARE] 1st place on GFX Ladder 2015 [UNIQUE] Mirana Wars Winner [RARE] Junior Tournament Member [RARE] Violinist - Music Quiz #1 [EPIC] Drummer - Music Quiz #2 [RARE] Trumpeter- Music Quiz #3 [COMMON] 2nd Place of GFX Special Event #1 [UNIQUE]
    • View Profile
    • Awards
Re: I need help in C# any guru here? :)
« Reply #2 on: September 26, 2013, 13:23 »
Problem Solved.
I know what I stand for;
I STAND FOR ME!!!

Þetta er það lengsta sem ég fer.
Aldrei aftur samur maður er.
Ljóta leiðin heillar nú á ný,
daginn sem ég lífið aftur flý.



Offline BLOODYALBOZ

  • SHQIPE ME DY KRENA
  • Retired Moderator
  • MonsterKill Member
  • *
  • Posts: 2915
  • Country: al
  • Karma: +265/-198
  • THE BLOODY ALBOZ
  • Awards Warlock Tour Winner [RARE] Tours staff member [RARE] Pudge Wars Tournament Winner [RARE] 3v3 SHOM Tournament Winner [RARE]
    • View Profile
    • Awards
Re: I need help in C# any guru here? :)
« Reply #3 on: October 02, 2013, 01:55 »
I'm glad i helped u.

:P
I went to the gym today and forgot to post it on facebook, now whole workout was useless :'(
Quote
[1:01:14 AM] Gregory House: Then you dragged my ass
[1:00:47 AM] Gregory House: into this
[1:00:50 AM] Gregory House: :D
[1:00:56 AM] 2PAC : and look where u are now ? :P
[1:01:28 AM] Gregory House: home, al