CuthbertRumbold
(Just in Town)
2012-11-06 04:57 PM
USE command silently failing

Greetings,

I've been using a fairly simple KiXtart logon script for a number of years, mostly just for mapping drives. I have one Windows 7 client however where the drive mapping fails. All it's trying to do is:

 Code:
IF INGROUP("Mumble") = 1
  USE G: "\\file01.example.net\Blurfl"
ENDIF


I've tried DEBUG ON and single-stepping through the script. The conditional succeeds and the USE command is executed, and returns no error, but the drive isn't mapped. Checking @ERROR and @SERROR confirms that there is no error. Nothing in the event log either, but the drive just doesn't get mapped. Other USE statements in the same script all fail the same way.

Maybe this is a Win7 thing? Most (all?) of my other client machines are XP and they seem fine. I did try upgrading KiXtart to 4.63 saw but no change.

The only other clue is this client machine was recently moved to a different domain. A similar script worked fine before the domain change. Not sure why that would matter (it didn't for the XP clients) but who knows?

Suggestions welcomed, I'm a bit baffled. Thanks!


AllenAdministrator
(KiX Supporter)
2012-11-06 05:25 PM
Re: USE command silently failing

Is this a GPO script?

CuthbertRumbold
(Just in Town)
2012-11-07 04:30 PM
Re: USE command silently failing

Hi Allen. The batch file that launches the KiXtart script is defined by a GPO, so I suppose, 'yes'. Defined in User Configuration -> Windows Settings -> Scripts (Logon/Logoff).

AllenAdministrator
(KiX Supporter)
2012-11-07 06:25 PM
Re: USE command silently failing

The problem you are having has to do with the UAC and the GPO script running in the context of a different user than the current user. In XP and below this was not an issue, but from Vista on, it causes the problem of drive mappings and printer mapping not to appear to work.

The options I know that work are: (There is no priority in this list, choose your poison)
1. use a traditional logon script rather than a GPO.
2. use the reghack that MS does not support
3. use something like RunAsInteractiveUser / LaunchApp

Another possibility is turning off UAC on the PC and see if it fixes it, although I have never personally tried that.

The reghack from MS can be found here: http://support.microsoft.com/kb/937624
but notice the warning on that page:
 Quote:

Important This workaround may make your system unsafe. Microsoft does not support this workaround. Use this workaround at your own risk.


RunAsInteractiveUser() can be found here.
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=198514#Post198514

If you want more info on this topic, just do board search for EnableLinkedConnections.


CuthbertRumbold
(Just in Town)
2012-11-07 09:33 PM
Re: USE command silently failing

Thanks very much Allen. The reghack did the trick as a fast confirmation that this is indeed the problem. I'll take a closer look at RunAsInteractiveUser() as a longer term solution.

Sorry if this was a FAQ, I did try some searching of the board before posting but I didn't find quite the right incantation I guess. Thanks and best wishes!


NTDOCAdministrator
(KiX Master)
2012-11-08 12:52 AM
Re: USE command silently failing

That's a bit odd. I have a Windows 7 Pro x64 box that I certainly do not recall setting this policy change on and I don't set any GPO to do it (99.9% of the desktops are still XP Pro) yet my own computer does have that entry set already.

AllenAdministrator
(KiX Supporter)
2012-11-08 02:12 AM
Re: USE command silently failing

For what it is worth, there was a time when no one noticed that MS didn't support this configuration. It was about two years ago that I remember Glenn mentioning it first, and that reg fix was at least two years old at the time.

LonkeroAdministrator
(KiX Master Guru)
2012-11-08 04:17 AM
Re: USE command silently failing

it was known to be unsupported from the start.
but there was no other way than disabling UAC or linkedconnection back in the day.
both were flagged as baaaaad by MS.

end result, MS was the bad thing and we all got our fare share of their bad coding :).