Solved

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

Posted on 2007-03-18
13
1,009 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
 
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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Ever notice how you can't use a new drive in Windows without having Windows assigning a Disk Signature?  Ever have a signature collision problem (especially with Virtual Machines?)  This article is intended to help you understand what's going on and…
Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

707 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now