Click here to Skip to main content

Welcome to the Lounge


For lazing about and discussing anything in a software developer's life that takes your fancy.
The Lounge is rated PG. If you're about to post something you wouldn't want your kid sister to read then don't post it. No flame wars, no abusive conduct and please don't post ads.

Technical discussions are welcome, but if you need specific help please use the programming forums.

JokeRe: German... PinmemberJohnny J.6-Dec-13 3:11 
GeneralRe: German... PinmemberSeptimusHedgehog 1515766-Dec-13 3:13 
GeneralRe: German... PinmemberCDP18026-Dec-13 8:08 
GeneralRe: German... PinmemberCDP18026-Dec-13 8:34 
GeneralRe: German... PinprofessionalRichard Deeming6-Dec-13 8:46 
GeneralRe: German... [modified] PinmemberSitalkes7-Dec-13 5:17 
GeneralRe: German... [modified] PinmemberClodetta del Mar8-Dec-13 11:40 
GeneralRe: German... PinmemberClodetta del Mar8-Dec-13 12:39 
GeneralRe: German... PinmemberMember 41945938-Dec-13 13:46 
GeneralRe: German... PinmemberClodetta del Mar9-Dec-13 2:41 
GeneralRe: German... PinprofessionalRichard Deeming9-Dec-13 1:42 
GeneralRe: German... PinmemberClodetta del Mar9-Dec-13 2:45 
GeneralRe: German... PinmemberMember 41945938-Dec-13 14:03 
GeneralSCHTASKS.EXE and Windows, and PSEXEC [modified] PinmemberJohn Simmons / outlaw programmer6-Dec-13 2:27 
I just spent three weeks trying to figure out the nuances of restarting a process on a remote Windows machine from a web site. The task description started out as "convert an existing VBS script to c# so we could use it from a web site".
Windows XP Embedded does ship with schtasks.exe. This means you can't schedule tasks on the box, so you have to run PSEXEC instead to run your process directly. The PSExec thing on XP boxes is a relative piece of cake to get working. The problems exist in schtasks.
Non-embedded versions of Windows have schtasks, and you have to run it with WMI to avoid permissions entanglements. You also have to be very careful of how you specify parameters. Windows XP uses schtasks v5, and Windows 7 uses v6. If you specify a command line parameter that doesn't exist for the given version of schtasks you're trying to run, it simply doesn't do anything (and v6 has params that v5 doesn't have). Since you're running via WMI, you can't capture stderr or stdout, either.
This has been a freaking nightmare. We still haven't figured out why it won't work in a virtual machine, but for me that's a non issue since the web site won't be manipulating VMs at all.
BTW, you know you have problems when you run schtasks and you don't get a file in the (Win7) Windows/System32/Tasks folder, or the (XP) Windows/Tasks folder. It's important that you have an account on the remote box in question so you can observe (via remote desktop) the task manager and the Tasks folder. Without that ability, you have no hope of determining exactly what has occurred.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

modified 6-Dec-13 9:26am.

GeneralRe: SCHTASKS.EXE and Windows, and PSEXEC PinprotectorMarc Clifton6-Dec-13 2:39 
GeneralRe: SCHTASKS.EXE and Windows, and PSEXEC PinprofessionalNagy Vilmos6-Dec-13 2:41 
GeneralSnow Pinprofessionaldjj556-Dec-13 2:22 
GeneralRe: Snow PinprofessionalS Houghtelin6-Dec-13 2:47 
GeneralRe: Snow Pinprofessionaldjj556-Dec-13 6:39 
GeneralRe: Snow PinprofessionalS Douglas6-Dec-13 8:17 
GeneralRe: Snow PinprofessionalGuyThiebaut6-Dec-13 3:18 
GeneralRe: Snow Pinmemberdeflinek6-Dec-13 3:50 
GeneralRe: Snow PinprofessionalGuyThiebaut6-Dec-13 4:01 
GeneralXOTD PinprofessionalNagy Vilmos6-Dec-13 2:18 
GeneralRe: XOTD PinprotectorMarc Clifton6-Dec-13 2:33 
GeneralRe: XOTD PinprofessionalRichard Deeming6-Dec-13 2:34 
GeneralRe: XOTD PinmemberJörgen Andersson6-Dec-13 3:03 
GeneralRe: XOTD PinmemberRoger Wright6-Dec-13 4:22 
GeneralRe: XOTD PinmemberJörgen Andersson6-Dec-13 9:26 
GeneralRe: XOTD PinprofessionalglennPattonWork6-Dec-13 5:21 
GeneralProject Management and scifi thought of the day PinmemberMotel Kamzoil6-Dec-13 1:43 
GeneralTongue Twister PinmemberDalek Dave6-Dec-13 0:38 
GeneralRe: Tongue Twister PinprofessionalNagy Vilmos6-Dec-13 0:52 
GeneralRe: Tongue Twister Pinmemberviaducting6-Dec-13 1:05 
GeneralRe: Tongue Twister PinprofessionalNagy Vilmos6-Dec-13 1:29 
GeneralRe: Tongue Twister PinprofessionalRichard Deeming6-Dec-13 1:48 
GeneralRe: Tongue Twister Pinmember Anon6-Dec-13 0:53 
GeneralRe: Tongue Twister PinprotectorOriginalGriff6-Dec-13 0:54 
GeneralRe: Tongue Twister PinmemberMehGerbil6-Dec-13 2:18 
GeneralRe: Tongue Twister PinprofessionalRutvik Dave6-Dec-13 3:13 
GeneralRe: Tongue Twister PinmemberGregory.Gadow6-Dec-13 3:18 
GeneralRe: Tongue Twister PinprofessionalMatt T Heffron9-Dec-13 7:59 
GeneralHow's switzerland during christmas PinmemberAndyInUK6-Dec-13 0:30 
GeneralRe: How's switzerland during christmas PinmemberDalek Dave6-Dec-13 0:32 
GeneralRe: How's switzerland during christmas PinprofessionalNagy Vilmos6-Dec-13 0:49 
GeneralRe: How's switzerland during christmas PinprotectorOriginalGriff6-Dec-13 0:53 
GeneralRe: How's switzerland during christmas PinprofessionalMarco Bertschi6-Dec-13 1:05 
GeneralRe: How's switzerland during christmas PinprofessionalNicholas Marty6-Dec-13 1:47 
GeneralRe: How's switzerland during christmas [modified] Pinmembervonb6-Dec-13 1:13 
GeneralRe: How's switzerland during christmas PinmemberDalek Dave6-Dec-13 1:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Advertise | Privacy | Mobile
Web01 | 2.8.140709.1 | Last Updated 10 Jul 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid