Skip to content
View in the app

A better way to browse. Learn more.

WRobot

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Possible to change process name of attached WoW process?

Featured Replies

Hello, it's not possible to change the process name(on runtime => you can retaliate at msdn documentation) and you must specify which IntPtr do you mean:

There are several IntPtr which you can get from the process but i belive you want the mainwindowhandle? or you can explain for what the IntPtr is needed.

 

Edit: forgot to write that you can change the process name by simply rename wow.exe but it will doesn't affect the process name while it's running:

Logging.Write(wManager.Wow.Memory.WowMemory.Memory.GetProcess().ProcessName);

 

  • Author
2 hours ago, reapler said:

Hello, it's not possible to change the process name(on runtime => you can retaliate at msdn documentation) and you must specify which IntPtr do you mean:

There are several IntPtr which you can get from the process but i belive you want the mainwindowhandle? or you can explain for what the IntPtr is needed.

 

Edit: forgot to write that you can change the process name by simply rename wow.exe but it will doesn't affect the process name while it's running:


Logging.Write(wManager.Wow.Memory.WowMemory.Memory.GetProcess().ProcessName);

 

I need to change the process name and I can do it via 

 

[DllImport("user32.dll")]
 static extern void SetWindowText(IntPtr hWnd, string windowName);

 

But I need to get the main window handle.. Also, wManger.WoW.Memory.WoWMemory.Memory.. no GetProcess exists, only serialize

So, i wrote a method which works (at least for me):

        [DllImport("user32.dll")]
        static extern bool SetWindowText(IntPtr hWnd, string text);
        public void SetText(string processname, string text)
        {
            IntPtr mainWindowHandle = IntPtr.Zero;
            foreach (var obj in System.Diagnostics.Process.GetProcesses())
            {
                //or you can search for other parameter / characteristics which wow contains but searching for processname is normaly enough
                if (obj.ProcessName == processname)// => in my case the executable in my wow folder is Wow.exe
                {
                    Logging.Write("Process found: " + obj.ProcessName + "[" + obj.Id + "].");
                    mainWindowHandle = obj.MainWindowHandle;
                    break;
                }
            }
            if (mainWindowHandle != IntPtr.Zero)
            {
                SetWindowText(mainWindowHandle, text);
            }
            else
            {
                Logging.Write("No process with the name '" +processname+"' was found.\nPlease check your executable's name.");
            }
        }

usage:

SetText("Wow","Hello World!");

 

 

but remember:

processname != windowtext => the field "ProcessName" is read only so it can't be changed on running processes. If you really want to change the process' name, you can only influence it on startup or by creating a new process.

 

 

Edit: this one gets the right one, if several processes exist:

        [DllImport("user32.dll")]
        static extern bool SetWindowText(IntPtr hWnd, string text);
        public void SetText(string processname, string text)
        {
            IntPtr mainWindowHandle = IntPtr.Zero;
            foreach (var obj in System.Diagnostics.Process.GetProcesses())
            {
                if (obj.ProcessName == processname)// => in my case the executable in my wow folder is Wow.exe
                {
                    if (wManager.Wow.Memory.PlayerName(obj.Id) == wManager.Wow.ObjectManager.ObjectManager.Me.Name)
                    {
                        Logging.Write("Process found: " + obj.ProcessName + "[" + obj.Id + "][" + wManager.Wow.ObjectManager.ObjectManager.Me.Name+ "]");
                        mainWindowHandle = obj.MainWindowHandle;
                        break;
                    }
                }
            }
            if (mainWindowHandle != IntPtr.Zero)
            {
                SetWindowText(mainWindowHandle, text);
            }
            else
            {
                Logging.Write("No process with the name '" +processname+"' was found.\nPlease check your executable's name.");
            }
        }

 

  • Author
1 hour ago, reapler said:

So, i wrote a method which works (at least for me):


        [DllImport("user32.dll")]
        static extern bool SetWindowText(IntPtr hWnd, string text);
        public void SetText(string processname, string text)
        {
            IntPtr mainWindowHandle = IntPtr.Zero;
            foreach (var obj in System.Diagnostics.Process.GetProcesses())
            {
                //or you can search for other parameter / characteristics which wow contains but searching for processname is normaly enough
                if (obj.ProcessName == processname)// => in my case the executable in my wow folder is Wow.exe
                {
                    Logging.Write("Process found: " + obj.ProcessName + "[" + obj.Id + "].");
                    mainWindowHandle = obj.MainWindowHandle;
                    break;
                }
            }
            if (mainWindowHandle != IntPtr.Zero)
            {
                SetWindowText(mainWindowHandle, text);
            }
            else
            {
                Logging.Write("No process with the name '" +processname+"' was found.\nPlease check your executable's name.");
            }
        }

usage:


SetText("Wow","Hello World!");

 

 

but remember:

processname != windowtext => the field "ProcessName" is read only so it can't be changed on running processes. If you really want to change the process' name, you can only influence it on startup or by creating a new process.

 

 

Edit: this one gets the right one, if several processes exist:


        [DllImport("user32.dll")]
        static extern bool SetWindowText(IntPtr hWnd, string text);
        public void SetText(string processname, string text)
        {
            IntPtr mainWindowHandle = IntPtr.Zero;
            foreach (var obj in System.Diagnostics.Process.GetProcesses())
            {
                if (obj.ProcessName == processname)// => in my case the executable in my wow folder is Wow.exe
                {
                    if (wManager.Wow.Memory.PlayerName(obj.Id) == wManager.Wow.ObjectManager.ObjectManager.Me.Name)
                    {
                        Logging.Write("Process found: " + obj.ProcessName + "[" + obj.Id + "][" + wManager.Wow.ObjectManager.ObjectManager.Me.Name+ "]");
                        mainWindowHandle = obj.MainWindowHandle;
                        break;
                    }
                }
            }
            if (mainWindowHandle != IntPtr.Zero)
            {
                SetWindowText(mainWindowHandle, text);
            }
            else
            {
                Logging.Write("No process with the name '" +processname+"' was found.\nPlease check your executable's name.");
            }
        }

 

Thanks, I'll test later when Im available.  The second method is exactly what I'm looking for!

 

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.