Solved

Trying to write a .bat file to stop services in Windows 7 as a Standard User

Posted on 2014-03-10
11
546 Views
Last Modified: 2014-04-08
I am moving all of our users to Windows 7 from Windows XP. I have one network app that is giving me problems. It runs off of a Novell NetWare 6.5 server (we still use NetWare for authentication, no Active Directory or domains here). I have other apps running on other Novell NetWare 6.5 servers that work fine, so that's not the issue.

When the icon is double-clicked, it takes 4-7 minutes to fully start the app. Once it starts though, it behaves normally. I have found that it will start in just a few seconds if I stop the Workstation service or disable the Client for MS Networks.

I have written a .bat file that stops the Workstation service, runs the app, restarts the Workstation service and remaps a lost drive mapping to a Windows server that occurs when the Workstation service is stopped. It works perfectly as long as it is run by an Administrator user account on the Workstation.

However, I would prefer to have my users set up as Standard Users on their workstations, but they are unable to stop and start services. I have tried the Run As Administrator option, but they are prompted for the password to an Administrator account.

This is the .bat file so far:

NET STOP Workstation
START \\Novell server\volume\folder\targetapp.exe
TIMEOUT /t 12
NET START Workstation
NET USE N:\Windows Server\Folder

Is this even possible? Would it be easier to disable the Client for MS Networks to accomplish this and then re-enable it?

Thanks in advance.
0
Comment
Question by:jgcne
  • 3
  • 3
  • 2
  • +2
11 Comments
 
LVL 13

Expert Comment

by:Santosh Gupta
ID: 39918806
Try this for one machine first.

1. Create a Schedule task  to run the batch file.

2. a) on local machine, go to go to Computer Management, then Local Users and Groups, Users
b) Right-Click on the standard user account, Properties.  Member Of tab.
c)Add Power Users and Backup Operators.

now check if your is able to run the Schedule task.
0
 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 39918844
Alternately, have the batch file check for a local copy of the program.  If the local copy doesn't exist, copy the program from the file server.  Then launch the program locally.
0
 

Author Comment

by:jgcne
ID: 39918886
Nope, sorry it didn't work. Same thing telling me "Access is Denied".
0
 

Author Comment

by:jgcne
ID: 39918911
Trying to run it locally didn't work either. It was looking for a .DLL that resides on the server. Probably the first of many.
0
 
LVL 13

Expert Comment

by:Santosh Gupta
ID: 39919049
1. login with admin first and Try to run the schedule task,
2. could you pls share the error ?
0
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 53

Accepted Solution

by:
McKnife earned 500 total points
ID: 39919080
Create a schedules task and modify the ACL of the scheduled task so that users may run it (run, NOT modify). The ACL can be modified in the properties of the task file in c:\windows\system32\tasks. Create one task for starting and one for stopping.
Call those tasks inside your batch
schtasks /run /tn stoptask
yourprog.exe
net use...
schtasks /run /tn starttask
0
 

Author Comment

by:jgcne
ID: 39924939
Sorry for the lack of response, but I have been having trouble figuring out how to schedule a task to stop or start a service. I don't use the Task Scheduler much.

My time table for completion of deployment got moved up by two weeks yesterday, so I don't have all the time I had hoped to have to polish things.
0
 
LVL 53

Expert Comment

by:McKnife
ID: 39924951
Just say what exactly you need help with.
0
 
LVL 59

Expert Comment

by:LeeTutor
ID: 39975480
I've requested that this question be deleted for the following reason:

Not enough information to confirm an answer.
0
 
LVL 53

Expert Comment

by:McKnife
ID: 39975481
http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Windows/Windows_7/Q_28384965.html#a39919080 solved it, that's why I object. I use that solution myself, feel free to try it.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SPAM and Ransomware and Backup 11 89
KMS and XenDesktop 7.5 15 39
Linksys 4 port wireless router 62 46
Laptop Using too much memory when no apps loaded 7 45
Article by: Lee
Windows 7 Ultimate and Enterprise (and 2008 R2) introduced a new feature you may not be aware of - Boot from VHD.   Boot from VHD (or what Microsoft refers to asNative Boot allows you to install Windows to a VHD (Virtual Hard Disk) file that is t…
On some Windows 7 (SP1) computers, Windows Update becomes super slow even the computer is reasonably fast.  There's one solution that seemed to have worked well for me (after trying a few other suggested solutions).
This Micro Tutorial will go in depth within Systems and Security in Windows 7 and will go into detail regarding Action Center, Windows Firewall, System, etc. This will be demonstrated using Windows 7 operating system.
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum editing capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.

920 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

12 Experts available now in Live!

Get 1:1 Help Now