Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Calling Custom Batcjh File

  • 25-12-2011 9:14pm
    #1
    Registered Users, Registered Users 2 Posts: 3,804 ✭✭✭


    Hey,

    I got a batch file off the internet a good few years ago that allowed me to quickly open applications or folders. Basically, I add a shortcut to the application or folder in another folder, which also contains a batch file, named m in this case. Then, my simply pressing win+R and for example typing "m c" it would call the batch file which would open the shortcut called c (chrome for example). It was a very handy script.

    Anyway, I have the script, I just can't recall how to add it to windows so that it calls the batch file when I type m into the run command. I tried adding it to the Path variable in environmental variables, but it just says Access Denied.

    Do you know where I would need to set this? Thanks.

    For anybody interested, this is the batch file.
    @echo off
    if "%1" == "" goto error
    :again
    if "%1" == "" goto end
    start %1
    shift
    goto again
    :error
    :end
    exit
    


Comments

  • Registered Users, Registered Users 2 Posts: 1,731 ✭✭✭GreenWolfe


    I put a batch files folder in my Document folder, added the path of that folder (C:\Users\UserName\Documents\BatchFiles) to my system PATH and I got your file and an example (p.bat for Notepad++) running fine.

    Unless you've got an admin account and the batch shortcuts are somewhere in your user documents I don't think this will work. The command prompt window only gets pulled down if you execute the file from C:\Users\......BatchFiles though.


  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 93,563 Mod ✭✭✭✭Capt'n Midnight


    control panel
    system
    advanced system settings
    (advanced tab in system properties)
    enviroment variables


Advertisement