Author: pschweitzer
Date: Mon Jan 11 22:41:32 2016
New Revision: 70578
URL:
http://svn.reactos.org/svn/reactos?rev=70578&view=rev
Log:
[ROSVBOXMGMT]
Let's add hacks to glue hacks together:
In case rosvboxmgmt is started with its current directory not being the directory where it
is along with hackssign_client.exe, then autoassign fails finding the hackssign client
executable and thus, fails assigning drive letter.
This is what happens when you starts rosvboxmgmt on boot with shell.
So, when using autoassign, first look for the location of rosvboxmgmt and set our current
directory there.
This fixes rosvboxmgmt autoassign not working on boot.
CORE-10032
ROSAPPS-303
Modified:
trunk/rosapps/applications/cmdutils/rosvboxmgmt/rosvboxmgmt.c
Modified: trunk/rosapps/applications/cmdutils/rosvboxmgmt/rosvboxmgmt.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/cmdutils/rosv…
==============================================================================
--- trunk/rosapps/applications/cmdutils/rosvboxmgmt/rosvboxmgmt.c [iso-8859-1] (original)
+++ trunk/rosapps/applications/cmdutils/rosvboxmgmt/rosvboxmgmt.c [iso-8859-1] Mon Jan 11
22:41:32 2016
@@ -297,6 +297,14 @@
if (assign)
{
+ wchar_t path[MAX_PATH];
+ if (GetModuleFileName(NULL, path, ARRAYSIZE(path)) != 0)
+ {
+ *(wcsrchr(path, '\\')) = 0;
+ wprintf(L"Switching to %s\n", path);
+ SetCurrentDirectory(path);
+ }
+
if (OpenFile("hackssign_client.exe", &ofs, OF_EXIST) != 1)
{
wprintf(L"hackssign_client.exe not found, falling back to
links\n");