Link to home
Start Free TrialLog in
Avatar of RussellWinterscheidt
RussellWinterscheidt

asked on

NET USE in VISTA to a Shared Printer on XP giving ACCESS DENIED

I am trying to use a DOS Application on VISTA - I know I know but I need to run this application on VISTA.
The application runs fine except I use a NET USE command to capture output to LPT1: and redirect it to a Shared Printer on the Network.  When I start my application I run a batch file which contains the NET USE commands to connect to Shared Network Resources that I want to use.  The NET USE command that assigns a Drive Letter to the Shared Data Files works fine but the NET USE command that attempts to capture LPT1: to a Shared Printer returns ACCESS DENIED.  This would indicate that there is a permission problem with the Shared Printer.  However, when I then go to a Command Prompt and entre the same NET USE command it connects without a problem.
Avatar of younghv
younghv
Flag of United States of America image

Hi,
I haven't played with it that much (yet) but I have found that the "Net" commands on my Vista box are different from XP.

If you type (net help use) from a command prompt, you will see some of the bigger differences.



Vic
Are you starting your script from an elevated command prompt?
Even the "Admin" on a Vista box is quite restriected. To really get full admin access, right click on the batch starting your app and select: "Run as administrator...."

Hope it helps, Michael
Avatar of RussellWinterscheidt
RussellWinterscheidt

ASKER

The NET USE command works if I start it by right clicking the batch file - however - this does not parse the AUTOEXEC.NT and CONFIG.NT files that happens when the batch file is started from a shortcut and I need the AUTOEXEC.NT and CONFIG.NT files to be parsed.  

The USER that is logged in is set as an ADMINISTRATOR - Is this not good enough or the same as right clicking the batch file and selecting "Run as Administrator"???

Is there some way of making a Shortcut "Run as Administrator"???
Get TweakVI (google it)
In there is a tweak so that ALL command issued from the RUN box run as the administrator.

I'll see if I can find out if there's a way to make a shortcut to the 'Run as...' option
http://www.computerperformance.co.uk/vista/vista_run_command.htm

According to this you can set Advanced options for your shortcuts so that they always run as an Administrator.  [r/click shortcut>properties>advanced - or something like that]

I'll also try it out on my PC when I get home - untill then let me know if this solves your problem.
One other thing you might want to check:

I have a funny feeling that 'administrator' users are actually set as Power Users - try r/clicing My Comp - choose Manage
On the left choose Local Users and Groups
Choose Users
dbl-click your username
If not already done so add it to the "Administrators" group.

If you get on Vista befoer me let me know if I'm right or not with this one   :)
ASKER CERTIFIED SOLUTION
Avatar of Ryan_R
Ryan_R
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I have a link somewhere to the instructions on how to access the 'Real' Administrator account in Vista.
As I remember, it is somewhat like XP Home - even members of the "Administrator" user group do not have full Administrator rights.

Will post if I can find it.

Vic
perhaps that means that there's a difference between each edition of Vista (ie Home Premium has *fake administrators* and Business has *real ones*) - i'm running Ultimate 32bit

enabling the Administrator account is quite simple:
r/click My Comp and click Manage
On the left side - choose Local Users and groups - then choose Users
double click Administrator and untick "Account is disabled"
click OK and log off to find it there. You should have setup an Admin password during Vista setup
It is now working - the solution was to set the "Run as Administrator" option in the Program's Shortcut - Compatibility Tab - Tick "Run this program as a administrator"
I also disabled the "User Account Control" because the warning messages were driving me crazy.
It now works as expected.
Thanks
Thanks for the points
Hey Ryan - good lick!
I will save that one for future use.

Vic
Sometimes the easiest way to get info is to use Vista Help! - although it has let me down a bit today with irrelevant search results and very few technical articles, which means back to google   :-P