I don't know about converting BATs to EXEs, but here is a C program that does exactly the same thing. You can compile it yourself (Visual Studio Express and GCC are both good free compilers) or I've provided an executable version
here. [SHA-1 = 4af0b5abc1a3fe20eb2a8a12902db2641c8a7505] You can trust me. ;-) (Of course, as you probably know, you shouldn't run random programs provided by random people on the internet, not least of all because even a perfectly clean program can be hacked and replaced with no one knowing, at least if they were to edit the hash.) It must be on the same drive letter as X:\PortableApps\Skype\App\skype.exe
Code:
#include <windows.h>
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
STARTUPINFO si;
PROCESS_INFORMATION pi;
ZeroMemory(&si, sizeof(si));
si.cb = sizeof(si);
ZeroMemory(&pi, sizeof(pi));
SetCurrentDirectory(TEXT("\\PortableApps\\Skype\\App"));
if (!CreateProcess(NULL,
TEXT("skype.exe /datapath:\"Data\" /removable"),
NULL, NULL, FALSE, 0, NULL,
NULL, &si, &pi))
{
char errbuf[128];
wsprintfA(errbuf, "CreateProcess failed [%d]\r\n", GetLastError());
MessageBoxA(NULL, errbuf, "error", MB_OK);
return 1;
}
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
return 0;
}
Isn't Windows programming just a barrel of monkeys?