Jump to content

Recommended Posts

Posted

Hello,

I've got a script deployed via a GPO to run on logon, however it only seems to be doing the first step?

 

The script is the following:

@echo on
xcopy "\\SERVER-IP\IT\Software\Necessary\SchoolNameApplication\SchoolNameTrayInstaller.exe*" "C:\Users\%username%\Desktop\" /y
TIMEOUT /T 1
start "SchoolNameTrayInstaller.exe" /D "C:\Users\%username%\Desktop" "SchoolNameTrayInstaller.exe"

 

It will run the xcopy command and successfully copies this to the desktop.

It does not, however, execute the 'start' command.

 

 

When running the same batch file manually when logged in, it completes successfully.

 

Any clues?

Posted
Is it a permission issue when it comes to executing the file?

Nope

Permissions are all fine.

 

I tried it with a 'call' command - this doesn't work either?

It's as though from a logon script it doesn't like starting a new program/calling another script.

Posted (edited)

Do any of these work? The first one should.

 

start "" "%USERPROFILE%\Desktop\SchoolNameTrayInstaller.exe"

 

start "" /D "C:\Users\%username%\Desktop" /wait "SchoolNameTrayInstaller.exe"

 

start "" /D "%USERPROFILE%\Desktop" /wait "SchoolNameTrayInstaller.exe"

 

I've got a script deployed via a GPO to run on logon, however it only seems to be doing the first step?

Wouldn't your users be prevented from running executables due to SRP or AppLocker? :confused:

Edited by Arthur
Posted

Try the following

 

@echo on
xcopy "\\SERVER-IP\IT\Software\Necessary\SchoolNameApplication\SchoolNameTrayInstaller.exe*" "C:\Users\%username%\Desktop\" /y
TIMEOUT /T 1
"%userprofile%\Desktop\SchoolNameTrayInstaller.exe"

 

I don't think you need start or call, plus I find %userprofile% is better than C:\users\%username% but if that doesn't suit your environment ignore me!

Posted
start "SchoolNameTrayInstaller.exe" /D "C:\Users\%username%\Desktop" "SchoolNameTrayInstaller.exe"

 

this is wrong

my start.exe doesnt even have a /D switch , where did you get that from?

Posted (edited)

I've had issues before when asking a logon script to execute a file. Weirdly, I created a scheduled task to run a basic script of the application. By basic I mean

 

"\\server\software\file.exe" -arguments

 

I set the scheduled task to run that as a batching file at logon and as an administrator and it worked. I'm not saying it'll work for you, i'm just saying that logon scripts have acted up for me before.

Edited by Patrick

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...