I would like to know whether is it possible to write a batch file that changes the default input language under windows XP What if the language is not installed ? For example, for some reason, My PC always starts with English as a default input language, and every time I have to go to control panel and reset it. I need to write a batch file that, when run, automatically adds french and make it the default one.
Thank you,
I don't think you can do this directly with a batch file, but you could write a simple app that did it and call that from your batch file. There's some useful info here:
http://msdn.microsoft.com/en-us/library/cc144191(VS.85).aspx
Related
I want to improve my file managent and need some help to get started.
For this specific script, my idea is the following:
while in Explorer
rightclick a file -> Send To -> "Apps[.bat]"
Then the script starts and does the following:
moves the whole directory (and subfolders) of the selected file to a specified location (in my case C:\Users\Name\Desktop\Apps\Files)
so sending Name\Downloads\Coolportableapplication\Coolapp.exe to the batch results in Name\Desktop\Apps\Files\Coolportableapplication\Coolapp.exe
creates a shortcut of C:\Users\Name\Desktop\Apps\Files\Coolportableapplication\Coolapp.exe in C:\Users\Name\Desktop\Apps
Is this generally possible with a batchscript?
This isn't my first batch but I've never dealt with unspecified files and English isn't my native language so I couldn't really find anything useful for my cause, though I am sure my little script won't be too much of a problem for you. Based on that batch, I want to create similar scripts but I just have no idea how to begin with that one.
Thanks a lot!
No need for a batch file but anyway.
1: Type shell:sendto into your explorer window and copy the shortcut to your directory "C:\Users\Name\Desktop\Apps\Files". This directory will now show as default in your Send To options.
Is it possible to add startup options directly to the exe instead of a link file?
F. e. You have the command "-minimized". Now you can just add this to the shortcut file and the program will start minimized.
Is there a way to do this to the exe file directly? (Hex Editor?)
Thanks in advance
In order to physically change an executable file it would need to be modified from source code and recompiled. I don't recommend changing anything in an executable file using a Hex Editor unless you are an expert and know what you are doing to reverse engineer an application.
I would suggest that you simply create a shortcut and modify that to minimize / maximize the application on open as you mentioned. That way you won't risk completely corrupting the executable.
I generated a table into console and it went great but when i add "uses crt;", the labels, lines etc. which I made using chr(ord.value); , and also language special characters go wild, so I guess it somehow changes encoding.
I work in Win7,FPC IDE v.2.6.4
Another wierd thing is that when I run the program, it starts in cmd.exe classical Windows console but after like 10 seconds it closes itself and a new run is started in another console located in FPC window(where it doesn't close itself).
The wierdest thing is that the adding of "uses crt;" doesn't do anything with the table written into cmd.exe classic Windows console...
So my solution whould be either to work out how to change the encoding in the console located in FPC window or how to prevent cmd.exe from closing itself.
Hope Someone can help me, I'll really appreciate it.
If youd don't use Crt, then output is using standard DOS routines. Crt unit redirects the Input and Output standard text files to CRT instead to DOS's standard input and output files. But you can explicitly assign it back by executing:
Assign(Input, ''); Reset(Input);
Assign(Output, ''); Reset(Output);
This is only under windows env.
As I know windows os identifies associated application of a particular file by file extension.
Like wise each file (binary) starting with corresponding symbols ("starting symbols"). For an example .JPG starts with ÿØÿà. Let say I open this .JPG file in a Hex editor or a Text editor and then I change that starting symbols into another file type. for an example I can change ÿØÿà to .Eߣ (.mkv). So when I double click on the .JPG the Windows Photo Viewer says there are some errors or similar message. So I need to get some information about the application that tries to open that kind of a file. If I can, I need to open that file using the application that associated with "starting symbols".
Briefly when I open .JPG I need to open a default video player .mkv files. But It may not work for this example. Because I changed only the "starting symbols" of my .JPG.
Please give me any idea to do this.
Thanks!
When you encrypt the file, give it a new extension. e.g. Picture.jpg becomes Picture.encrypted-jpg. You then register as the handler for encrypted-jpg, decrypt the file, then launch the normal jpg handler.
When the shell is asked to perform a verb on a file, the shell does not use the contents of the file to determine which app to pass it to. The file extension is what determines how the file will be treated.
You wish to use the contents of the file to influence which app processes a shell verb. In order to do so you would need to create a launcher app that reads the file header and then decides which app to pass the file on to. You would assign your launcher app as the handler app for all file extensions that you were interested in.
Although you could do this, it would be much easier just to set the file extension appropriately.
The proper way to do this sort of thing is to replace the files with reparse points.
The downside is that this involves writing a file system filter driver, i.e., an operating system extension, which is a whole level of trouble above and beyond ordinary application programming. (Since Windows already does file encryption, I doubt it would be worth the effort.)
I'm new to programming and have taken some classes in it so I'm not sure if this is possible. I want to use a COTS software called 010 Hex Editor and write a script for the program to automate a couple tasks. These tasks can be run from a batch file according to their documentation.
Then I want to instruct the user to eject the device and reinsert it to clear the cache. (This I want done just with a simple pop-up window.
Then I also want to format the device which I assume can be done in a batch file as it can be done through dos on Windows.
My question is, with these 3 steps, can I build a simple GUI that has a button that says, "Start" or something like that, then the pop up window comes up to eject and reinsert, and then another button to format, and another button to exit. I'm not really familiar with what language this could be done in, and how to do this as the C++/Java classes I've taken have been more about syntax and OOP. Thanks!
You can use the windows messenger service to put up an alert - but on newer windows (vista/7) it's a pain to set all the permissions to allow this.
There are lots of free utilities that will popup a dialog from the command line, with a given message and wait for a response.
They are generally called messagebox or msgbox - sorry can't recommend any in particular