Changeset 36025 in vbox
- Timestamp:
- Feb 21, 2011 9:20:11 AM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 70126
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlExec.cpp
r35954 r36025 1297 1297 1298 1298 int rc = VINF_SUCCESS; 1299 char szExecExp[RTPATH_MAX]; 1299 1300 #ifdef RT_OS_WINDOWS 1300 1301 /* … … 1305 1306 if (RTStrICmp(pszExec, "sysprep") == 0) 1306 1307 { 1307 /* Get the predefined path of sysprep.exe (depending on Windows OS). */1308 /* Use a predefined sysprep path as default. */ 1308 1309 char szSysprepCmd[RTPATH_MAX] = "C:\\sysprep\\sysprep.exe"; 1310 1311 /* 1312 * On Windows Vista (and up) sysprep is located in "system32\\sysprep\\sysprep.exe", 1313 * so detect the OS and use a different path. 1314 */ 1309 1315 OSVERSIONINFOEX OSInfoEx; 1310 1316 RT_ZERO(OSInfoEx); … … 1318 1324 rc = RTPathAppend(szSysprepCmd, sizeof(szSysprepCmd), "system32\\sysprep\\sysprep.exe"); 1319 1325 } 1320 rc = RTProcCreateEx(szSysprepCmd, papszArgs, hEnv, 0 /* fFlags */, 1321 phStdIn, phStdOut, phStdErr, NULL /* pszAsUser */, 1322 NULL /* pszPassword */, phProcess); 1326 1327 if (RT_SUCCESS(rc)) 1328 { 1329 char **papszArgsExp; 1330 rc = VBoxServiceControlExecPrepareArgv(szSysprepCmd, papszArgs, &papszArgsExp); 1331 if (RT_SUCCESS(rc)) 1332 { 1333 rc = RTProcCreateEx(szSysprepCmd, papszArgsExp, hEnv, 0 /* fFlags */, 1334 phStdIn, phStdOut, phStdErr, NULL /* pszAsUser */, 1335 NULL /* pszPassword */, phProcess); 1336 } 1337 RTGetOptArgvFree(papszArgsExp); 1338 } 1323 1339 return rc; 1324 1340 } … … 1328 1344 * Do the environment variables expansion on executable and arguments. 1329 1345 */ 1330 char szExecExp[RTPATH_MAX];1331 1346 rc = VBoxServiceControlExecResolveExecutable(pszExec, szExecExp, sizeof(szExecExp)); 1332 1347 if (RT_SUCCESS(rc))
Note:
See TracChangeset
for help on using the changeset viewer.