HiddenDOSCommand and Max 2011

I’m experiencing a strange issue with HiddenDOSCommand.

I’m running some Perforce calls via HiddenDOSCommand for syncing, adding and editing Max files. Running these functions on my computer works fine, but running them on a co-worker’s computer does not. I checked his environment variables and they are fine, and running the same exact string through a dos prompt on his computer works fine.

It should be noted the only difference between his and my Max load-outs is that I am using 64-bit and he is using 32-bit, and I don’t know if that can change…

Has anyone had this happen, and know any potential solution (or, at the least, where else I can look to see what is going on?)

Thanks!

Tim

http://forums.cgsociety.org/showthread.php?f=98&t=713102&highlight=hiddendoscommand
Try messing around with the startpath parameter.
But more generally, I’d suggest using a .NET System.Diagnostics.Process, rather than the Max DosCommand, HiddenDosCommand, or ShellLaunch.

The startpath bug was fixed with 2011, and using it here hasn’t helped, unfortunately.

I’m going to look into the dotNet stuff on Monday, but am hoping to get the issue resolved via the dosCommand stuff for no reason other than it’s simpler :slight_smile:


fn runHidden exeString cmdString =
(
    myCMD = dotNetObject "System.Diagnostics.ProcessStartInfo" exeString cmdString
    myCMD.UseShellExecute = false
    myCMD.CreateNoWindow = true
    myProcess = dotNetClass "System.Diagnostics.Process"
    myProcess.Start(myCMD)
)

runHidden "p4" "help"

I’ll echo Rob, definitely give .NET a go.

Hopefully the above will make it “simpler” to decide! :wink:

awesome, thanks :slight_smile: I’ll give this a try today at home to get it working and test it at work on Monday!

This worked out great, guys. Thanks!