Solved

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

Posted on 2007-03-18
13
1,013 Views
Last Modified: 2012-06-21
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.
0
Comment
Question by:RussellWinterscheidt
  • 7
  • 3
  • 2
  • +1
13 Comments
 
LVL 38

Expert Comment

by:younghv
ID: 18747708
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
0
 
LVL 28

Expert Comment

by:Michael Pfister
ID: 18747729
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
0
 

Author Comment

by:RussellWinterscheidt
ID: 18753221
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"???
0
Simple, centralized multimedia control

Watch and learn to see how ATEN provided an easy and effective way for three jointly-owned pubs to control the 60 televisions located across their three venues utilizing the ATEN Control System, Modular Matrix Switch and HDBaseT extenders.

 
LVL 15

Expert Comment

by:Ryan_R
ID: 18753751
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
0
 
LVL 15

Expert Comment

by:Ryan_R
ID: 18753772
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.
0
 
LVL 15

Expert Comment

by:Ryan_R
ID: 18753787
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   :)
0
 
LVL 15

Accepted Solution

by:
Ryan_R earned 250 total points
ID: 18754206
1 out of 2 ain't bad:  (on Vista now)


YOUR SOLUTION: Right click the shortcut you have made. Ensure you are on the General tab. Click Advanced. Tick the box that says 'Run as Administrator'
All done



The one I got wrong was about being a Power User and not an Administrator (if you're wondering).
0
 
LVL 38

Expert Comment

by:younghv
ID: 18755453
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
0
 
LVL 15

Expert Comment

by:Ryan_R
ID: 18759751
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
0
 

Author Comment

by:RussellWinterscheidt
ID: 18768723
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
0
 
LVL 15

Expert Comment

by:Ryan_R
ID: 18768735
Thanks for the points
0
 
LVL 38

Expert Comment

by:younghv
ID: 18768763
Hey Ryan - good lick!
I will save that one for future use.

Vic
0
 
LVL 15

Expert Comment

by:Ryan_R
ID: 18768781
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
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
Learn how to PXE Boot both BIOS & UEFI machines with DHCP Policies and Custom Vendor Classes
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question