Jump to content

cmd.exe (WIHU started over UNC-Path)


opensurf

Recommended Posts

when i start WIHU with an UNC-Path and the started program within WIHU is cmd.exe,

...

; Sub command 1

description.1=Windows Media Player 9 (+ Hotfix Q819639, Q828026, Q837272)

command.1=cmd.exe /c %WIHU%\Windows\wmp\setup.cmd

file.1.0=%SystemRoot%\System32\wmp.dll?9.0.0.3128

...

i get the following errormessage in the DOS-Environment:

CMD.EXE wurde mit "\\hostname\share\WIHU" als aktuellem Verzeichnis gestartet.

UNC-Pfade werden nicht unterstützt.

Stattdessen wird das Windows-Verzeichnis als aktuelles Verzeichnis gesetzt.

It's possible to start cmd.exe with %TEMP% if WIHU is started with UNC-Path?

Thx

Link to comment
Share on other sites


i have less experience in programing, but isn't it possible to check the Cmd if it start's with cmd.exe and if yes, then replace CurDir with %TEMP%?

wihu.c:

...

if (LogonWithNewName == 0) {

/* Install as current user (i.e. Administrator) */

Result = CreateProcess(NULL, Cmd, NULL, NULL, FALSE, 0, 0, CurDir, &sti, π);

} else {

Result = CreateProcessWithLogonW(UserName, NULL, UserPassword, LOGON_WITH_PROFILE, NULL, Cmd, 0, NULL, CurDir, &sti, π);

}

...

Link to comment
Share on other sites

inside the started cmd.exe (first three lines) i get the following messages:

CMD.EXE wurde mit "\\hostname\share\WIHU" als aktuellem Verzeichnis gestartet.

UNC-Pfade werden nicht unterstützt.

Stattdessen wird das Windows-Verzeichnis als aktuelles Verzeichnis gesetzt.

Link to comment
Share on other sites

I submitted a patch for this...

If (or when) it gets added to the main branch it will be possible to specify in the ini file what path to start the application in using "startin.<number>=<path>"

Hopefully it should fix your problem.

eg:

[Development]
command.0=cmd.exe
description.0=Command Prompt - wihu path (default, reverse compatable)
selected.0=1

command.1=cmd.exe
startin.1=.
description.1=Command Prompt - Relitive to install.ini file
selected.1=1

command.2=cmd.exe
startin.2=C:\
description.2=Command Prompt - Fixed Path
selected.2=1

command.3=cmd.exe
startin.3=%HOMEDRIVE%%HOMEPATH%
description.3=Command Prompt - Enviroment (C:\Documents and Settings\<Username>)
selected.3=1

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...