• 0

Warming up: simple .exe file


Question

Hey guys, I haven't programmed in VB in over a decade and I know a ton has changed. So I'll keep it simple.

 

I still play a game Ghost Recon Advanced Warfighter (GRAW) which came out in 2005.

 

I use a mod for the game named Brettzies Weapons pack 6.0 for GRAW (2005) and then GRAW2 (2007) brettzies weapon pack is 3.02. 

 

Here's the path to the required .bat file C:\Program Files (x86)\Ubisoft\Ghost Recon Advanced Warfighter and C:\Program Files (x86)\Ubisoft\Ghost Recon Advanced Warfighter 2

 

I hope what I want to do is simple. I know days of old a "shell" command would be used to start a program or in today's terms: an application. I'd like to create a simple application that will run the file "bp_weapons_pack_v6.0.bat" which will do this;

file: bp_weapons_pack_v6.0..bat 

graw.exe -o context_bp_weapons_pack_v6.0.xml  (the -o tells GRAW.exe to run the modified .xml file "context_bp_weapons_pack_v6.0.xml

 

can one start a program from an xml file? the .bat file tells GRAW.exe to read/use the bp_weapons_pack_v6.0.xml and it will incorporate the weapon models into GRAW to play the game.

 

Q: What syntax in today's VB (express) is/are used to start external applications? my old mind remembers to create a string

 

Maybe.. DIM GRAW As String or Integer....

 

then I recall faintly Shell calls. Does this -> still apply in shell calls?

 

Q: Why Do I want to do this? because I hate having to open the folder and dbl-click the .bat file everytime I want to use it. that and I'd like to pin the new .exe file/shortcut to my taskbar and start it from my taskbar.

 

I think it might be a simple task but with me, nothing is EVER easy sometimes. :D (yeah, I find that life is easier when I can laugh at myself).

 

Regards,

Chrisj1968

 

 

 

Link to comment
https://www.neowin.net/forum/topic/1303492-warming-up-simple-exe-file/
Share on other sites

23 answers to this question

Recommended Posts

  • 0

ok, the game (modded) runs from the .bat file which tells GRAW which .xml file to use. a lot like switches in games of old like (halflife.exe -devmode -god...)

 

so it has to be something I can execute.. I can't pin a .bat file to my taskbar.. I tried.

  • 0
10 minutes ago, chrisj1968 said:

...

 

 

 

Process.Start("<filename>", "<arguments>")

 

So

 

Process.Start("graw.exe", "-o context_bp_weapons_pack_v6.0.xml")

 

You can find a full example on the MSDN web site about the Process class here:

https://msdn.microsoft.com/en-us/library/system.diagnostics.process(v=vs.110).aspx?cs-save-lang=1&cs-lang=vb#code-snippet-3

  • 0
Just now, virtorio said:

Process.Start("<filename>", "<arguments>")

 

So

 

Process.Start("graw.exe", "-o context_bp_weapons_pack_v6.0.xml")

 

You can find a full example on the MSDN web site about the Process class here:

https://msdn.microsoft.com/en-us/library/system.diagnostics.process(v=vs.110).aspx?cs-save-lang=1&cs-lang=vb#code-snippet-3

that's MUCH simpler than the old days!  Virtorio, if you're ever in the Reno Area, hit me up, the family and I will treat you to Dinner on me.

  • 0
9 minutes ago, virtorio said:

Process.Start("<filename>", "<arguments>")

 

So

 

Process.Start("graw.exe", "-o context_bp_weapons_pack_v6.0.xml")

 

You can find a full example on the MSDN web site about the Process class here:

https://msdn.microsoft.com/en-us/library/system.diagnostics.process(v=vs.110).aspx?cs-save-lang=1&cs-lang=vb#code-snippet-3

Didn't even think about this.

  • 0
2 minutes ago, BinaryData said:

Didn't even think about this.

no worries. you've always have been cool about helping people around here. I'm getting a win32 error in VB but I'm determined to get this working. it compiles fine, I'm missing something so I'll read that link Vitorio gave me.

  • 0
17 minutes ago, chrisj1968 said:

no worries. you've always have been cool about helping people around here. I'm getting a win32 error in VB but I'm determined to get this working. it compiles fine, I'm missing something so I'll read that link Vitorio gave me.

Feel free to post details about the error here. If the output executable is not placed in the games install folder, you will need to provide the full path to the executable, e.g:

 

Process.Start("C:\Program Files (x86)\Ubisoft\Ghost Recon Advanced Warfighter\graw.exe", "-o context_bp_weapons_pack_v6.0.xml")

 

Depending on how the game looks for files you may need to set the "working directory" to the games install folder, for which there is an easy way and a slightly more difficult way.

  • 0
2 minutes ago, virtorio said:

Feel free to post details about the error here. If the output executable is not placed in the games install folder, you will need to provide the full path to the executable, e.g:

 

Process.Start("C:\Program Files (x86)\Ubisoft\Ghost Recon Advanced Warfighter\graw.exe", "-o context_bp_weapons_pack_v6.0.xml")

 

Depending on how the game looks for files you may also set the "working directory" to the games install folder, for which there is an easy way and a slightly more difficult way.

I figured it out. If I created the app to use a button click, I had a ton of work to do and waste. So  I put the code on the form1.form and it boots automatically. I tried to put an Exit in there but it gave me an error.

 

I'm taking baby steps here but it works. I need to create an icon for it. here's the code. I'm relearning to put in comments for easier reading of code reading. good programmers, I remember live by it.

 

App_code.png

Now to pretty it up. I'll give it an Icon and possibly look into adding a check box to run modded or unmodded later

  • 0
13 minutes ago, chrisj1968 said:

I figured it out. If I created the app to use a button click, I had a ton of work to do and waste. So  I put the code on the form1.form and it boots automatically. I tried to put an Exit in there but it gave me an error.

 

I'm taking baby steps here but it works. I need to create an icon for it. here's the code. I'm relearning to put in comments for easier reading of code reading. good programmers, I remember live by it.

 

App_code.png

Now to pretty it up. I'll give it an Icon and possibly look into adding a check box to run modded or unmodded later

Could do an if statement with a check box, if box = check then blah blah else run blah blah. OR just a simple window "Normal Mode: Run!" below it would be "Modded Mode: Run!" and it would run the modded version. I haven't touched vb.net since 2007. I'm learning more of C++ but that's slow going.

  • 0

You don't need to create a program at all. 

Quote
  1. Create a shortcut to your batch file.
  2. Get into shortcut property and change target to something like: cmd.exe /C "path-to-your-batch".
  3. Simply drag your new shortcut to the taskbar. It should now be pinnable.
    http://superuser.com/questions/100249/how-to-pin-either-a-shortcut-or-a-batch-file-to-the-new-windows-7-8-and-10-task

 

 

  • 0
2 hours ago, Andre S. said:

You don't need to create a program at all. 

 

I believe you. I want to get back into programming. so I figured a simple .exe would be a good start. I haven't touched VB since around VB 4 (my age is showing right?). But I Downloaded VB Express 2015 last night and fired it up. I used to teach myself how to create simple databases. Created one that I could catalog all my DVD's in the late 1990's. 

  • 0
9 hours ago, BinaryData said:

Could do an if statement with a check box, if box = check then blah blah else run blah blah. OR just a simple window "Normal Mode: Run!" below it would be "Modded Mode: Run!" and it would run the modded version. I haven't touched vb.net since 2007. I'm learning more of C++ but that's slow going.

Geez, I didn't mean to fry your brain in the middle of learning C++. I might have to learn that language instead. I've heard it's extremely powerful, more so than VB.

  • 0
34 minutes ago, chrisj1968 said:

Geez, I didn't mean to fry your brain in the middle of learning C++. I might have to learn that language instead. I've heard it's extremely powerful, more so than VB.

It depends what's meant by powerful. Both languages have a different purpose. In a broad sence you could say that Ii you need to do low level or system programming, or you want to manage memory yourself, C++ will most likely be better for the job. For other types of applications, the .NET framework provides a rich set of libraries that allow you to write more with less code. This is however a very broad comparison. There is much more to take into consideration, more than I know about :) 

  • 0
Just now, Raphaël G. said:

It depends what's meant by powerful. Both languages have a different purpose. In a broad sence you could say that Ii you need to do low level or system programming, or you want to manage memory yourself, C++ will most likely be better for the job. For other types of applications, the .NET framework provides a rich set of libraries that allow you to write more with less code. This is however a very broad comparison. There is much more to take into consideration, more than I know about :) 

Agreed.

 

@chrisj1968

I've found that C++ is oriented towards more complex and large projects, while VB.Net has been better suited for smaller scale applications. Each language can be used for large or small, all depends on the project. We'll take creating a game for instance. Let's look at World of Warcraft. Yes, it can be developed in VB .Net, but will that suit it best? Probably not. That's where C++ or Assembly comes into play. You could look at Photoshop as another example. I've always found VB .Net to be the perfect tool creation language. It's easy, and straight to the point, while C++ you have to monkey with UI code, perfecting that, and THEN getting your core code in place.

  • 0

Question: I just had an epiphany. while on simple programming, I have a daughter who is on the PC too long. my idea, why can't I create an app that allows me to establish a set time of use, an hour or two and then loggoff automatically. have it run in the background and automatically logoff.

 

what would be a best route approach to this? I'd like to use a simplified way by using the system time feature within Windows 10.

  • 0
12 minutes ago, chrisj1968 said:

Question: I just had an epiphany. while on simple programming, I have a daughter who is on the PC too long. my idea, why can't I create an app that allows me to establish a set time of use, an hour or two and then loggoff automatically. have it run in the background and automatically logoff.

 

what would be a best route approach to this? I'd like to use a simplified way by using the system time feature within Windows 10.

Setup Family Safety. No need to reinvent the wheel.

  • 0
14 minutes ago, chrisj1968 said:

Question: I just had an epiphany. while on simple programming, I have a daughter who is on the PC too long. my idea, why can't I create an app that allows me to establish a set time of use, an hour or two and then loggoff automatically. have it run in the background and automatically logoff.

 

what would be a best route approach to this? I'd like to use a simplified way by using the system time feature within Windows 10.

http://digiparent.weebly.com/

 

This is free and does just that.

  • 0
9 hours ago, chrisj1968 said:

Geez, I didn't mean to fry your brain in the middle of learning C++. I might have to learn that language instead. I've heard it's extremely powerful, more so than VB.

Unless you intend to become a professional programmer in a field that uses C++ extensively (and there are fewer of those than you might think), don't waste your time. I'm not sure what your intentions are but you can write basically anything in VB.Net. Including operating systems and AAA games. If you spend a very long time writing VB you might find that it's somewhat verbose, that most code samples for .NET libraries are in C#, that it's hard to find other highly competent VB programmers to help you online; and that there are lots of really cool languages you could learn to help you become a better programmer (like Haskell, Clojure, Assembly, etc); at which point you might want to learn something else - but probably not C++.

 

Quote

I've found that C++ is oriented towards more complex and large projects, while VB.Net has been better suited for smaller scale applications.

Because of ...? VB.Net is basically a clone of C# with slightly different syntax and some language-specific namespaces and functions to make it easier for beginners and familiar to VB6 programmers. It's statically and quite strongly typed, has namespaces, first-class OOP support and ok FP support, generics, it's supported by ReSharper, it compiles quickly, it produces assemblies that can be easily consumed by any CLI language and turned into NuGet packages for painless inclusion in other projects. C++ actually lacks several of these traits (it has no notion of assemblies and isn't amenable to nice package management like NuGet/Fake, its compilation times are a huge problem on large projects, header file management is pure tedium and doesn't exist in any other language but C, tooling support was far off what you get with Visual Studio/ReSharper for C# and VB last time I checked). I personally found it a huge pain to work on large C++ projects and I had that unfortunate experience at several different companies; this along with many other flaws of the language ultimately drove me towards more productive technologies.

 

I would certainly never write a large project in C++; I might write some parts where I really need something only C++ can give me - placement new, intrinsics, really good codegen - but that's unlikely to be more than 5% of the code.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • I'm still on Windows 10 22H2 because I didn't want to deal with all the issues in Windows 11, so I waited almost a week before installing the latest Patch Tuesday update (KB5094127), I went ahead and did it, and it was a huge mistake—ever since then, my File Explorer has seen a performance drop of about 30% when transferring large files... Once again, Microsoft has outdone itself! This update cannot be uninstalled, either through the Control Panel (via Settings) or by accessing Advanced Startup Options. The only possible alternative would be to use system restore points, but I’d have to reinstall all app and driver updates (and there’s no guarantee it would work). Or there’s the “nuclear option” of a in-place repair without losing files or apps, but even then, all my customizations would be lost! Microsoft just can’t help but mess everything up! Way to go, Microsoft! But I still don’t want your c****y Windows 11!
    • Microsoft: Windows 11 could finally solve a major issue across AMD, Nvidia, and Intel GPUs by Sayan Sen While Microsoft has been trying to improve it, Windows 11 is definitely not flawless, as even today some issues are taking a year to publicly acknowledge. However, one area of trouble that may finally see much better results soon is graphics driver crashes. Work on graphics driver timeouts, also called Timeout and Detection Recovery (TDR), is not new as the latest WDDM 3.2 also has specific improvements regarding it. Windows Display Driver Model (WDDM) version 3.2 is supported on Windows 11 24H2 and 25H2. However, with the upcoming version 26H2, TDR crash diagnosis could go to the next level as Microsoft is introducing a new DirectX 12 API feature called "DirectX Dump Files". Similar to how system memory dump files work when a system crashes or freezes or encounters any such major issue, DirectX Dump Files (DDF) will essentially record a snapshot of the GPU execution right at the moment a graphics-related crash or hang or freeze occurs, so that developers can better understand and diagnoze these TDR and timeout detection errors. The dump will be available as a .dxdmp file for analysis and it will be a comprehensive dump file generated with detailed insights about the hardware, drivers, Windows, as well as the affected application. This should be another welcome change in this department. Earlier at GDC 2026, when the technology was first debuted, Microsoft had shared more details regarding it. The company had explained how DDF is designed to gather data from every layer of the graphics stack into a single file, eliminating the need for developers to manually correlate logs from multiple tools. As mentioned above, the dump can contain a lot of useful details like GPU hardware state information such as register values, shader program counters, page fault virtual addresses, shader memory data, and command buffers. Alongside that, it also captures DirectX runtime and kernel information, including D3D objects, pipeline state objects, device error data, adapter details, and CPU call stacks. Microsoft says the feature has been built around two primary use cases: retail device removals and local device removals. The former allows developers to collect crash information from end users' systems in the field, while the latter helps QA teams and developers investigate issues on test machines. Developers will also be able to include up to 2 MB of custom application data through new D3D12 APIs, providing additional context for troubleshooting. In addition, Microsoft is introducing three dump collection modes ranging from zero-overhead capture, which has no runtime performance impact on supported hardware, to higher-detail modes that collect more vendor-specific debugging data. On compatible Tier 2 hardware, zero-overhead dumps will be enabled by default, meaning developers may begin receiving useful crash diagnostics without making any code changes. The table below explains the three tiers: Tier Description NO_OVERHEAD Enables crash capture with no runtime cost and is suitable for broad deployment MEDIUM_OVERHEAD Provides a balance, capturing additional diagnostic data with moderate impact HIGH_OVERHEAD Collects the most detailed GPU and driver state available, enabling deeper investigation at the cost of higher runtime overhead In terms of availability, the company expects broader release to be around the fall of 2026, which should be right around the time when Windows 11 version 26H2 lands. Right now, DirectX Dump Files are available as a preview and currently, only AMD has the compatible AgilitySDK Developer Preview driver version 26.10.07.02. You can find the official announcement post here on Microsoft's website.
    • And with SO much better perf than the laggy mess that is Files.
    • BrowserOS 0.46.0 by Razvan Serea BrowserOS is a free, open-source Chromium-based browser that runs AI agents natively, offering a smarter, more productive browsing experience. It supports Chrome extensions and integrates AI agents to automate tasks, fill forms, and streamline workflows. Your data stays on your computer: you can use your own API keys or run local models via Ollama, making it a privacy-first alternative to tools like Perplexity, Comet, or Dia. With built-in productivity tools and app integrations, BrowserOS boosts efficiency while keeping control firmly in your hands. Being Chromium-based, BrowserOS lets you effortlessly import your bookmarks, passwords, and Chrome extensions in just a few clicks. BrowserOS works with OpenAI GPT models, Anthropic Claude, Google Gemini, and local AI models via Ollama or LMStudio. You can use your own API keys and effortlessly switch between providers. BrowserOS Agent Your AI productivity assistant that organizes and manages your browsing effortlessly Quickly list, group, or close tabs Save and resume browsing sessions Search your history and organize bookmarks Switch instantly to the tab you need BrowserOS Navigator – Automate web tasks with ease Navigate websites and search automatically Interact with pages without manual effort Handle repetitive tasks in seconds What makes BrowserOS special Feels like home - same familiar interface as Google Chrome, works with all your extensions AI agents that run on YOUR browser, not in the cloud Privacy first - bring your own keys or use local models with Ollama. Your browsing history stays on your computer Open source and community driven - see exactly what's happening under the hood MCP store to one-click install popular MCPs and use them directly in the browser bar (coming soon) Built-in AI ad blocker that works across more scenarios! BrowserOS 0.46.0 changelog: Run Claude Code & Codex right in your browser — We've extended the agent harness to bring full coding agents into BrowserOS. Claude Code and Codex now come bundled and plug straight into the assistant, so you can drive your browser with the agent — and the subscription — you already use. A brand new experience — A redesigned new tab, a calmer composer, and a rebuilt command center for switching between agents. The whole assistant is cleaner, faster to reach, and easier to live in. New MCP tools — We rebuilt the browser tool surface from the ground up — a tighter, more reliable set of tools for agents to drive the browser. Plus one-click install of BrowserOS as an MCP server into the agents you already run, with automatic URL sync. Chromium 148 — Updated to the latest Chromium base with all recent upstream fixes and security patches. Streamlined — We've pulled back a few features that weren't getting much use — Skills, Soul, and Memory — so we can focus and ship better versions of them soon. Download: BrowserOS 0.46.0 | 181.0 MB (Open Source) Download: BrowserOS for macOS | 485.0 MB Links: BrowserOS Homepage | Github | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
  • Recent Achievements

    • Week One Done
      Jordan Smith earned a badge
      Week One Done
    • Reacting Well
      BizSAR earned a badge
      Reacting Well
    • First Post
      AndreaB earned a badge
      First Post
    • Week One Done
      Huge Trailer earned a badge
      Week One Done
    • Week One Done
      Classifyskilleducation earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      590
    2. 2
      +Edouard
      186
    3. 3
      PsYcHoKiLLa
      76
    4. 4
      Michael Scrip
      73
    5. 5
      Steven P.
      67
  • Tell a friend

    Love Neowin? Tell a friend!