Windows 8 and 8.1 Forums


run as admin CMD window bad workdir and crazy small font

  1. #1


    Posts : 14
    Windows 8.1

    run as admin CMD window bad workdir and crazy small font


    Hello, this is something strange and I think quite badly implemented. I almost don't want to spend my time to hack it to work somehow anymore :-]
    I want a BAT file which mounts a truecrypt volume on a usb drive to be run as admin. Allright so I right click on it and do run as administrator, BUT it changes it's working directory to c:\windows\system32 so it cannot find the executable which it tries to call. So I thought OK I will create a shortcut for this on the desktop for example and set the workdir to e: (it is on that usb drive) which is already not very good practice because the drive's letter can be different next time thus it would not work, BUT in this case it still does not work, goes to c:\windows\system32 and also the font is set to the smallest possible so it is barely readable. Is there a way to set workdir for "as administrator" processes or some other obvious way to do this which I did not think about? Also I would really like to know how (the heck) do I change the font in this administrator cmd window permanently. I did runas cmd window and changed it there but it remains the same when starting this shortcut.
    Click image for larger version
    Last edited by McVitas; 28 May 2014 at 13:59.

      My System SpecsSystem Spec

  2. #2


    PALU - CENTRAL SULAWESI
    Posts : 4
    Windows 8.1 Enterprise (64 Bit)


    right click on the shorcut choose properties, and click the Compability tab. chooes the option "Run this program as Administrator"
      My System SpecsSystem Spec

  3. #3


    Central IL
    Posts : 3,468
    Linux Mint 17.2


    You write your .bat file in Notepad. Then place it in the Startup folder in All Programs. As for mounting Truecrypt all of the time. Keep in mind that if something goes wrong. You will loose all of that encrypted data.

    Really though in your case. You would need an Autoplay program to run after mounting the USB drive. There is plenty of info out there if you search for it. Technet.microsoft.com has a lot of good information.
      My System SpecsSystem Spec

  4. #4


    Posts : 14
    Windows 8.1


    Guys so I guess my problem is too complicated because nobody really understood it :-]
    Ghafoer86 if you please just look at the picture - that is exactly what I did (just not at the compatibility menu because it is not there)
    Broe23 why would I put my BAT file into startup? The USB drive is not connected all the time, so I mount it whenever I connect it. What do you mean by mounting all the time and losing data? What is the problem with it? I am doing it like this for some years already with this truecrypt container... How else would I get into it?
    Autorun.inf does not work for me, maybe autorun is disabled for USB drives or I wrote it wrong but it does not run that file
    [autorun]
    open=c4ebcnl.bat
    BUT I found a solution which looks horrible and I would never found out by myself, but it works
    pushd %~dp0 - this command changes the current dir and drive to where the BAT or CMD file is run from (I would really expect the shortcut properties to handle this, but it does not)
    Windows batch file starting directory when 'run as admin' - Stack Overflow
      My System SpecsSystem Spec

  5. #5


    Central IL
    Posts : 3,468
    Linux Mint 17.2


    You create the batch file to look to see if the USB drive is connected or not. It is a long forgotten art that most no longer know how to create these files.

    Also if you have the OS set to not auto mount the removable media. Then it is pointless to even go through all of these troubles.

    If you really want to do it correct. Look up how to create a PE disc.

    As for changing the font in the Command Window. You just right click in the upper part of the window and choose to edit the properties. Also when you run Command Prompt as Admin. It will always default to System32.
      My System SpecsSystem Spec

  6. #6


    Posts : 14
    Windows 8.1


    Well that is interesting. You did not answer any of my questions but np Can you point me to some article about this usb drive detection in bat/cmd? I actually coded this thing already in AutoIt. About autorun - I have freshly installed Win 8.1 and I did not change any settings regarding this, but now I checked it and it is set to "open folder to view files" and there seems to be no choice which would use autorun.inf. I guess it is a wise security measure in Win8.
    But again I don't understand you - how is bootable PE disc related to this?
    The font settings was somehow set finally, so it is readable again even when run as admin...
      My System SpecsSystem Spec

  7. #7


    Central IL
    Posts : 3,468
    Linux Mint 17.2


    You need to look this information up yourself. Only way you are going to learn how to do this stuff. Is to research it. That is how the rest of us old timers learned how to write these scripts and batch files. We did not have the Internet or forums to ask questions. We had to physically pick up a book to find out how to create these programs.

    As for the font settings for the Command Prompt. I stated how you can change that for the Command Prompt.
      My System SpecsSystem Spec

  8. #8


    Posts : 14
    Windows 8.1


    LOL and I guess those old timers have a habit to never answer a question because these newbies are not worth it So thanks for your "help". For your information I also learned a lot from books, but nobody can read all the books and that is why we have forums and ways to share knowledge, got it?
      My System SpecsSystem Spec

  9. #9


    Harrisonburg, Va.
    Posts : 10,488
    Windows 8.1.1 Pro with Media Center


    Also I would really like to know how (the heck) do I change the font in this administrator cmd window permanently. I did runas cmd window and changed it there but it remains the same when starting this shortcut.
    Change it in the shortcut.

    Click image for larger version
      My System SpecsSystem Spec

  10. #10


    Posts : 14
    Windows 8.1


    David do you work at IBM?
      My System SpecsSystem Spec

Page 1 of 2 12 LastLast
run as admin CMD window bad workdir and crazy small font
Related Threads
White background on everything is atrocious. It is hard on the eyes. What happened to the color options? Changing window border color is merely complementary. The main issue is the horrendous state the other 90% of the screen is stuck in. I demand an explanation for this. I demand an...
Windows 8.1 runs in selective mode and not normal - msconfig. Cmd line window is very small letters that are illegible. A one-time change to normal startup mode is not stored. How to solve this problem.
Solved I needed admin rights using built-in admin account in User Accounts and Family Safety
Using Win 8.1 First off, the account I'am signed on with is listed as admin type account. It's the one I had to enter my windows account email. Since installing the new MalwareBytes 2.0 program (which went in without any problem) it put an shortcut icon on desktop. I tried too move the icon...
I am trying to identify the font in this image, as you can see its on a grave and the style is puzzling especially the similarity between the 'e' and the 'r' - obvious differences when you look carefully but does any one know the style? Myself and an official are trying to find it. I looked online...
Solved Small window from Chrome in Software and Apps
I am using 8.1 on my computer and all is running OK; except one thing that I can't seem to solve. I have the programme 'Soluto' installed (and it runs correctly) but every time I click on the 'Soluto' icon the screen changes rapidly to show the Google Chrome design and then it changes to the black...
whenever I restart my laptop, This little thing on the uppermost left side of my laptop appears would this be a threat to my laptop? what can I do about it?
Eight Forums Android App Eight Forums IOS App Follow us on Facebook