Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Logon script not running on Win 7


17 Jan 2012   #1

Microsoft Windows 7 Professional 32-bit 7601 Multiprocessor Free Service Pack 1
 
 
Logon script not running on Win 7

Hi all, new here. Have a little experience with Win 7, a lot with Win XP.

So here's my situation. I'm trying to create a login script for use on my work's PCs. Most all of our boxes are running XP. Putting this login script into the Starup folder works fine, the script runs on startup and creates its log.

My PC has recently been upgraded with Win 7 Pro 32 bit. When I manually execute the script, all works. But when I leave it in the Startup folder and reboot, it doesn't run. Msconfig has added an entry in the Startup tab for my script and it is enabled.

Any suggestions or thoughts on what I might be doing wrong? UAC is turned off, by the way, and my account is an Admin account (both locally and Domain).

My System SpecsSystem Spec
.

17 Jan 2012   #2

Windows 8 Core X64
 
 

My System SpecsSystem Spec
18 Jan 2012   #3

Microsoft Windows 7 Professional 32-bit 7601 Multiprocessor Free Service Pack 1
 
 

Hmm, thank you for the link, but not sure how this helps....

Let me give a bit more background. As I have already stated, I'm a Domain Admin. Now, I'm still learning a lot concerning IT work... I'm at the bottom of the totem pole in my place of work. But I am learning a lot about remote management... something the rest of the guys where I work at don't know a lot about. I've been trying to find ways to make a lot of the common, remedial tasks I have to do become easier and faster to handle. One of the things I've been looking into is WMI. Now, there's a lot I have to do on a day to day basis that using WMI would make easier by far. Unfortunately, not all of our PCs are config'd by default to allow access to WMI... even by Domain Admins.

I've written 2 scripts at this point to assist me in enabling it on all of the PCs without having to visit each one individually. The first one is the one that actually enables everything. It must be run locally on the PC and I don't want to be disturbing all of our users with asking them to run this file for me or have them break away from their PC for a moment so that I can. So, I'm placing it into the Startup folders. Why not push it out via Group Policy? Well, I haven't been told I can use it yet... and the few others in our IT Dept that could (2 people out of 4 (including myself)... for 7 different sites) are too wrapped up in other projects and individual site needs to help me.

So this leads me to my second script. It remotely connects in through the PCs via the c$ share of each computer and places the scripts into the Startup folders. That's all I can do. Any PC that doesn't have WMI enabled will not allow any more access than that as far as I'm aware. Thus, it needs to work on the first go, or get written off as needing a personal visit.

Thankfully, currently we only have something like 4 or 5 PCs in the whole company running Win 7. Everything else is XP with a couple 2ks that run stuff too critical to risk replacing/upgrading at this time. But we've been exploring upgrading to Win 7 Pro (possibly 64 bit) sometime in the near future. I need to understand why the script will run manually just fine with no prompts, but through the Startup folder does not execute. I can tell the Startup folder is working. I placed a third party exe file into the folder and it came up when I logged in. Is there something about the Startup folder that it won't run certain file types? Such as .vbs files?

So basically, I need to find a way to make this work as is, with no other trickery, as it needs to be assumed that the only thing I can do is copy files from one PC to another in those cases where the WMI features and the like have been turned off.
My System SpecsSystem Spec
.


18 Jan 2012   #4

Windows 8 Core X64
 
 

Sorry, missed the Domain part.

At the end of the article I linked you to is this:

Quote:
runas /user:SomeLocalAdminAccount Here must be like this:
runas /noprofile /user:mymachine\administrator cmd runas /profile /env /user:mydomain\admin "mmc %windir%\system32\dsa.msc runas /env /user:user@domain.microsoft.com "notepad \"my file.txt\""
What if you create two scripts (batch files). The first one would use runas to start the 2nd which does whatever you need.
My System SpecsSystem Spec
19 Jan 2012   #5

Microsoft Windows 7 Professional 32-bit 7601 Multiprocessor Free Service Pack 1
 
 

Hmm... the runas doesn't seem to work too well for my purposes. It prompts for a password.

cmd /c myscript.vbs seems to work, though. One catch is that the command window pops open for a short time. I'd rather this not happen.

EDIT: Wow... I really don't know what is going on, but it is working now. I decided to throw another .vbs script into the startup folder to see if I could confirm if it was indeed that .vbs scripts couldn't be run directly from the startup folder, but it ran. So then I tried popping my original .vbs script back in there... completely unaltered as of the last failed attempt at getting it to run from there... and this time it worked. Bizarre. Anyway, all is well now. Thank you very much for your assistance!
My System SpecsSystem Spec
19 Jan 2012   #6

Windows 8 Core X64
 
 

You're welcome.

Yesterday's history, tomorrow's a mystery, computers will confuse you forever
My System SpecsSystem Spec
Reply

 Logon script not running on Win 7




Thread Tools



Similar help and support threads for2: Logon script not running on Win 7
Thread Forum
Logon Script Runs for Some Users But Not Others Network & Sharing
Script Logon into websites Software
Logon script issue... Network & Sharing
PowerShell logon script Network & Sharing
Logon Script Network & Sharing
Use GP or logon/logoff script Network & Sharing
script error when running a vbs script. Network & Sharing

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 01:44 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33